Skip to content

Commit 96b8363

Browse files
chore: switch to pyproject.toml
1 parent 76f8a69 commit 96b8363

File tree

4 files changed

+63
-13
lines changed

4 files changed

+63
-13
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
runs-on: ubuntu-latest
66
strategy:
77
matrix:
8-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
8+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
99
steps:
1010
- uses: actions/checkout@v4
1111
with:
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: windows-latest
2828
strategy:
2929
matrix:
30-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
30+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
3131
steps:
3232
- uses: actions/checkout@v4
3333
with:
@@ -49,7 +49,7 @@ jobs:
4949
runs-on: macos-latest
5050
strategy:
5151
matrix:
52-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
52+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
5353
steps:
5454
- uses: actions/checkout@v4
5555
with:

.github/workflows/wheels_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: python -m cibuildwheel --output-dir wheelhouse
3030
env:
3131
# Disable explicitly python 3.11 and building PyPy wheels
32-
CIBW_SKIP: pp*
32+
CIBW_SKIP: pp*, cp314-*
3333
CIBW_PRERELEASE_PYTHONS: False
3434

3535
- uses: actions/upload-artifact@v4

pyproject.toml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "wheel", "cffi>=1.0.0", "pycparser"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "sciencemode-cffi"
7+
version = "1.0.0"
8+
description = "Python wrapper for ScienceMode SMPT library using CFFI"
9+
readme = "README.md"
10+
license = {text = "LGPL-3.0"}
11+
authors = [
12+
{name = "ScienceMode Contributors"},
13+
]
14+
requires-python = ">=3.8"
15+
classifiers = [
16+
"Development Status :: 4 - Beta",
17+
"Intended Audience :: Developers",
18+
"Intended Audience :: Science/Research",
19+
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
20+
"Operating System :: OS Independent",
21+
"Programming Language :: C",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.8",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
28+
"Topic :: Scientific/Engineering",
29+
"Topic :: Software Development :: Libraries",
30+
]
31+
dependencies = [
32+
"cffi>=1.0.0",
33+
]
34+
35+
[project.urls]
36+
Homepage = "https://github.com/ScienceMode/ScienceMode4_python_wrapper"
37+
Repository = "https://github.com/ScienceMode/ScienceMode4_python_wrapper"
38+
Issues = "https://github.com/ScienceMode/ScienceMode4_python_wrapper/issues"
39+
40+
[tool.setuptools]
41+
packages = ["sciencemode"]
42+
include-package-data = true
43+
44+
[tool.setuptools.package-data]
45+
sciencemode = [
46+
"*.dll",
47+
"*.so",
48+
"*.so.*",
49+
"*.dylib",
50+
"*.a",
51+
"*.lib",
52+
"include/**/*.h",
53+
]

setup.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ def run(self):
9898
[sys.executable, cffi_path],
9999
cwd=os.path.dirname(cffi_path),
100100
check=True,
101-
stdout=subprocess.PIPE,
102-
stderr=subprocess.PIPE,
103-
universal_newlines=True,
101+
capture_output=True,
102+
text=True,
104103
)
105104
print("Output:")
106105
print(result.stdout)
@@ -199,9 +198,8 @@ def run(self): # noqa: C901
199198
try:
200199
result = subprocess.run(
201200
["cmake", "--version"],
202-
stdout=subprocess.PIPE,
203-
stderr=subprocess.PIPE,
204-
universal_newlines=True,
201+
capture_output=True,
202+
text=True,
205203
)
206204
print(f"Found CMake: {result.stdout.split()[2]}")
207205
except Exception:
@@ -546,9 +544,8 @@ def check_cffi_prerequisites():
546544
[sys.executable, cffi_path],
547545
cwd=os.path.dirname(cffi_path),
548546
check=True,
549-
stdout=subprocess.PIPE,
550-
stderr=subprocess.PIPE,
551-
universal_newlines=True,
547+
capture_output=True,
548+
text=True,
552549
)
553550
print("Direct CFFI build result:")
554551
print(result.stdout)

0 commit comments

Comments
 (0)