Skip to content

Commit f27220a

Browse files
committed
replace setup.py with pyproject.toml
1 parent 0d3bb7a commit f27220a

File tree

3 files changed

+94
-84
lines changed

3 files changed

+94
-84
lines changed

pyproject.toml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
[build-system]
2+
requires = ['flit_core >=3.2,<4']
3+
build-backend = 'flit_core.buildapi'
4+
5+
[project]
6+
name = 'nested_diff'
7+
authors = [{name = 'Michael Samoglyadov', email = 'mixas.sr@gmail.com'}]
8+
readme = 'README.md'
9+
license = {file = 'LICENSE'}
10+
keywords = [
11+
'diff',
12+
'nested-diff',
13+
'recursive-diff',
14+
'nested-data',
15+
'data-structures',
16+
]
17+
classifiers = [
18+
'Development Status :: 4 - Beta',
19+
'Intended Audience :: Developers',
20+
'Intended Audience :: Information Technology',
21+
'Intended Audience :: System Administrators',
22+
'License :: OSI Approved :: Apache Software License',
23+
'Operating System :: OS Independent',
24+
'Programming Language :: Python',
25+
'Programming Language :: Python :: 3',
26+
'Programming Language :: Python :: 3 :: Only',
27+
'Programming Language :: Python :: 3.7',
28+
'Programming Language :: Python :: 3.8',
29+
'Programming Language :: Python :: 3.9',
30+
'Programming Language :: Python :: 3.10',
31+
'Programming Language :: Python :: 3.11',
32+
'Programming Language :: Python :: 3.12',
33+
'Programming Language :: Python :: Implementation :: CPython',
34+
'Programming Language :: Python :: Implementation :: PyPy',
35+
'Topic :: File Formats :: JSON',
36+
'Topic :: Software Development :: Quality Assurance',
37+
'Topic :: Software Development :: Testing',
38+
'Topic :: System :: Systems Administration',
39+
'Topic :: Utilities',
40+
]
41+
dynamic = ['version', 'description']
42+
dependencies = []
43+
requires-python = '>=3.7'
44+
45+
[project.optional-dependencies]
46+
cli = [
47+
'pyyaml',
48+
'tomli >= 1.1.0 ; python_version < "3.11"',
49+
'tomli-w >= 1.0.0'
50+
]
51+
lint = [
52+
'darglint',
53+
'flake8 < 5', # temp workaround (https://github.com/tholo/pytest-flake8/issues/87)
54+
'flake8-builtins',
55+
'flake8-bugbear',
56+
'flake8-commas',
57+
'flake8-comprehensions',
58+
'flake8-docstrings',
59+
'flake8-eradicate',
60+
'flake8-pytest-style',
61+
'flake8_quotes',
62+
'flake8-return',
63+
'flake8-simplify',
64+
'flake8-unused-arguments',
65+
'pep8-naming',
66+
'pytest-flake8',
67+
]
68+
test = [
69+
'pytest',
70+
]
71+
72+
[project.scripts]
73+
nested_diff = 'nested_diff.diff_tool:App.cli'
74+
nested_patch = 'nested_diff.patch_tool:App.cli'
75+
76+
[project.urls]
77+
Homepage = 'https://github.com/mr-mixas/Nested-Diff.py'
78+
Repository = 'https://github.com/mr-mixas/Nested-Diff.py.git'
79+
80+
[tool.pytest.ini_options]
81+
addopts = '-vv'
82+
doctest_optionflags = 'NORMALIZE_WHITESPACE'
83+
testpaths = 'nested_diff tests'

setup.py

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

tox.ini

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ usedevelop = true
66
commands =
77
pytest
88

9-
deps =
10-
pytest
11-
pyyaml
12-
tomli >= 1.1.0 ; python_version < '3.11'
13-
tomli-w >= 1.0.0
9+
extras =
10+
cli
11+
test
1412

1513
setenv =
1614
PYTHONHASHSEED = 1
@@ -20,9 +18,11 @@ commands =
2018
coverage run --source nested_diff -m pytest
2119

2220
deps =
23-
{[testenv:essential]deps}
2421
coverage
2522

23+
extras =
24+
{[testenv:essential]extras}
25+
2626
setenv =
2727
PYTHONHASHSEED = 1
2828

@@ -31,40 +31,23 @@ commands =
3131
pytest --doctest-modules --flake8
3232
python -m doctest HOWTO.md README.md
3333

34-
deps =
35-
darglint
36-
flake8 < 5 # temp workaround (https://github.com/tholo/pytest-flake8/issues/87)
37-
flake8-builtins ; python_version >= '3.6'
38-
flake8-bugbear ; python_version >= '3.6'
39-
flake8-commas
40-
flake8-comprehensions ; python_version >= '3.6'
41-
flake8-docstrings
42-
flake8-eradicate ; python_version >= '3.6'
43-
flake8-pytest-style
44-
flake8_quotes
45-
flake8-return
46-
flake8-simplify
47-
flake8-unused-arguments
48-
pep8-naming
49-
pytest-flake8
50-
{[testenv:essential]deps}
34+
extras =
35+
{[testenv:essential]extras}
36+
lint
5137

5238
setenv =
5339
PYTHONHASHSEED = 1
5440

41+
# pyproject.toml not support yet
5542
[darglint]
5643
docstring_style=google
5744
strictness=short
5845

46+
# pyproject.toml not support yet
5947
[flake8]
6048
max-line-length = 79
6149
per-file-ignores =
6250
# disable SIM105 (contextlib.suppress is slower than using try-except-pass)
6351
nested_diff/*: SIM105
6452
# disable max line length and all docstrings checks in tests dir
6553
tests/*: E501 D SIM105
66-
67-
[pytest]
68-
addopts = -vv
69-
doctest_optionflags = NORMALIZE_WHITESPACE
70-
testpaths = nested_diff tests

0 commit comments

Comments
 (0)