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

Added -allow-unsafe flag to pip_compile in pip_tools.py #58

Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
python3 -m venv build/.env
source build/.env/bin/activate
cd build/awesome
pip install -U pip
pip install pip~=21.3 # TODO: Unpin version when pip-tools gets support >=22.0 (pip install -U pip)
pip install fabric invoke pip-tools
fab pip.compile
fab pip.sync
Expand Down
10 changes: 8 additions & 2 deletions {{ cookiecutter.project_slug }}/fabric_scripts/pip_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@
@task()
def pip_compile(ctx):
with ctx.cd(project_path("api")):
command_build = "pip-compile --upgrade --generate-hashes -o ./requirements-build.txt ./requirements-build.in"
command_dev = "pip-compile --upgrade --generate-hashes -o ./requirements-dev.txt ./requirements-dev.in"
# TODO: Remove "-allow-unsafe" flag in future versions of pip-tools (when will be enabled by default)
# https:/jazzband/pip-tools/#deprecations
command_build = (
"pip-compile --upgrade --allow-unsafe --generate-hashes -o ./requirements-build.txt ./requirements-build.in"
)
command_dev = (
"pip-compile --upgrade --allow-unsafe --generate-hashes -o ./requirements-dev.txt ./requirements-dev.in"
)
ctx.run(command_build, pty=True, replace_env=False)
ctx.run(command_dev, pty=True, replace_env=False)

Expand Down