Badly behaving setup.py
See original GitHub issueChanging distribution metadata (such as install_requires
) in setup.py
according to some vague ideas on how (pip|setuptools|…) works is a horrid idea. More specifically, try this:
- Use
pip-tools
(version 1.9 or later) to compile the followingrequirements.in
on OSX:
ipython
- Note that
appnope
(only useful on OSX) is included in the resultingrequirements.txt
, without any environment markers - it should be only for:sys_platform == "darwin"
.
I’ll put together two PRs (one for master, the other for 5.x) that limits the insanity to old versions of pip (<6).
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Why you shouldn't invoke setup.py directly - Paul Ganssle
The only thing you must stop doing is directly executing the setup.py file — instead delegate that to purpose-built or standards-based tools, ...
Read more >ERROR: Can not execute `setup.py` since setuptools ... - GitHub
I am new to python and I am trying to install the email package, but it says "setuptools is not available in the...
Read more >Combine --user with --prefix error with setup.py install
Explanation: My workaround, which seems to work across many environments (MacOS, Amazon Linux, Debian) is to set the PYTHONUSERBASE environment ...
Read more >Knowledge Bits — Common Python Packaging Mistakes
Unless otherwise specified, references to packaging configurations assume that the project is using setuptools and that configuration is being ...
Read more >The terrible magic of setuptools - Rhodes Mill
The NLTK package's original setup.py, powered by the standard distutils, ... will suddenly behave differently when checked into Subversion; ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you have pip <6 anyway IPython will likely fails to install (mostly on python 2) as pi will download IPython 6 and try to install it while it’s not compatible. So I think that expecting users to have a recent pip is reasonable.
Happy to get a PR making things better though. Don’t spend too much time on a PR for 5.x if the PR for master does not conflict, our bot will be able to auto backport.
Thanks !
Yes, that would be reasonable, and in general reasonable to move away from setup.py to a
pyproject.toml
, but that might require some refactor of the directory structure. Any improvement/ simplification welcome.