itkach / slob

Data store for Aard 2
GNU General Public License v3.0
241 stars 32 forks source link

Distutils doesn't support entry points #14

Closed radioxoma closed 8 years ago

radioxoma commented 8 years ago

Recently I had been trying to package slob and xdxf2slob for Archlinux's AUR, but there is strange thing with setup.py script. It contains entry_points with console_scripts declaration (which is absolutely good), but distutils don't support that and corresponding "binary" in /usr/bin won't be created.

Please use setuptools. Even python 2 for windows ships with it now.

itkach commented 8 years ago

The strange thing is that if installed with pip it works as if setuptools is used - no warnings about unknown distribution option for install_requires and entry_points and entry point is created. Also no warnings about using distutils.

https://docs.python.org/3/library/distutils.html says:

The recommended pip installer runs all setup.py scripts with setuptools, even if the script itself only imports distutils.

That's an insidious way to put it. Looks like pip silently monkey patches distutils.core and replaces setup function with one from setuptools. What an unpythonic thing to do.

radioxoma commented 8 years ago

Archlinux AUR package can be installed now with yaourt -S python-slob-git Cheers!

itkach commented 8 years ago

Awesome :)