Skip to content

Commit e255f45

Browse files
committed
Move from requirements.txt to dependency groups
1 parent debc9e8 commit e255f45

12 files changed

Lines changed: 40 additions & 34 deletions

.github/workflows/build_wheels.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
- name: Install Python dependencies
107107
run: |
108108
python3 -m pip install --upgrade pip
109-
python3 -m pip install -r requirements-test.txt
109+
python3 -m pip install --group test
110110
python3 -m pip install --no-index --find-links=dist/ --only-binary=pystack pystack
111111
- name: Disable ptrace security restrictions
112112
run: |
@@ -141,7 +141,7 @@ jobs:
141141
sudo apt-get install -qy gdb
142142
- name: Install Python dependencies
143143
run: |
144-
uv pip install -r requirements-test.txt
144+
uv pip install --group test
145145
uv pip install --no-index --find-links=dist/ --only-binary=pystack pystack
146146
- name: Disable ptrace security restrictions
147147
run: |
@@ -176,7 +176,7 @@ jobs:
176176
- name: Install Python dependencies
177177
run: |
178178
python${{matrix.python_version}} -m pip install --upgrade pip
179-
python${{matrix.python_version}} -m pip install -r requirements-test.txt
179+
python${{matrix.python_version}} -m pip install --group test
180180
python${{matrix.python_version}} -m pip install --no-index --find-links=dist/ --only-binary=pystack pystack
181181
- name: Disable ptrace security restrictions
182182
run: |
@@ -214,7 +214,7 @@ jobs:
214214
- name: Install Python dependencies
215215
run: |
216216
python${{matrix.python_version}} -m pip install --upgrade pip
217-
python${{matrix.python_version}} -m pip install -r requirements-test.txt
217+
python${{matrix.python_version}} -m pip install --group test
218218
python${{matrix.python_version}} -m pip install --no-index --find-links=dist/ --only-binary=pystack pystack
219219
- name: Disable ptrace security restrictions
220220
run: |
@@ -253,7 +253,7 @@ jobs:
253253
- name: Install Python dependencies
254254
run: |
255255
python${{matrix.python_version}} -m pip install --upgrade pip
256-
python${{matrix.python_version}} -m pip install -r requirements-test.txt
256+
python${{matrix.python_version}} -m pip install --group test
257257
python${{matrix.python_version}} -m pip install --no-index --find-links=dist/ --only-binary=pystack pystack
258258
- name: Install setuptools for the free-threading version
259259
run: |
@@ -290,7 +290,7 @@ jobs:
290290
run: |
291291
python3 -m venv venv
292292
venv/bin/python3 -m pip install --upgrade pip
293-
venv/bin/python3 -m pip install -r requirements-test.txt
293+
venv/bin/python3 -m pip install --group test
294294
venv/bin/python3 -m pip install --no-index --find-links=dist/ --only-binary=pystack pystack
295295
- name: Run pytest
296296
env:
@@ -326,7 +326,7 @@ jobs:
326326
- name: Install Python dependencies
327327
run: |
328328
python3 -m pip install --upgrade pip
329-
python3 -m pip install -r requirements-test.txt
329+
python3 -m pip install --group test
330330
python3 -m pip install --no-index --find-links=dist/ --only-binary=pystack pystack
331331
- name: Run pytest
332332
env:
@@ -364,7 +364,7 @@ jobs:
364364
run: |
365365
python -m venv venv
366366
venv/bin/python -m pip install --upgrade pip
367-
venv/bin/python -m pip install -r requirements-test.txt
367+
venv/bin/python -m pip install --group test
368368
venv/bin/python -m pip install --no-index --find-links=dist/ --only-binary=pystack pystack
369369
- name: Run pytest
370370
env:
@@ -402,7 +402,7 @@ jobs:
402402
run: |
403403
python3 -m venv venv
404404
venv/bin/python3 -m pip install --upgrade pip
405-
venv/bin/python3 -m pip install -r requirements-test.txt
405+
venv/bin/python3 -m pip install --group test
406406
venv/bin/python3 -m pip install --no-index --find-links=dist/ --only-binary=pystack pystack
407407
- name: Run pytest
408408
env:

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Install Python dependencies
4848
run: |
4949
python3 -m pip install --upgrade pip scikit-build-core nanobind
50-
python3 -m pip install -e . -r requirements-test.txt
50+
python3 -m pip install -e . --group test
5151
- name: Disable ptrace security restrictions
5252
run: |
5353
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
sudo apt-get install -qy libdw-dev libelf-dev pkg-config
2525
- name: Install Python dependencies
2626
run: |
27-
python3 -m pip install -r requirements-extra.txt
27+
python3 -m pip install --group extra
2828
- name: Install Package
2929
run: |
3030
python3 -m pip install -e .

.github/workflows/lint_and_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
sudo apt-get install -qy libdw-dev libelf-dev
1717
- name: Install Python dependencies
1818
run: |
19-
python3 -m pip install -r requirements-extra.txt
19+
python3 -m pip install --group extra
2020
- name: Install Package
2121
run: |
2222
python3 -m pip install -e .

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ easier to validate it.
6464
Before commiting anything, install the pre-commit hooks:
6565

6666
```shell
67-
python3 -m pip install -r requirements-extra.txt
67+
python3 -m pip install --group extra
6868
pre-commit install
6969
```
7070

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ ENV PYTHON=python3.12 \
9393
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
9494

9595
# Copy the required files
96-
COPY ["requirements-test.txt", "requirements-extra.txt", "requirements-docs.txt", "/tmp/"]
96+
COPY pyproject.toml /tmp/
9797

9898
# Install Python packages
9999
RUN $PYTHON -m venv $VIRTUAL_ENV \
100100
&& pip install -U pip wheel setuptools cython pkgconfig \
101-
&& pip install -U -r /tmp/requirements-test.txt -r /tmp/requirements-extra.txt
101+
&& pip install -U --group "/tmp/pyproject.toml:test" --group "/tmp/pyproject.toml:extra"
102102

103103
# Set the working directory
104104
WORKDIR /src

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ exclude CONTRIBUTING.md
33
exclude Dockerfile
44
exclude src/pystack/*.cpp
55
exclude src/pystack/*.h
6-
exclude requirements-*.txt
76
exclude tox.ini
87
exclude valgrind.supp
98

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ cd pystack
8484
python3 -m venv ../pystack-env/ # just an example, put this wherever you want
8585
source ../pystack-env/bin/activate
8686
python3 -m pip install --upgrade pip
87-
python3 -m pip install -e .
88-
python3 -m pip install -r requirements-test.txt -r requirements-extra.txt
87+
python3 -m pip install -e . --group test --group extra
8988
```
9089

9190
This will install PyStack in the virtual environment in development mode (the `-e` of the last

pyproject.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,30 @@ classifiers = [
2626
"Topic :: Software Development :: Debuggers",
2727
]
2828

29+
[dependency-groups]
30+
docs = [
31+
"recommonmark",
32+
"sphinx",
33+
"sphinx-autobuild",
34+
"sphinx-argparse",
35+
"furo",
36+
]
37+
extra = [
38+
"mypy",
39+
"bump2version",
40+
"towncrier",
41+
"pre-commit",
42+
{include-group = "docs"},
43+
]
44+
test = [
45+
"coverage[toml]",
46+
"pyinstaller",
47+
"pytest",
48+
"pytest-cov",
49+
"pytest-xdist",
50+
"setuptools",
51+
]
52+
2953
[project.urls]
3054
Homepage = "https://github.com/bloomberg/pystack"
3155

requirements-docs.txt

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

0 commit comments

Comments
 (0)