-
Notifications
You must be signed in to change notification settings - Fork 9
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 piptools
as an alternative to pipenv
#437
Comments
Default
Default
|
Using BOYV
Install pip-tools:Because there are hashes in the file, /foo/bin/pip install -c requirements.txt --require-hashes pip-tools $(unwrap requirements.txt | grep ^pip-tools) #noqa There is now a pip tools helper function that will allow us to get the list of deps for pip-tools, and then we could use that to create a temp requirements file for just pip-tools, but I don't like that at all The other possibility it to have multiple requirements files broken up for the stages of install. E.g.
Requirements can be daisy chained this way, so that is supported. I do not know how resolution works in this chain. Hoping for the best Precompile difficult wheels:/foo/pip wheel "git+https://www.example.com/foo/bar@f32498723146984365987326589743#egg=packagename" \
--no-deps --no-build-isolation -w "/venv/wheels" This might have to be done by uploading the stage that compiles to wheel to a central location, and never updating it for that version. Or else every user who builds this will have a different sha for the exact same wheel (different timestamps/owners/other build artifacts that don't matter) Typically, when we do this, we tend to not put them in the virtual env tracker. It does not look like Installing from git/online tarballsWhile this creates a proper cached wheel, and works in pip-tools, as soon as you enable shas,
The following alternatives all fail to save a wheel in the cache, meaning it has to be recompiled every
The recommended way (based on the warnings) to get around the sha not being available, is to use a archive file.
However, neither of these options, allow for pip to use the wheel cache either. Note: The sha in the requirements.txt file is the sha of the archive, not the wheel. So the wheel can vary |
More notes
The proposed workaround will be:
This will contain the normal python dependencies. It will always include some version of `pip-tools`. Editable directories would probably go in here, it won't really matter.
|
Note:
|
The I think the method moving forward will be to remove extras from # Remove [] extras from the requirements.txt file
# - While these are important in setup.py/pyproject.toml/requirements.in
# I currently do not see a reason why we need this in requirements.txt
# after the resolver has run. This will alleviate half of the 8210 issue
# - Leave editables alone (any line that starts with -)
# - Adds the original line on the next line, commented out
sed -iE 's|(^[^-[][^[]*)(\[.*\])(==.*)|\1\3\n # &|' requirements.txt |
pip
andrequriements.txt
pip install -c requriements.txt
pip install -c requriements.txt
The text was updated successfully, but these errors were encountered: