question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Badly behaving setup.py

See original GitHub issue

Changing 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:

  1. Use pip-tools (version 1.9 or later) to compile the following requirements.in on OSX:
ipython
  1. Note that appnope (only useful on OSX) is included in the resulting requirements.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:open
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Carreaucommented, May 23, 2017

I’ll put together two PRs (one for master, the other for 5.x) that limits the insanity to old versions of pip (<6).

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 !

0reactions
Carreaucommented, Apr 27, 2021

Hi, I stumbled upon the issue with appnope and pip-tools and want to contribute. Would it be reasonable to add platform environment marker for each platform dependent package (pexpect, appnope, colorama) in both install_requires and extras_require? For example, ; sys_platform == "darwin" for appnope

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found