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.

let me use setup_requires somehow so I can have abstractions in setup.py

See original GitHub issue

The recommended mechanism for determining a project’s version at setup time is completely ridiculous, and determining your own version is far from the most complicated thing that one might wish to do at setup / build time.

For years, I’ve wanted to write some abstractions for Twisted plugin developers to be able to properly install plugins without hand-crafting a solution in every single setup.py, and for years we’ve been stymied by the lack of any mechanism for setup.py itself to depend upon or import things.

The setup_requires field ostensibly solves this problem, except for the fact that it doesn’t actually work. I can’t figure out why it doesn’t work, really, or how you’re actually supposed to use it. It appears to invoke easy_install? It also appears to install the dependencies multiple times, but also not re-run setup.py to get correct information after they’ve been installed.

In the meanwhile, should I be looking to create a tool which, instead, generates a setup.py automatically?

(This is probably actually a distutils or setuptools bug, but I couldn’t figure out which of the 9 bug trackers those projects have variously used in their forks and external maintenance and suchlike to use. But there’s also some involvement from pip here, like, what the heck is going on with the easy_installed eggs of things I have perfectly good wheels of in my cache already…)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:24 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
dstufftcommented, May 14, 2014

Right, the imports themselves will work, but you can’t use those imports to pass anything into the setup() function. So it’s not generally useful.

0reactions
dstufftcommented, Mar 24, 2017

Closing this as a duplicate of #3691, which is the mechanism we will use to support this feature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Practical Guide to Using Setup.py - GoDataDriven
Extras-require. Sometimes you may have dependencies that are only required in certain situations. As a data scientist. I often make packages ...
Read more >
setup_requires with Cython? - python - Stack Overflow
Starting from 18.0 release of setuptools (released on 2015-06-23) it is possible to specify Cython in setup_requires and pass *.pyx modules ...
Read more >
setuptools - Paul Ganssle
One major problem with this approach, though, is that every Python package must use distutils and only distutils — there was no standard...
Read more >
The problem with packaging in Python | ionel's codelog
Packaging is currently too hard in Python, and while there's effort to improve it, it's still largely focused on the problem of installing....
Read more >
requirements.txt vs setup.py in Python - Towards Data Science
cfg and setup.py ) and how they can be used along with requirements file in order to make package development and redistribution easier....
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