cannot be installed via pip from pypi
abeluck opened this issue · 3 comments
pip apparently tries to call setup.py install with the --single-version-externally-managed option and that is causing potr's setup.py to fail
setuptools;__file__='/home/user/.pygp/build/python-potr/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-qOtAnE-record/install-record.txt --install-headers /home/user/.pygp/include/site/python2.7:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Command /home/user/.pygp/bin/python -c "import setuptools;__file__='/home/user/.pygp/build/python-potr/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-qOtAnE-record/install-record.txt --install-headers /home/user/.pygp/include/site/python2.7 failed with error code 1 in /home/user/.pygp/build/python-potr
Storing complete log in /home/user/.pip/pip.log
This issue was reported for several other python packages several years ago and was fixed in those packages. I tried to track down this changes, without luck.
Ok, so the reason this is happening is because potr is overriding distutils.command.install.install
in order to install the gaijm stuff separately from the potr libs. This is breaking the standard setuptools mojo pip relies on.
Wouldn't it be better if the gaijm plugin was separated out into another package? Or perhaps the gaijm plugin could be disabled by default unless an alternate build flag was passed?
Edit: Editing the import line in setup.py
fixes the install. But this isn't proper fix as the gaijm plugin is no longer available.
Wouldn't it be better if the gaijm plugin was separated out into another package?
I was specifically asked by some users to ship the plugin with python-otr.
Or perhaps the gaijm plugin could be disabled by default unless an alternate build flag was passed?
Don't think this is possible without custom install classes.
This pypi/pip stuff is really annoying. Considering to remove the listing again...
I'm using distutils, it's working fine. It's a distutils script. Why am I being forced to make it compatible to monkeypatching setuptools now?
Just so you know this also made packaging potr for Fedora/openSUSE much easier:
https://build.opensuse.org/package/show?package=python-potr&project=security%3Aguardianproject
Thanks!