Skip to content

Commit 7970225

Browse files
committed
Merge branch 'setup-to-pyproject'
2 parents e5f6960 + f85fc2e commit 7970225

10 files changed

Lines changed: 74 additions & 56 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ jobs:
2222
- name: "Set up Python"
2323
uses: actions/setup-python@v6
2424
with:
25-
python-version: "3.13"
25+
python-version: "3.14"
2626

2727
- name: "Install Python dependencies"
2828
run: |
29-
pip3 install setuptools nox
29+
pip3 install nox
3030
3131
- name: "Build Sphinx Doc"
3232
run: |

.github/workflows/python-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
11+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1212

1313
name: "Lint and Test"
1414
runs-on: macos-latest
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: "Install Python dependencies"
2929
run: |
30-
pip install setuptools nox
30+
pip install nox
3131
3232
- name: "Lint with flake8 and Black"
3333
run: |

.github/workflows/python-packages.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,24 @@ jobs:
2121
- name: "Set up Python"
2222
uses: actions/setup-python@v6
2323
with:
24-
python-version: "3.13"
24+
python-version: "3.14"
2525

2626
- name: "Install Python build dependencies"
2727
run: |
28-
pip install setuptools wheel nox
28+
pip install build
2929
3030
- name: "Build source distribution"
3131
run: |
32-
python setup.py sdist
32+
python -m build --sdist
3333
3434
- name: "Build wheel"
3535
run: |
36-
python setup.py bdist_wheel
36+
python -m build --wheel
3737
3838
- name: "Upload artifacts"
3939
uses: actions/upload-artifact@v5
4040
with:
41-
name: rivalcfg-dist
41+
name: dist
4242
path: dist/
4343
retention-days: 1
4444

@@ -53,11 +53,12 @@ jobs:
5353

5454
- name: "Download artifacts"
5555
uses: actions/download-artifact@v6
56+
with:
57+
path: dist/
5658

57-
- name: "Move packages to the dist/ folder"
59+
- name: "List packages"
5860
run: |
59-
mkdir dist/
60-
mv rivalcfg-dist/* dist/
61+
find . -name "*.whl" -o -name "*.tar.gz"
6162
6263
- name: "Publish packages on PyPI"
6364
uses: pypa/gh-action-pypi-publish@release/v1

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2024, Wanadev <http://www.wanadev.fr/>
1+
Copyright (c) 2024-2025, Wanadev <http://www.wanadev.fr/>
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ Changelog
116116

117117
* **[NEXT]** (changes on ``master``, but not released yet):
118118

119-
* misc: Added Python 3.13 support (@flozz)
120-
* misc!: Removed Python 3.8 support (@flozz)
119+
* misc: Replaced setup.py by pyproject.toml (@flozz)
120+
* misc: Added Python 3.13, 3.14 support (@flozz)
121+
* misc!: Removed Python 3.8, 3.9 support (@flozz)
121122

122123
* **v1.0.0:**
123124

RELEASE.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This file is a memo for the maintainer.
1414
1. Release
1515
----------
1616

17-
* Update version number in ``setup.py``
17+
* Update version number in ``pyproject.toml``
1818
* Update version number in ``doc/conf.py``
1919
* Edit / update changelog in ``README.rst``
2020
* Commit / tag (``git commit -m vX.Y.Z && git tag vX.Y.Z && git push && git push --tags``)

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88

99
project = "Scanline Python Wrapper"
10-
copyright = "2024, Wanadev"
10+
copyright = "2024-2025, Wanadev"
1111
author = "Wanadev"
1212
release = "1.0.0"
1313

noxfile.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,37 @@
33

44
PYTHON_FILES = [
55
"scanline_wrapper.py",
6-
"setup.py",
76
"noxfile.py",
87
"test",
98
"doc",
109
]
1110

12-
PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
11+
PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"]
1312

1413

1514
@nox.session(reuse_venv=True)
1615
def lint(session):
17-
session.install("flake8", "black")
16+
session.install("-e", ".[dev]")
1817
session.run("flake8", *PYTHON_FILES)
1918
session.run("black", "--check", "--diff", "--color", *PYTHON_FILES)
19+
session.run("validate-pyproject", "pyproject.toml")
2020

2121

2222
@nox.session(reuse_venv=True)
2323
def black_fix(session):
24-
session.install("black")
24+
session.install("-e", ".[dev]")
2525
session.run("black", *PYTHON_FILES)
2626

2727

2828
@nox.session(python=PYTHON_VERSIONS, reuse_venv=True)
2929
def test(session):
30-
session.install("pytest")
30+
session.install("-e", ".[dev]")
3131
session.install(".")
3232
session.run("pytest", "-v", "test")
3333

3434

3535
@nox.session(reuse_venv=True)
3636
def gendoc(session):
37-
session.install("sphinx", "sphinx-rtd-theme")
37+
session.install("-e", ".[dev]")
3838
session.install(".")
3939
session.run("sphinx-build", "-M", "html", "doc", "build")

pyproject.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[build-system]
2+
requires = ["setuptools", "setuptools-scm"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "scanline-python-wrapper"
7+
version = "1.0.0"
8+
authors = [
9+
{name = "Wanadev", email = "contact@wanadev.fr"},
10+
]
11+
description = "Python wrapper for the scanline CLI scanner tool for macOS"
12+
readme = "README.rst"
13+
keywords = ["scan", "scanline", "macos", "icc"]
14+
license = "bsd-3-clause"
15+
license-files = ["LICENSE"]
16+
requires-python = ">=3.10"
17+
18+
[project.optional-dependencies]
19+
dev = [
20+
"nox",
21+
"flit",
22+
"black",
23+
"flake8",
24+
"flake8-pyproject",
25+
"validate-pyproject",
26+
"pytest",
27+
"sphinx",
28+
"sphinx-rtd-theme",
29+
]
30+
31+
[project.urls]
32+
source = "https://github.com/wanadev/scanline-python-wrapper"
33+
documentation = "https://wanadev.github.io/scanline-python-wrapper/"
34+
changelog = "https://github.com/wanadev/scanline-python-wrapper?tab=readme-ov-file#changelog"
35+
issues = "https://github.com/wanadev/scanline-python-wrapper/issues"
36+
chat = "https://discord.gg/BmUkEdMuFp"
37+
38+
[tool.setuptools]
39+
py-modules = ["scanline_wrapper"]
40+
41+
[tool.black]
42+
target-version = ["py310"]
43+
44+
[tool.flake8]
45+
ignore = [
46+
# ↓↓ Black handles that its way... :)
47+
"W503", # line break before binary operator
48+
"E501", # line too long (> 79 characters)
49+
]

setup.py

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

0 commit comments

Comments
 (0)