-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add PEP 517/8 build backend and requirements specification #1565
Conversation
Both setuptools and wheels are not mandatory so I don't think this is worth it. |
@giampaolo I think you're mistaken here, please reconsider. There's two parallel things going on here so I'll detail:
You can find more details in https://www.bernat.tech/pep-517-and-python-packaging/ |
I'm gonna re-open and take a look at this later. Sorry I didn't know about this but want to understand it first before merging. |
Ping 👍 |
Any updates on this? |
@gaborbernat would there be an advantage to move classifiers, description, author, etc. from setup.py to pyproject.toml? Note: there's some info such as version which are calculated at runtime so they should stay in setup.py. I merged this PR because to my understanding with this in place There was a proposal some time ago: #1207 for adding a license to the wheel files. I wonder if adding |
Depends on the build backend. setuptools does not allow specifying options in pyproject.toml, only flit and poetry does. You could put stuff into setup.cfg though, in the spirit of declarative configuration over imperative. |
I would like to avoid adding yet another file to the root dir. I was already skeptical about adding pyproject.toml for this reason. |
If number of files is what concerns you, then you can modify contents of |
Summary: There's a bug for virtualenv installations using pip when pip version is `>=19.0.0` AND setuptools system package version is less than `40.8.0` (setuptools on VM we have is `33.1.1`) AND using `--system-site-packages` flag for virtualenv installation. (similarly described on: pypa/pip#6264). `lte` gateway python build passes but on `orc8r` module when trying to install egg link it fails with: ``` Installing egg link for orc8r /home/vagrant/build/python/bin/pip3 install -q -U --cache-dir ~/.pipcache -e .[dev] WARNING: orc8r 0.0.0 does not provide the extra 'dev' ... ImportError: No module named 'setuptools.build_meta' ``` Update: psutil recently added 'setuptools.build_meta' dependency on pyproject.toml file, this update fires the bug described above. giampaolo/psutil#1565 Reviewed By: andreilee Differential Revision: D18305887 fbshipit-source-id: 33858079dcc5eefba93c1ee3de9bae7cc7d9d147
I've made comments on both PRs. I think one is a python interpreter bug (maybe in pip?) and the other is an inappropriate usage, more details on the tickets themselves. 🤷♂ |
This seems relevant: Later on, Later on it seems there is a workaround: But I'm getting lost here. It seems some older version of pip (or setuptools? or both?) are affected, meaning with |
Also CC-ing @pfmoore here =) |
#1613 also seems related. |
Not sure what input is needed from me here. There's not enough information for me to diagnose what the problem is with this PR just from reading the comments, and I don't have a lot of spare time at the moment, so I can't try to reproduce the issue. |
I don't think removing pyproject.toml and effectively opting out from PEP-517/518 is a fix, but 🤷♂ It's more like switching to the recommended and going ahead supported path of python packaging tools exposed a few bad workflows for your users; so you decided to revert. The fixes should happen within the broken workflows/tools; not by not using the pyproject.toml IMHO. |
As far as I can see, the problem here is that you're still trying to support building with just pure At some point, changes to the packaging ecosystem (whether in pip, or in some other tool) will break distutils-only builds for you (if nothing else, at some point although not soon, pip will stop supporting the "legacy" direct I've opened pypa/packaging.python.org#667 to get the position on pure distutils projects clarified. |
I didn't know |
OK, if you're supporting systems that old, you may well have to handle things differently (pip itself hasn't supported Python 2.6 for quite some time now, so presumably your users on that environment are either using very old versions of pip, or running Under PEP 517, pip installs setuptools (or rather, the appropriate build tools whatever they are), yes, but only temporarily so that should not affect the final environment. I agree 100% that reverting to address user difficulties, and then looking at The problem with distutils, that setuptools solves (at least, the one you will care about) is that distutils won't be updated to support newer systems and standards. I don't honestly know how often something like a new compiler or OS quirk comes along that's only handled in setuptools, but as you're using setuptools if it's available and only using pure distutils as a fallback, this may not cause you problems. Ultimately, the issue you're facing here is that you support a wider range of systems and workflows than your build tools do. How you manage that is something you're going to have to figure out - and it's not urgent at this point but at some stage, you'll have to deal with it (tell your users the can't use newer versions of pip? drop support for Python 2.6?) I guess that's as much as I can say right now, but if you have any questions, ping me and I'll be happy to advise. |
Thanks a lot Paul. I have a better understanding now. I'll see you on python-dev. =) |
Direct usage of distutils is definitely deprecated, hence https://docs.python.org/3/library/distutils.html telling people to use setuptools instead, and https://docs.python.org/3/distutils/ saying outright that those docs are only sticking around until the setuptools documentation is complete unto itself, rather than assuming readers are also looking at the distutils documentation. Eventually pypa/packaging-problems#127 will be implemented, and |
Summary: There's a bug for virtualenv installations using pip when pip version is `>=19.0.0` AND setuptools system package version is less than `40.8.0` (setuptools on VM we have is `33.1.1`) AND using `--system-site-packages` flag for virtualenv installation. (similarly described on: pypa/pip#6264). `lte` gateway python build passes but on `orc8r` module when trying to install egg link it fails with: ``` Installing egg link for orc8r /home/vagrant/build/python/bin/pip3 install -q -U --cache-dir ~/.pipcache -e .[dev] WARNING: orc8r 0.0.0 does not provide the extra 'dev' ... ImportError: No module named 'setuptools.build_meta' ``` Update: psutil recently added 'setuptools.build_meta' dependency on pyproject.toml file, this update fires the bug described above. giampaolo/psutil#1565 Reviewed By: andreilee Differential Revision: D18305887 fbshipit-source-id: 33858079dcc5eefba93c1ee3de9bae7cc7d9d147
👍