Skip to content

Commit 2229bfe

Browse files
committed
Move setup attributes to pyproject
1 parent 7b8e725 commit 2229bfe

File tree

5 files changed

+55
-71
lines changed

5 files changed

+55
-71
lines changed

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
- name: Install build dependencies
4646
run: |
47-
pip install --upgrade pip setuptools wheel
47+
pip install --upgrade pip setuptools wheel setuptools_scm>=8 pkgconfig>=1.5.1
4848
4949
- name: Package source dist
5050
run: python setup.py sdist

pyproject.toml

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,56 @@
11
[build-system]
2-
requires = ["setuptools==80.9.0", "wheel", "setuptools_scm[toml]>=3.4", "pkgconfig>=1.5.1", "lxml==6.0.2"]
2+
requires = ["setuptools==80.9.0", "wheel", "setuptools_scm>=8", "pkgconfig>=1.5.1", "lxml>=3.8"]
33

4+
[project]
5+
name = "xmlsec"
6+
dynamic = ["version"]
7+
description = "Python bindings for the XML Security Library"
8+
readme = {file = "README.md", content-type = "text/markdown"}
9+
requires-python = ">=3.9"
10+
dependencies = ["lxml>=3.8"]
11+
keywords = ["xmlsec"]
12+
authors = [
13+
{name = "Bulat Gaifullin", email = "[email protected]"}
14+
]
15+
maintainers = [
16+
{name = "Oleg Hoefling", email = "[email protected]"},
17+
{name = "Amin Solhizadeh", email = "[email protected]"}
18+
]
19+
license = "MIT"
20+
classifiers = [
21+
"Development Status :: 5 - Production/Stable",
22+
"Intended Audience :: Developers",
23+
"Intended Audience :: System Administrators",
24+
"Operating System :: OS Independent",
25+
"Programming Language :: C",
26+
"Programming Language :: Python :: 3",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
"Programming Language :: Python :: 3.14",
33+
"Topic :: Text Processing :: Markup :: XML",
34+
"Typing :: Typed"
35+
]
36+
37+
[project.urls]
38+
Documentation = "https://xmlsec.readthedocs.io"
39+
Source = "https://github.com/xmlsec/python-xmlsec"
40+
Changelog = "https://github.com/xmlsec/python-xmlsec/releases"
41+
42+
# setuptools
43+
[tool.setuptools]
44+
zip-safe = false
45+
packages = ["xmlsec"]
46+
package-dir = {"" = "src"}
47+
48+
[tool.setuptools.package-data]
49+
xmlsec = ["py.typed", "*.pyi"]
50+
51+
[tool.setuptools_scm]
52+
53+
# mypy
454
[tool.mypy]
555
files = ['src']
656
ignore_missing_imports = false
@@ -22,6 +72,7 @@ warn_no_return = true
2272
no_implicit_reexport = true
2373
show_error_codes = true
2474

75+
# ruff
2576
[tool.ruff]
2677
# Maximum line length, same as your original Black + Flake8 config
2778
line-length = 130
@@ -88,6 +139,7 @@ skip-magic-trailing-comma = false
88139
# Enforce Unix-style line endings (LF)
89140
line-ending = "lf"
90141

142+
# cibuildwheel
91143
[tool.cibuildwheel]
92144
build = [
93145
# "cp39-*",

requirements-test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
pytest==8.4.1
44
lxml-stubs==0.5.1
5-
ruff[format]==0.13.0
5+
ruff[format]==0.14.4

setup.cfg

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

setup.py

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,55 +7,9 @@
77
src_root = Path(__file__).parent / 'src'
88
sources = [str(path.absolute()) for path in src_root.rglob('*.c')]
99
pyxmlsec = Extension('xmlsec', sources=sources)
10-
setup_reqs = ['setuptools_scm[toml]>=3.4', 'pkgconfig>=1.5.1', 'lxml>=3.8']
11-
12-
13-
with open('README.md', encoding='utf-8') as readme:
14-
long_desc = readme.read()
1510

1611

1712
setup(
18-
name='xmlsec',
19-
use_scm_version=True,
20-
description='Python bindings for the XML Security Library',
21-
long_description=long_desc,
22-
long_description_content_type='text/markdown',
2313
ext_modules=[pyxmlsec],
2414
cmdclass={'build_ext': build_ext},
25-
python_requires='>=3.9',
26-
setup_requires=setup_reqs,
27-
install_requires=['lxml>=3.8'],
28-
author='Bulat Gaifullin',
29-
author_email='[email protected]',
30-
maintainer='Oleg Hoefling',
31-
maintainer_email='[email protected]',
32-
url='https://github.com/mehcode/python-xmlsec',
33-
project_urls={
34-
'Documentation': 'https://xmlsec.readthedocs.io',
35-
'Source': 'https://github.com/mehcode/python-xmlsec',
36-
'Changelog': 'https://github.com/mehcode/python-xmlsec/releases',
37-
},
38-
license='MIT',
39-
keywords=['xmlsec'],
40-
classifiers=[
41-
'Development Status :: 5 - Production/Stable',
42-
'Intended Audience :: Developers',
43-
'Intended Audience :: System Administrators',
44-
'License :: OSI Approved :: MIT License',
45-
'Operating System :: OS Independent',
46-
'Programming Language :: C',
47-
'Programming Language :: Python :: 3',
48-
'Programming Language :: Python :: 3.9',
49-
'Programming Language :: Python :: 3.10',
50-
'Programming Language :: Python :: 3.11',
51-
'Programming Language :: Python :: 3.12',
52-
'Programming Language :: Python :: 3.13',
53-
'Programming Language :: Python :: 3.14',
54-
'Topic :: Text Processing :: Markup :: XML',
55-
'Typing :: Typed',
56-
],
57-
zip_safe=False,
58-
packages=['xmlsec'],
59-
package_dir={'': 'src'},
60-
package_data={'xmlsec': ['py.typed', '*.pyi']},
6115
)

0 commit comments

Comments
 (0)