Add a setup.py, use it to install Python libs#772
Add a setup.py, use it to install Python libs#772simark wants to merge 5 commits intoOpenLightingProject:masterfrom
Conversation
There was a problem hiding this comment.
Can we generate this from configure please so the version updates automatically.
There was a problem hiding this comment.
Yes of course, good catch.
b6e5d77 to
362b380
Compare
This is my first attempt at adding a setup.py to the Python code to make
it a proper package. My initial motivation was that I wanted to get the
Python libs to install to a virtualenv. With the current system, Python
files are installed to ${prefix}/lib/pythonX.Y/site-packages, even when
a Python from a virtualenv is active. When installing using setup.py,
the package is installed in the virtualenv.
Another advantage is the finer-grained control of dependencies as well as
automatic installation of them from PyPI.
Make setup.py a config file (setup.py.in) and use the version that comes
from autoconf.
Fix typo from previous patch ("built_sources =" to "built_sources +=")
|
When you next resync, you'll need to take out our manual dependency of numpy I've added here #983 . |
| author='Simon Newton', | ||
| author_email='nomis52@gmail.com', | ||
| description='OLA Python client bindings.', | ||
| license='GPL', |
There was a problem hiding this comment.
The note for this says the license should only be used when "the license is not a selection from the “License” Trove classifiers. See the Classifier field. Notice that there’s a licence distribution option which is deprecated but still acts as an alias for license.":
https://docs.python.org/2/distutils/setupscript.html#additional-meta-data
Either way, the client should be LGPL 2.1 or greater (rather than GPL):
https://github.com/OpenLightingProject/ola/blob/master/python/ola/OlaClient.py#L2-L4
There was a problem hiding this comment.
This is my first attempt at adding a setup.py to the Python code to make
it a proper package. My initial motivation was that I wanted to get the
Python libs to install to a virtualenv. With the current system, Python
files are installed to ${prefix}/lib/pythonX.Y/site-packages, even when
a Python from a virtualenv is active. When installing using setup.py,
the package is installed in the virtualenv.
Another advantage is the finer-grained control of dependencies as well as
automatic installation of them from PyPI.