Skip to content

Commit 6939266

Browse files
committed
Migrate all configs to pyproject.toml
1 parent 36939c7 commit 6939266

File tree

4 files changed

+72
-49
lines changed

4 files changed

+72
-49
lines changed

pyproject.toml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,71 @@
11
[build-system]
2-
requires = ["setuptools", "wheel"]
2+
requires = ["setuptools", "setuptools-scm", "wheel"]
3+
4+
[project]
5+
name = "getdents"
6+
authors = [
7+
{name = "ZipFile", email = "[email protected]"},
8+
]
9+
description = "Python binding to linux syscall getdents64."
10+
readme = "README.rst"
11+
requires-python = ">=3.8"
12+
keywords = ["getdents"]
13+
license = {text = "BSD-2-Clause"}
14+
classifiers = [
15+
"License :: OSI Approved :: BSD License",
16+
"Operating System :: POSIX :: Linux",
17+
"Programming Language :: Python :: 3",
18+
"Programming Language :: Python :: Implementation :: CPython",
19+
"Topic :: System :: Filesystems",
20+
]
21+
dynamic = ["version"]
22+
23+
[project.urls]
24+
Source = "https://github.com/ZipFile/python-getdents"
25+
26+
[project.scripts]
27+
python-getdents = "getdents.cli:main"
28+
29+
[project.optional-dependencies]
30+
dev = [
31+
"flake8",
32+
"flake8-pyproject",
33+
"isort",
34+
"mypy",
35+
"pytest",
36+
"pytest-cov",
37+
]
38+
39+
[tool.setuptools]
40+
packages = ["getdents"]
41+
include-package-data = true
42+
43+
[tool.setuptools.package-data]
44+
getdents = ["py.typed"]
45+
46+
[tool.setuptools_scm]
47+
48+
[tool.pytest.ini_options]
49+
addopts = "--cov"
50+
minversion = "7.0"
51+
testpaths = ["tests"]
52+
53+
[tool.coverage.run]
54+
branch = true
55+
omit = ["getdents/__main__.py"]
56+
source = ["getdents"]
57+
58+
[tool.isort]
59+
profile = "black"
60+
61+
[tool.flake8]
62+
application-import-names = ["getdents"]
63+
max-line-length = 88
64+
65+
[tool.black]
66+
line-length = 88
67+
target-version = ["py38", "py39", "py310", "py311"]
68+
69+
[tool.mypy]
70+
strict = true
71+
warn_unused_configs = true

pytest.ini

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

setup.cfg

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

setup.py

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,9 @@
11
#!/usr/bin/env python
22

3-
from setuptools import Extension, find_packages, setup
4-
5-
6-
tests_require = ['pytest']
3+
from setuptools import Extension, setup
74

85
setup(
9-
name='getdents',
10-
version='0.3.1',
11-
description='Python binding to linux syscall getdents64.',
12-
long_description=open('README.rst').read(),
13-
classifiers=[
14-
'License :: OSI Approved :: BSD License',
15-
'Operating System :: POSIX :: Linux',
16-
'Programming Language :: Python :: 3',
17-
'Programming Language :: Python :: Implementation :: CPython',
18-
'Topic :: System :: Filesystems',
19-
],
20-
keywords='getdents',
21-
author='Anatolii Aniskovych',
22-
author_email='[email protected]',
23-
url='http://github.com/ZipFile/python-getdents',
24-
license='BSD-2-Clause',
25-
packages=find_packages(exclude=['tests']),
26-
include_package_data=True,
27-
package_data={'getdents': ['py.typed']},
28-
zip_safe=False,
29-
extras_require={
30-
'test': tests_require,
31-
},
326
ext_modules=[
33-
Extension('getdents._getdents', sources=['getdents/_getdents.c']),
7+
Extension("getdents._getdents", sources=["getdents/_getdents.c"]),
348
],
35-
entry_points = {
36-
'console_scripts': ['python-getdents=getdents.cli:main'],
37-
},
38-
setup_requires=['pytest-runner'],
39-
tests_require=tests_require,
409
)

0 commit comments

Comments
 (0)