From 7751401b2c16070a3a285534b2972edbb580d3ee Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Wed, 11 Dec 2024 10:26:30 -0500 Subject: [PATCH 1/3] build: move dev requirements into pyproject.toml --- .github/workflows/tests.yml | 9 +++------ MANIFEST.in | 1 - pyproject.toml | 10 ++++++++++ requirements.dev.txt | 8 -------- 4 files changed, 13 insertions(+), 15 deletions(-) delete mode 100644 requirements.dev.txt diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4b4af14c..01cd56bf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,8 +29,7 @@ jobs: uses: actions/checkout@v4 - name: Install run: | - pip3 install -r requirements.dev.txt - pip3 install . + pip3 install .[dev] - name: Run tests run: python3 -m pytest wintest: @@ -40,8 +39,7 @@ jobs: uses: actions/checkout@v4 - name: Install run: | - pip3 install -r requirements.dev.txt - pip3 install . + pip3 install .[dev] - name: Run tests run: python3 -m pytest mactest: @@ -52,8 +50,7 @@ jobs: - uses: actions/setup-python@v5 - name: Install run: | - pip install -r requirements.dev.txt - pip install . + pip install .[dev] - name: Run tests run: python -m pytest nodetest: diff --git a/MANIFEST.in b/MANIFEST.in index e9a67fa4..c1b06860 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,7 +3,6 @@ include LICENSE include README.md include TODO.md include config.h.in -include requirements.dev.txt include docs/Makefile include docs/gen_config.py include docs/make.bat diff --git a/pyproject.toml b/pyproject.toml index 469c5220..73942c46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,16 @@ classifiers = [ "Topic :: Multimedia :: Sound/Audio :: Speech", ] +[project.optional-dependencies] +dev = [ + "pytest", + "numpy", + "pre-commit", + "black==24.3.0", + "isort", + "mypy==0.991", +] + [project.urls] Homepage = "https://github.com/ReadAlongs/SoundSwallower" Documentation = "https://soundswallower.readthedocs.io/" diff --git a/requirements.dev.txt b/requirements.dev.txt deleted file mode 100644 index 15e43aef..00000000 --- a/requirements.dev.txt +++ /dev/null @@ -1,8 +0,0 @@ -scikit-build -Cython -pytest -numpy -pre-commit -black==24.3.0 -isort -mypy==0.991 From 095e1263c39b20c0f46d0fc9423320760acc1edb Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Wed, 11 Dec 2024 10:36:02 -0500 Subject: [PATCH 2/3] build: setuptools_scm requires setuptools>=61 --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 73942c46..eb28d061 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,8 @@ [build-system] requires = [ "scikit-build-core", - "Cython" + "Cython", + "setuptools>=61.2", ] build-backend = "scikit_build_core.build" From abe73ac7128a65d667fc06acf1f1dd65d57a6f5e Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Wed, 11 Dec 2024 10:41:38 -0500 Subject: [PATCH 3/3] ci: use action/setup-python everywhere, with an explicit version on Linux --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 01cd56bf..554c535f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,6 +27,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.10" - name: Install run: | pip3 install .[dev] @@ -37,6 +40,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - uses: actions/setup-python@v5 - name: Install run: | pip3 install .[dev]