Skip to content
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

Improve dh-virtualenv for securedrop-client #112

Merged
merged 2 commits into from
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion securedrop-client/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
dh $@ --with python-virtualenv

override_dh_virtualenv:
dh_virtualenv --python /usr/bin/python3 --setuptools -S --index-url https://dev-bin.ops.securedrop.org/simple --requirements build-requirements.txt
dh_virtualenv \
--python /usr/bin/python3 \
--setuptools \
--use-system-packages \
--index-url https://dev-bin.ops.securedrop.org/simple \
--extra-pip-arg "--ignore-installed" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good catch @rmol, we should def add these three extra pip args, --ignore-installed in particular

@kushaldas what do you think of this change?

--extra-pip-arg "--no-deps" \
--extra-pip-arg "--no-cache-dir" \
--requirements build-requirements.txt

override_dh_strip_nondeterminism:
find ./debian/ -type f -name '*.pyc' -delete
Expand Down
13 changes: 11 additions & 2 deletions securedrop-export/debian/rules
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#!/usr/bin/make -f

%:
dh $@ --with python-virtualenv --python /usr/bin/python3 --setuptools --index-url https://dev-bin.ops.securedrop.org/simple --requirements build-requirements.txt
dh $@ --with python-virtualenv

override_dh_virtualenv:
dh_virtualenv \
--python /usr/bin/python3 \
--setuptools \
--index-url https://dev-bin.ops.securedrop.org/simple \
--extra-pip-arg "--ignore-installed" \
--extra-pip-arg "--no-deps" \
--extra-pip-arg "--no-cache-dir" \
--requirements build-requirements.txt

override_dh_strip_nondeterminism:
find ./debian/ -type f -name '*.pyc' -delete
find ./debian/ -type f -name 'pip-selfcheck.json' -delete
find -type f -name RECORD -exec sed -i -e '/.*\.pyc.*/d' {} +
dh_strip_nondeterminism $@

13 changes: 11 additions & 2 deletions securedrop-proxy/debian/rules
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#!/usr/bin/make -f

%:
dh $@ --with python-virtualenv --python /usr/bin/python3 --setuptools --index-url https://dev-bin.ops.securedrop.org/simple --requirements build-requirements.txt
dh $@ --with python-virtualenv

override_dh_virtualenv:
dh_virtualenv \
--python /usr/bin/python3 \
--setuptools \
--index-url https://dev-bin.ops.securedrop.org/simple \
--extra-pip-arg "--ignore-installed" \
--extra-pip-arg "--no-deps" \
--extra-pip-arg "--no-cache-dir" \
--requirements build-requirements.txt

override_dh_strip_nondeterminism:
find ./debian/ -type f -name '*.pyc' -delete
find ./debian/ -type f -name 'pip-selfcheck.json' -delete
find -type f -name RECORD -exec sed -i -e '/.*\.pyc.*/d' {} +
dh_strip_nondeterminism $@