-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add pip builds #27
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
Conversation
cb79c0d
to
38551c7
Compare
pip install ${quotes-app-pip-deps}/libexec/deps/* | ||
|
||
# Install this project, skipping the deps we've just installed | ||
pip install --no-build-isolation --no-deps . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for reviewers: This --no-build-isolation
flag is required to prevent pip
from downloading a new copy of setuptools
for the build. It does that by default even if there's a copy of setuptools
in the environment.
source $out/libexec/venv/bin/activate | ||
|
||
# Download wheels/source-dists of all of the dependencies | ||
mkdir -p $out/libexec/deps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
mkdir -p $out/libexec/deps | |
mkdir -p $out/deps |
Is this only used by the pip install ${quotes-app-pip-deps}/libexec/deps/*
command? libexec
feels wrong to me. As this is only ever used by build.quotes-app-pip-pure
, do we even need to follow FHS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We recommend to users to use FHS, so I'm just following that convention.
# Prevent install being a noop when run from an existing activation that | ||
# already has the virtualenv and dependencies installed. | ||
unset VIRTUAL_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question nonblocking: how does VIRTUAL_ENV make it into the sandbox, and if it's not, can we drop this line for a pure build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this, I thought I was following the convention in the quotes-app-python
build but missed that it didn't unset the variable for the pure build.
@@ -0,0 +1,134 @@ | |||
version = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question nonblocking: do we want to rename quotes-app-python -> quotes-app-poetry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, but I'd also like it to be *-python-poetry
to be more descriptive.
In the impure step of the pure build, this uses the `pip download` command to download binary wheels and source distributions into the `$out/libexec/deps` directory. Then in the pure build we simply install everything in that directory.
38551c7
to
556df58
Compare
In the impure step of the pure build, this uses the
pip download
command to download binary wheels and source distributions into the$out/libexec/deps
directory. Then in the pure build we simply install everything in that directory.