File tree Expand file tree Collapse file tree 7 files changed +5
-31
lines changed
Expand file tree Collapse file tree 7 files changed +5
-31
lines changed Original file line number Diff line number Diff line change 3232 - uses : actions/cache@v3
3333 with :
3434 path : ~/.cache/pip
35- # This is like the example but we use ``*requirements.txt`` rather
36- # than ``requirements.txt`` because we have multiple requirements
37- # files.
38- key : ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
35+ key : ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
3936 restore-keys : |
4037 ${{ runner.os }}-pip-
4138
Original file line number Diff line number Diff line change 3232 - uses : actions/cache@v3
3333 with :
3434 path : ~\AppData\Local\pip\Cache
35- # This is like the example but we use ``*requirements.txt`` rather
36- # than ``requirements.txt`` because we have multiple requirements
37- # files.
38- key : ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt') }}
35+ key : ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
3936 restore-keys : |
4037 ${{ runner.os }}-pip-
4138
Original file line number Diff line number Diff line change 11include src/vws/py.typed
2- include requirements/*.txt
32include pyproject.toml
Original file line number Diff line number Diff line change @@ -32,10 +32,12 @@ fix-ruff:
3232
3333.PHONY : pip-extra-reqs
3434pip-extra-reqs :
35+ pdm export --pyproject > requirements/requirements.txt
3536 pip-extra-reqs --requirements-file=requirements/requirements.txt src/
3637
3738.PHONY : pip-missing-reqs
3839pip-missing-reqs :
40+ pdm export --pyproject > requirements/requirements.txt
3941 pip-missing-reqs --requirements-file=requirements/requirements.txt src/
4042
4143.PHONY : pylint
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ dodgy==0.2.1 # Look for uploaded secrets
1111freezegun == 1.2.2
1212furo == 2022.12.7
1313mypy == 1.1.1 # Type checking
14+ pdm == 2.4.8
1415pip_check_reqs == 2.4.4
1516pydocstyle == 6.3.0 # Lint docstrings
1617pyenchant == 3.2.2 # Bindings for a spellchecking sytem
@@ -24,5 +25,4 @@ sphinx-prompt==1.5.0
2425sphinxcontrib-spelling == 8.0.0
2526types-freezegun == 1.1.10
2627types-requests == 2.28.11.15
27- types-setuptools == 67.6.0.0
2828vulture == 2.7
Original file line number Diff line number Diff line change 11"""Setup script for VWS Python, a wrapper for Vuforia's Web Services APIs."""
22
3- from pathlib import Path
4-
53from setuptools import setup
64
7-
8- def _get_dependencies (requirements_file : Path ) -> list [str ]:
9- """
10- Return requirements from a requirements file.
11-
12- This expects a requirements file with no ``--find-links`` lines.
13- """
14- lines = requirements_file .read_text ().strip ().split ("\n " )
15- return [line for line in lines if not line .startswith ("#" )]
16-
17-
18- DEV_REQUIRES = _get_dependencies (
19- requirements_file = Path ("requirements/dev-requirements.txt" ),
20- )
21-
22- SETUP_REQUIRES = _get_dependencies (
23- requirements_file = Path ("requirements/setup-requirements.txt" ),
24- )
25-
265setup (
276 setup_requires = SETUP_REQUIRES ,
287 extras_require = {"dev" : DEV_REQUIRES },
You can’t perform that action at this time.
0 commit comments