-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Python: deprecate format and default to pyproject #253154
Comments
cc the python team: @FRidh @mweinelt @jonringer @tjni |
Yes, we should get rid of format, and this way forward sounds good. Although, I'd prefer if we right away consider also #170577 as that helps flattening our dependency tree, especially now since CA-derivations are well under way.
We no longer use pip during build/install. |
A good chance to get rid of I actually have a half decent pr to that end which I've yet to push. The only major blocker is the list of overrides defined by poetry2nix, which is massive. |
step 1: #254136 |
I'd like us to remove format flit as soon as possible. |
|
So |
Yes, |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
Would it make sense to be able to point to the
Hopefully most derivation definitions could be dramatically simplified. |
That would mean vendoring the |
Long term we should move everything over to `pyproject = true`, but in the mean time we can work towards deprecating the implicit `format` paremeter. cc NixOS#253154 cc @mweinelt @figsoda
Long term we should move everything over to `pyproject = true`, but in the mean time we can work towards deprecating the implicit `format` paremeter. cc NixOS/nixpkgs#253154 cc @mweinelt @figsoda
This comment was marked as outdated.
This comment was marked as outdated.
I'm not sure what to do with Should we set |
I think going for a boolean |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Maybe so. However, I think it is a good idea to provide information about the hooks so that users can use them, not just for wheels. |
Incorporates: - NixOS/nixpkgs#271597 - NixOS/nixpkgs#253154 Closes #130
Incorporates: - NixOS/nixpkgs#271597 - NixOS/nixpkgs#253154 Closes #130
I am trying to package some python libs right now, so what is now the consensus? IMHO the |
I disagree. Supporting every format is just a maintenance burden especially if there is no real world usecase for it. Close to every package can use pyproject = true and the 2% other packages can use format other. Also egg is very old, deprecated and replaced by wheel. |
Motivation
Since the introduction of PEP 518 and some following PEPs that expands on the idea, the
pyproject.toml
format has gained a lot of adoption and became the de facto format for python packages.However, a more popular option, and the current default format in nixpkgs is
setuptools
. Luckily, we might still be able to build these packages withformat = "pyproject"
becausepyproject.toml
falls back to usingsetuptools
as its build backend as documented by pypa even if the package doesn't have apyproject.toml
. This might actually be preferred, because I ran into issues withformat = "setuptools"
when trying to package asetup.py
package.Proposal
I am proposing to deprecate the
format
option and replacing it with apyproject
option for packages that don't work with pyproject. We can do this over a longer period of time:pyproject
option that conflicts with the existingformat
option, wheretrue
is equivalent toformat = "pyproject"
andfalse
is equivalent toformat = "other"
pyproject
option instead offormat
format = "setuptools"
andformat = "pyproject"
topyproject = true
and the rest topyproject = false
format
with a warning and make the default behaviorpyproject = true
(instead offormat = "setuptools"
)pyproject = true
s, as this is now the defaultformat
option altogetherRelated Issues
format = "setuptools";
as default #124051The text was updated successfully, but these errors were encountered: