-
Notifications
You must be signed in to change notification settings - Fork 12
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
Change filename of wheel with build number based on length of changelog #318
Comments
@dhellmann I am not sure if we can implement this without changing the resolver code. I have been playing around with resolvelib and if there are 2 distributions of the same version with different build tag then it takes the one that appears first. Not sure how to enforce it to take the latest one. If we can't get the latest one then the caller won't be able to figure out the latest build tag from the url I tried passing something like |
Is resolvelib picking the file or is that something we're doing in the candidate selection code in fromager? I'm OK with changing the resolver code to make sure we get the latest file, I just didn't want to force the resolver to have to know how to pick something with a build tag that wasn't the latest just for the optimization case of seeing if we already had that package. We aren't going to rebuild something with an old build tag, we would build it again with a new tag. |
It is picking with the help of the candidate selection code in fromager. So the first thing that satisfies the requirements and constraints is picked up |
OK, so it sounds like we need to teach our candidate selection code about build numbers. |
@tiran @dhellmann how should i go about adding build tags. I am not able to find anything within the I saw another tool called Or i can use a regex to reconstruct the wheel filename |
I think I found the correct options |
As far as I know, the option is specific to the build backend. It works for setuptools but it may not work for flit, hatch, or maturin backends. We should look into python3 -m build -w -C='--build-option=--build-number=999'
Wheel and build even include the build number in the package's dist-infi
References: |
What is the difference between |
The config settings and build options don't work reliable for me. I have another idea:
This works for any wheel, even external wheels. |
If we can use the For changing the metadata I will keep this in mind for #319 |
Ran a test to see if pip command: (venv) $pip install -i http://localhost:8080/simple stevedore
Looking in indexes: http://localhost:8080/simple
Collecting stevedore
Downloading http://localhost:8080/simple/stevedore/stevedore-5.2.0-2-py3-none-any.whl (48 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.6/48.6 kB 395.1 MB/s eta 0:00:00
Collecting pbr!=2.1.0,>=2.0.0 (from stevedore)
Downloading http://localhost:8080/simple/pbr/pbr-6.0.0-0-py2.py3-none-any.whl (105 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 105.1/105.1 kB 379.4 MB/s eta 0:00:00
Installing collected packages: pbr, stevedore
Successfully installed pbr-6.0.0 stevedore-5.2.0
[notice] A new release of pip is available: 24.1 -> 24.2
[notice] To update, run: pip install --upgrade pip Contents of WHEEL file:
Looks like we can go ahead with building wheels this way |
We can move to the public API instead of using the |
How should we go about handling the case where the user has removed an entry from the changelog and the build tag in the url returned from the resolver is higher than what is expected Options:
Probably replicating the rpm behaviour would be the best option (not sure what that is though) |
I like the idea of just incrementing the number again, but I worry that might lead to unintended side-effects, so let's think about it some more before going with that. |
The text was updated successfully, but these errors were encountered: