Skip to content

Commit d48a1d5

Browse files
authored
Packaging: switch to pyproject.toml (#556)
1 parent eeed5ae commit d48a1d5

31 files changed

+339
-469
lines changed

.github/labeler.yml

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
11
bug:
2-
- head-branch:
3-
- ^fix
4-
- fix
5-
- ^hotfix
6-
- hotfix
2+
- head-branch:
3+
- ^fix
4+
- fix
5+
- ^hotfix
6+
- hotfix
77

88
ci-cd:
9-
- changed-files:
10-
- any-glob-to-any-file:
11-
- .github/**
9+
- changed-files:
10+
- any-glob-to-any-file:
11+
- .github/**
1212

1313
dependencies:
14-
- changed-files:
15-
- any-glob-to-any-file:
16-
- requirements/*.txt
17-
- requirements.txt
14+
- changed-files:
15+
- any-glob-to-any-file:
16+
- pyproject.toml
1817

1918
documentation:
20-
- changed-files:
21-
- any-glob-to-any-file:
22-
- "*.md"
23-
- docs/**
24-
- examples/**
25-
- requirements/documentation.txt
26-
- head-branch:
27-
- ^docs
28-
- documentation
19+
- changed-files:
20+
- any-glob-to-any-file:
21+
- "*.md"
22+
- docs/**
23+
- examples/**
24+
- scripts/*.ps1
25+
- head-branch:
26+
- ^docs
27+
- documentation
2928

3029
enhancement:
31-
- head-branch:
32-
- ^feature
33-
- feature
34-
- ^improve
35-
- improve
30+
- head-branch:
31+
- ^feature
32+
- feature
33+
- ^improve
34+
- improve
3635

3736
jobs:
38-
- changed-files:
39-
- any-glob-to-any-file:
40-
- qgis_deployment_toolbelt/jobs/**/*
37+
- changed-files:
38+
- any-glob-to-any-file:
39+
- qgis_deployment_toolbelt/jobs/**/*
4140

4241
packaging:
43-
- changed-files:
44-
- any-glob-to-any-file:
45-
- builder/**/*
46-
- Dockerfile
47-
- setup.py
48-
- .dockerignore
49-
- head-branch:
50-
- ^packaging
51-
- packaging
42+
- changed-files:
43+
- any-glob-to-any-file:
44+
- .dockerignore
45+
- builder/**/*
46+
- Dockerfile
47+
- pyproject.toml
48+
- .dockerignore
49+
- head-branch:
50+
- ^packaging
51+
- packaging
5252

5353
quality:
54-
- changed-files:
55-
- any-glob-to-any-file:
56-
- tests/**/*
54+
- changed-files:
55+
- any-glob-to-any-file:
56+
- tests/**/*
5757

5858
tooling:
59-
- changed-files:
60-
- any-glob-to-any-file:
61-
- ".*"
62-
- codecov.yml
63-
- setup.cfg
64-
- sonar-project.properties
65-
- .vscode/**/*
66-
- head-branch:
67-
- ^tooling
68-
- tooling
59+
- changed-files:
60+
- any-glob-to-any-file:
61+
- ".*"
62+
- codecov.yml
63+
- pyproject.toml
64+
- sonar-project.properties
65+
- .vscode/**/*
66+
- head-branch:
67+
- ^tooling
68+
- tooling

.github/workflows/build_release.yml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- ".github/workflows/build_release.yml"
1111
- "builder/**/*"
1212
- "qgis_deployment_toolbelt/**/*.py"
13+
- pyproject.toml
1314

1415
tags:
1516
- "*"
@@ -20,7 +21,7 @@ on:
2021
paths:
2122
- ".github/workflows/build_release.yml"
2223
- "builder/"
23-
- "requirements/packaging.txt"
24+
- pyproject.toml
2425

2526
# Globals
2627
env:
@@ -47,13 +48,12 @@ jobs:
4748
with:
4849
python-version: ${{ env.PYTHON_VERSION }}
4950
cache: "pip"
50-
cache-dependency-path: "requirements/*.txt"
51+
cache-dependency-path: pyproject.toml
5152

52-
- name: Install project requirements
53+
- name: Install Python requirements
5354
run: |
5455
python -m pip install -U pip setuptools wheel
55-
python -m pip install -U -r requirements.txt
56-
python -m pip install -U build
56+
python -m pip install -U build setuptools-scm
5757
5858
- name: Install project as a package
5959
run: python -m pip install -e .
@@ -87,16 +87,15 @@ jobs:
8787
with:
8888
python-version: ${{ env.PYTHON_VERSION }}
8989
cache: "pip"
90-
cache-dependency-path: "requirements/*.txt"
90+
cache-dependency-path: pyproject.toml
9191

92-
- name: Install project requirements
92+
- name: Install Python requirements
9393
run: |
9494
python -m pip install -U pip setuptools wheel
95-
python -m pip install -U -r requirements.txt
96-
python -m pip install -U -r requirements/packaging.txt
95+
9796
9897
- name: Install project as a package
99-
run: python -m pip install -e .
98+
run: python -m pip install -e .[packaging]
10099

101100
- name: Generates Executable
102101
run: python -O ./builder/pyinstaller_build_macos.py
@@ -122,16 +121,14 @@ jobs:
122121
with:
123122
python-version: ${{ env.PYTHON_VERSION }}
124123
cache: "pip"
125-
cache-dependency-path: "requirements/*.txt"
124+
cache-dependency-path: pyproject.toml
126125

127-
- name: Install project requirements
126+
- name: Install Python requirements
128127
run: |
129128
python -m pip install -U pip setuptools wheel
130-
python -m pip install -U -r requirements.txt
131-
python -m pip install -U -r requirements/packaging.txt
132129
133130
- name: Install project as a package
134-
run: python -m pip install -e .
131+
run: python -m pip install -e .[packaging]
135132

136133
- name: Generates Executable
137134
run: python -O ./builder/pyinstaller_build_ubuntu.py
@@ -157,16 +154,14 @@ jobs:
157154
with:
158155
python-version: ${{ env.PYTHON_VERSION }}
159156
cache: "pip"
160-
cache-dependency-path: "requirements/*.txt"
157+
cache-dependency-path: pyproject.toml
161158

162-
- name: Install project requirements
159+
- name: Install Python requirements
163160
run: |
164161
python -m pip install -U pip setuptools wheel
165-
python -m pip install -U -r requirements.txt
166-
python -m pip install -U -r requirements/packaging.txt
167162
168163
- name: Install project as a package
169-
run: python -m pip install -e .
164+
run: python -m pip install -e .[packaging]
170165

171166
- name: Generates MS Version Info
172167
run: python .\builder\version_info_templater.py

.github/workflows/documentation.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
- ".github/workflows/documentation.yml"
1818
- "docs/**/*"
1919
- "qgis_deployment_toolbelt/**/*.py"
20-
- requirements/documentation.txt
20+
- pyproject.toml
2121

2222
tags:
2323
- "*"
@@ -28,7 +28,6 @@ on:
2828
paths:
2929
- ".github/workflows/documentation.yml"
3030
- docs/**/*
31-
- requirements/documentation.txt
3231

3332
workflow_dispatch:
3433

@@ -51,12 +50,11 @@ jobs:
5150
with:
5251
python-version: ${{ env.PYTHON_VERSION }}
5352
cache: "pip"
54-
cache-dependency-path: "requirements/*.txt"
53+
cache-dependency-path: pyproject.toml
5554

5655
- name: Install project requirements
5756
run: |
5857
python -m pip install -U pip setuptools wheel
59-
python -m pip install -U -r requirements.txt
6058
6159
- name: Install project as a package
6260
run: python -m pip install -e .
@@ -77,8 +75,7 @@ jobs:
7775
7876
- name: Install documentation requirements
7977
run: |
80-
python -m pip install -U -r requirements/development.txt
81-
python -m pip install -U -r requirements/documentation.txt
78+
python -m pip install -U .[doc]
8279
8380
- name: Build doc using Sphinx
8481
env:

.github/workflows/lint.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/security.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,20 @@ on:
88
paths:
99
- ".github/workflows/security.yml"
1010
- "qgis_deployment_toolbelt"
11-
- "requirements/base.txt"
12-
- "requirements/security.txt"
11+
- pyproject.toml
1312

1413
pull_request:
1514
branches:
1615
- main
1716
paths:
1817
- ".github/workflows/security.yml"
1918
- "qgis_deployment_toolbelt"
20-
- "requirements/base.txt"
21-
- "requirements/security.txt"
19+
- pyproject.toml
2220

2321
# Globals
2422
env:
2523
PROJECT_FOLDER: "qgis_deployment_toolbelt"
26-
PYTHON_VERSION: "3.11"
24+
PYTHON_VERSION: "3.13"
2725

2826
# Sets permissions of the GITHUB_TOKEN
2927
permissions:
@@ -44,13 +42,13 @@ jobs:
4442
with:
4543
python-version: ${{ env.PYTHON_VERSION }}
4644
cache: "pip"
47-
cache-dependency-path: "requirements/security.txt"
45+
cache-dependency-path: pyproject.toml
4846

49-
- name: Install project requirements
47+
- name: Install Python requirements
5048
run: python -m pip install -U pip setuptools wheel
5149

5250
- name: Install security dependencies
53-
run: python -m pip install -U -r requirements/security.txt
51+
run: python -m pip install -U -e .[security]
5452

5553
- name: Run Bandit check
5654
run: bandit --configfile bandit.yaml --format screen -r qgis_deployment_toolbelt
@@ -68,13 +66,13 @@ jobs:
6866
with:
6967
python-version: ${{ env.PYTHON_VERSION }}
7068
cache: "pip"
71-
cache-dependency-path: "requirements/security.txt"
69+
cache-dependency-path: pyproject.toml
7270

7371
- name: Install project requirements
7472
run: python -m pip install -U pip setuptools wheel
7573

7674
- name: Install security dependencies
77-
run: python -m pip install -U -r requirements/security.txt
75+
run: python -m pip install -U -e .[security]
7876

7977
- name: Run Safety scan (pyupio)
8078
uses: pyupio/safety-action@v1

0 commit comments

Comments
 (0)