Skip to content

Add a setup.py, use it to install Python libs#772

Open
simark wants to merge 5 commits intoOpenLightingProject:masterfrom
simark:python_setup
Open

Add a setup.py, use it to install Python libs#772
simark wants to merge 5 commits intoOpenLightingProject:masterfrom
simark:python_setup

Conversation

@simark
Copy link
Copy Markdown
Contributor

@simark simark commented Jun 7, 2015

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.

Comment thread python/setup.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we generate this from configure please so the version updates automatically.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes of course, good catch.

@simark simark force-pushed the python_setup branch 5 times, most recently from b6e5d77 to 362b380 Compare June 7, 2015 22:57
@simark simark closed this Jun 7, 2015
@simark simark reopened this Jun 7, 2015
Simon Marchi and others added 2 commits June 7, 2015 19:01
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 +=")
Comment thread configure.ac
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SPaG ola

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@peternewman
Copy link
Copy Markdown
Member

When you next resync, you'll need to take out our manual dependency of numpy I've added here #983 .

Comment thread python/setup.py.in
author='Simon Newton',
author_email='nomis52@gmail.com',
description='OLA Python client bindings.',
license='GPL',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peternewman peternewman added this to the 0.future milestone Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants