-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup.cfg vs setup.py #29
Comments
Why are two files (in different formats) necessary at all? Nodejs has just |
Mostly backwards compatibility - setup.py has been around since 1998, |
Strictly speaking setup.cfg has been around for as long as setup.py, and it was designed as a way to override build options for stuff. Then distutils2 came along and decided to shove everything in it, then distutils2 failed and now it's kind of half way between that and it's old role depending on if you use something like d2to1 or pbr. |
So it's fallout from the turbulent history of packaging middlewares. I understand how these things happen, but it is unfortunate; one would never design a system like this. That's why I'm enamoured with the Nodejs package manager npm--it's beautifully coherent. Publishing a package is so easy it makes me laugh. https://www.npmjs.org/doc/misc/npm-developers.html ps. Donald, I really like what you're doing here--I feel the discussion in the Python community has been too limited to the technical merits of different packaging libraries, to the neglect of user experience. Of course it was necessary to improve the tools, but that's not the be all and end all. We should aspire to bring the user experience to par with Ruby and Nodejs. |
Well it was designed for both setup.py and setup.cfg to exist side by side, but setup.cfg was mostly an override file. But yea, it's crazy how hard it is to do this stuff, and it'll get better. Until it does we have to put up with some bad (sometimes more bad than before while things get shaken up and settled back down). |
How de we account for other tools that have started to shove configuration into setup.cfg, like flake8 does? |
Not sure what you mean by account for, people will be able to include a setup.cfg, even if the tooling no longer uses it. |
That's what I meant yes. |
I'm going to move into this discussion this question pypa/twine#258 (comment) from @lrntct :
|
https://packaging.python.org/tutorials/distributing-packages/#initial-files has some guidance but could have more. |
I would also welcome clarification on how |
Historically,
|
A major problem is that Hence I think it should be moved away from in general whereever possible, in favour of other solutions without double-uses, like the new toml standard. |
Yeah, that's exactly the direction we're going. While this confusion will likely always exist for setuptools/distutils users for historical reasons, for future users we should reach a point where they only need pyproject.toml plus their preferred packaging tool's input format (e.g. "flit.ini" for folks using |
What should you do in setup.cfg vs what should you do in setup.py? This is made even more difficult to figure out by the distutils2 examples floating out there and projects like d2to1.
The text was updated successfully, but these errors were encountered: