Skip to content

Commit effbcfa

Browse files
author
Mr. Test
committed
Move pip-compile settings into pyproject.toml and add piwheels hashes
Relates to: * piwheels/packages#473 * jazzband/pip-tools#1536 * jedie/victron-ble2mqtt#13
1 parent 935485b commit effbcfa

File tree

8 files changed

+510
-304
lines changed

8 files changed

+510
-304
lines changed

generated_templates/piptools-python/your_cool_package/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ dev = [
4747
'backports.tarfile', # via jaraco-context -> keyring -> twine
4848
]
4949

50+
[tool.pip-tools.compile]
51+
index-url="https://pypi.org/simple"
52+
extra-index-url=["https://www.piwheels.org/simple"] # Add hashes of piwheels packages, too!
53+
generate-hashes = true
54+
# https://pip-tools.readthedocs.io/en/stable/#deprecations
55+
allow-unsafe = true
56+
resolver="backtracking"
57+
strip-extras = true
58+
5059
[project.urls]
5160
Documentation = "https://github.com/john-doh/your_cool_package"
5261
Source = "https://github.com/john-doh/your_cool_package"

generated_templates/piptools-python/your_cool_package/requirements.dev.txt

Lines changed: 227 additions & 136 deletions
Large diffs are not rendered by default.

generated_templates/piptools-python/your_cool_package/requirements.txt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,27 @@
44
#
55
# ./dev-cli.py update
66
#
7+
--extra-index-url https://www.piwheels.org/simple
8+
79
async-timeout==4.0.3 \
810
--hash=sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f \
9-
--hash=sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028
11+
--hash=sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028 \
12+
--hash=sha256:fd893e4cb1d9dff66d0e0576cc6376a23eacbbcd43b6607e4d3ecfae1ab15367
1013
# via cli-base-utilities
11-
bx-py-utils==101 \
12-
--hash=sha256:2aa295cde55da99b77f5f2f8b5bf8c0bec7e0046511832989ecbb1a43183cf75 \
13-
--hash=sha256:eece1f0b1e3c091d38f3013984056b05f43c6a0fd716489cf337d89df802ab59
14+
bx-py-utils==102 \
15+
--hash=sha256:367d2bde9c7f2bf750f55748d4832daaf9df73e753b5efb351ec1a3899cc5d80 \
16+
--hash=sha256:6d131d40394b477de715169e80067a0ab4891c8f04afd33fbd7ca00e2faf21ae \
17+
--hash=sha256:961a0abf31b512f72c1473a4d115096b0c5becd32d08338ac62adbf5b217b680
1418
# via
1519
# cli-base-utilities
1620
# your_cool_package (pyproject.toml)
1721
cli-base-utilities==0.11.0 \
22+
--hash=sha256:22c01bffece11781db0cba2110e9bf721361d50fb8a877bd251422ebaf3daee9 \
1823
--hash=sha256:2c674f3af4898f97d101f6687fb45e85a4b996b93fb9a155a29b4daaf302dc43 \
1924
--hash=sha256:fc503f8df7e19653167ebd12551718aa0c114114b959f177be2092eab1ce1b11
2025
# via your_cool_package (pyproject.toml)
2126
click==8.1.7 \
27+
--hash=sha256:8e38806544348fdafedd47e92e90aca882377a0680918dec4c80c225a0e5ed13 \
2228
--hash=sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28 \
2329
--hash=sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de
2430
# via
@@ -27,6 +33,7 @@ click==8.1.7 \
2733
# your_cool_package (pyproject.toml)
2834
markdown-it-py==3.0.0 \
2935
--hash=sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 \
36+
--hash=sha256:6d00561ef69282f31c923e5520f8f7025f6c2bbd1d7796f3d730840cc54130a6 \
3037
--hash=sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb
3138
# via rich
3239
mdurl==0.1.2 \
@@ -35,6 +42,7 @@ mdurl==0.1.2 \
3542
# via markdown-it-py
3643
packaging==24.1 \
3744
--hash=sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002 \
45+
--hash=sha256:270c5ae91ef4184b318179b819b2e4420e8f41246d05334899bc9dfc30c80cac \
3846
--hash=sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124
3947
# via cli-base-utilities
4048
pygments==2.18.0 \
@@ -43,18 +51,20 @@ pygments==2.18.0 \
4351
# via rich
4452
python-dateutil==2.9.0.post0 \
4553
--hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \
54+
--hash=sha256:5d23f9d7e398684c7dac22b46a93fb71de568cfdcd004512f7072819e41ef54c \
4655
--hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427
4756
# via cli-base-utilities
48-
rich==13.8.0 \
49-
--hash=sha256:2e85306a063b9492dffc86278197a60cbece75bcb766022f3436f567cae11bdc \
50-
--hash=sha256:a5ac1f1cd448ade0d59cc3356f7db7a7ccda2c8cbae9c7a90c28ff463d3e91f4
57+
rich==13.8.1 \
58+
--hash=sha256:1760a3c0848469b97b558fc61c85233e3dafb69c7a071b4d60c38099d3cd4c06 \
59+
--hash=sha256:8260cda28e3db6bf04d2d1ef4dbc03ba80a824c88b0e7668a0f23126a424844a
5160
# via
5261
# cli-base-utilities
5362
# rich-click
5463
# your_cool_package (pyproject.toml)
5564
rich-click==1.8.3 \
5665
--hash=sha256:636d9c040d31c5eee242201b5bf4f2d358bfae4db14bb22ec1cafa717cfd02cd \
57-
--hash=sha256:6d75bdfa7aa9ed2c467789a0688bc6da23fbe3a143e19aa6ad3f8bac113d2ab3
66+
--hash=sha256:6d75bdfa7aa9ed2c467789a0688bc6da23fbe3a143e19aa6ad3f8bac113d2ab3 \
67+
--hash=sha256:ef50d4087a5a4f1e7fcee7972f78775e9b33c0709a86dc10f9f5b929ba4d51b8
5868
# via
5969
# cli-base-utilities
6070
# your_cool_package (pyproject.toml)

generated_templates/piptools-python/your_cool_package/your_cool_package/cli_dev/packaging.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,7 @@ def update():
4343
CUSTOM_COMPILE_COMMAND='./dev-cli.py update',
4444
)
4545

46-
pip_compile_base = [
47-
bin_path / 'pip-compile',
48-
'--verbose',
49-
'--allow-unsafe', # https://pip-tools.readthedocs.io/en/latest/#deprecations
50-
'--resolver=backtracking', # https://pip-tools.readthedocs.io/en/latest/#deprecations
51-
'--upgrade',
52-
'--generate-hashes',
53-
]
46+
pip_compile_base = [bin_path / 'pip-compile', '--verbose', '--upgrade']
5447

5548
# Only "prod" dependencies:
5649
verbose_check_call(

piptools-python/{{ cookiecutter.package_name }}/pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ dev = [
4747
'backports.tarfile', # via jaraco-context -> keyring -> twine
4848
]
4949

50+
[tool.pip-tools.compile]
51+
index-url="https://pypi.org/simple"
52+
extra-index-url=["https://www.piwheels.org/simple"] # Add hashes of piwheels packages, too!
53+
generate-hashes = true
54+
# https://pip-tools.readthedocs.io/en/stable/#deprecations
55+
allow-unsafe = true
56+
resolver="backtracking"
57+
strip-extras = true
58+
5059
[project.urls]
5160
Documentation = "{{ cookiecutter.package_url }}"
5261
Source = "{{ cookiecutter.package_url }}"

0 commit comments

Comments
 (0)