Skip to content

Require hashes and wheels for dependencies #248

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

Open
wants to merge 6 commits into
base: unstable/v1
Choose a base branch
from
Open
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: 6 additions & 4 deletions .github/workflows/self-smoke-test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ jobs:
uses: actions/checkout@v3
with:
path: test
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install the packaging-related tools
run: python3 -m pip install build twine
env:
PIP_CONSTRAINT: test/requirements/runtime.txt
run: python3 -m pip install -r test/requirements/test.txt
- name: Create the stub package importable directory
run: mkdir -pv src/test_package
- name: Populate the stub package `__init__.py`
Expand All @@ -61,7 +63,7 @@ jobs:
CONTENTS: |
[build-system]
requires = [
"setuptools == 65.6.3",
"setuptools == 70.3.0",
]
build-backend = "setuptools.build_meta"

Expand Down
1 change: 1 addition & 0 deletions .pip-tools.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
allow-unsafe = true
resolver = "backtracking"
strip-extras = true
generate-hashes = true
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ ENV PYTHONPATH "/root/.local/lib/python3.12/site-packages"

COPY requirements requirements
RUN \
PIP_CONSTRAINT=requirements/runtime-prerequisites.txt \
pip install --user --upgrade --no-cache-dir \
-r requirements/runtime-prerequisites.in && \
PIP_CONSTRAINT=requirements/runtime.txt \
pip install --user --upgrade --no-cache-dir --prefer-binary \
-r requirements/runtime.in
pip install --user --upgrade --no-cache-dir \
-r requirements/runtime-prerequisites.txt && \
pip install --user --upgrade --no-cache-dir --prefer-binary \
-r requirements/runtime.txt

WORKDIR /app
COPY LICENSE.md .
Expand Down
2 changes: 2 additions & 0 deletions requirements/runtime-prerequisites.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
--only-binary=:all:

pip-with-requires-python
10 changes: 7 additions & 3 deletions requirements/runtime-prerequisites.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --allow-unsafe --config=../.pip-tools.toml --output-file=runtime-prerequisites.txt --strip-extras runtime-prerequisites.in
# pip-compile --allow-unsafe --config=../.pip-tools.toml --generate-hashes --output-file=runtime-prerequisites.txt --strip-extras runtime-prerequisites.in
#
pip-with-requires-python==1.0.1
--only-binary :all:

pip-with-requires-python==1.0.1 \
--hash=sha256:1d7dd1e498704b9de379e9e081acdd7ed28268af5f9f54b3367af05e7d2a7457
# via -r runtime-prerequisites.in

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
pip==24.0 \
--hash=sha256:ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc
# via pip-with-requires-python
2 changes: 2 additions & 0 deletions requirements/runtime.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--only-binary=:all:

twine

# NOTE: Used to detect an ambient OIDC credential for OIDC publishing.
Expand Down
364 changes: 335 additions & 29 deletions requirements/runtime.txt

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions requirements/test.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--only-binary=:all:
--constraint runtime.txt

twine
build
344 changes: 344 additions & 0 deletions requirements/test.txt

Large diffs are not rendered by default.

Loading