Skip to content

fix import statement setup.py, required because entry_points is used#78

Closed
boegel wants to merge 1 commit intoyarden:fastmisofrom
boegel:fastmiso
Closed

fix import statement setup.py, required because entry_points is used#78
boegel wants to merge 1 commit intoyarden:fastmisofrom
boegel:fastmiso

Conversation

@boegel
Copy link

@boegel boegel commented Jun 23, 2015

See https://chriswarrick.com/blog/2014/09/15/python-apps-the-right-way-entry_points-and-scripts/
The key part on that page is "You must use setuptools, otherwise this won’t work."

Without this trivial patch, installing MISO using "python setup.py install" doesn't work, i.e. no scripts are being installed to the bin subdirectory.

@yarden
Copy link
Owner

yarden commented Jun 27, 2015

Thank you so much for this, I'm looking into it. Seems like another reason why python packaging is a horrendous monstrosity.

One thing I don't understand is why installation seems to work with pip and easy_install (see Travis CI with Python 2.7: https://travis-ci.org/yarden/MISO). This is how I install MISO since as far as I understand, python setup.py install is deprecated and package managers should do the work. Do you know why pip/easy_install don't seem to require this change?

Thanks, Yarden

@bmcgough
Copy link

See https://pip.pypa.io/en/stable/reference/pip/#setuptools-injection

PIP overrides distutils with setuptools.

The reason this is important is that other build mechanisms (like EasyBuild) do not override, and currently the entry_points are missing from those builds.

@bmcgough
Copy link

Also, install_requires is a setuptools directive and ignored by distutils, so builds finish successfully w/o dependencies.

@yarden
Copy link
Owner

yarden commented Jan 29, 2016

Thanks for this. The reason I haven't incorporated it yet (apart from lack of time) is that it's unclear to me whether setuptools's Extension is identical to distutils's -- and I am worried that they will behave differently with respect to building external libraries. Is there a known difference between the two or is it supposed to work?

@boegel
Copy link
Author

boegel commented Feb 4, 2016

@yarden: setuptools is like distutils on steroids^2; it does a lot more, and is (in my experience) not to be trusted with being compatible with distutils (it even does nasty stuff like monkey patching distutils)

I'm afraid using setuptools is the only way forward though...

@yarden
Copy link
Owner

yarden commented May 19, 2016

This should be fixed now.

@yarden yarden closed this May 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants