forked from brownan/Reed-Solomon
-
Notifications
You must be signed in to change notification settings - Fork 18
/
pyproject.toml
207 lines (184 loc) · 8.08 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# SPDX-License-Identifier: MIT
# Inspired by: https://hynek.me/articles/python-recursive-optional-dependencies/
# We here use a single-module distribution style https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#single-module-distribution
[build-system]
# never uppercap requirements unless we have evidence it won't work https://iscinumpy.dev/post/bound-version-constraints/
# cython cannot be placed in optional-dependencies, Cython won't be able to do its magic to make it importable in setup.py
requires = ["setuptools>59", "cython<0.30"]
build-backend = "setuptools.build_meta"
[project] # beware if using setuptools: setup.py still gets executed, and even if pyproject.toml fields take precedence, if there is any code error in setup.py, building will fail!
name = "unireedsolomon"
version = "1.0.6" # see PEP 440 https://peps.python.org/pep-0440/#pre-releases
description = "Universal errors-and-erasures Reed Solomon codec (error correcting code) in pure Python with extensive documentation and an object-oriented design."
authors = [
{name = "Andrew Brown", email = "[email protected]"},
{name = "Stephen Karl Larroque", email = "[email protected]"},
]
maintainers = [
{name = "Stephen Karl Larroque", email = "[email protected]"},
]
requires-python = ">=3.7"
license = {text = "MIT License"}
keywords = ["data", "protection", "correction", "recovery", "restore", "save", "data recovery", "reed-solomon", "error correction code", "qr", "qr codes", "barcodes", "error correction", "erasure", "reed solomon", "repair file", "network packet"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Cython",
"Topic :: Communications",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Archiving",
"Topic :: System :: Archiving :: Backup",
"Topic :: System :: Recovery Tools",
"Topic :: Utilities",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
]
dependencies = [
#"typing-extensions; python_version<'3.8'",
#"importlib_metadata;python_version<'3.8'",
]
[project.urls]
Homepage = "https://github.com/lrq3000/unireedsolomon"
Documentation = "https://github.com/lrq3000/unireedsolomon/blob/master/README.rst"
"Source" = "https://github.com/lrq3000/unireedsolomon"
Tracker = "https://github.com/lrq3000/unireedsolomon/issues"
Download = "https://github.com/lrq3000/unireedsolomon/releases"
#Changelog = "https://url/changelog"
[project.optional-dependencies]
# tests_require was deprecated in setup.py by setuptools, because anyway downstream the user wants to test in their own environment, not an isolated env, so the only practical replacement is to have test requirements defined as an extras/optional-dependency [test] so that they can be installed in the user's environment if they want to: https://discuss.python.org/t/providing-a-way-to-specify-how-to-run-tests-and-docs/15016
test = [ # minimum dependencies to run tests
"pytest",
"pytest-cov",
"coveralls",
"cython<0.30",
]
testmeta = [ # dependencies to test meta-data. Note that some of these dependencies make cibuildwheel choke on cryptography
"build",
"twine",
"validate-pyproject",
"rstcheck",
]
[project.readme]
# Do NOT use .. code:: python for interactive code session, otherwise syntax error due to prompt handle >>>, see https://svn.python.org/projects/external/Sphinx-1.2/doc/markup/code.rst and https://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html#python-docstrings
# also use rstcheck
file = "README.rst"
content-type = "text/x-rst"
#[tool.setuptools]
#package-dir = {"" = "src"}
[tool.setuptools.packages.find]
# IMPORTANT: systematically delete `src/<project.name>.egg-info` folder before rebuilding, otherwise the list of included files will not get updated (it's in `SOURCES.txt` file in this folder)
where = ["src"]
exclude = ["build", "docs", "presentation"]
#namespaces = false
[tool.setuptools.package-data]
# Check the <mypkg>.egg-info/SOURCES.txt file generated after a `build` or `pip install` to check if the following files are correctly included in the sdist.
"*" = [
"*.rst",
"LICENSE*",
"README*",
"*.pyx", # include the cython implementation sourcecode in the wheel, so that the user can cythonize later, this is necessary, it's not included by default even with extensions in setup.py
"*.c", # include the cythonized intermediary .c file for source distributions such as Gentoo, so that they do not need to install Cython v3 - no need since we use src-layout, it's automatically included
#"tests", # to help linux distros package builders, they may want to run the unit test to check their package is working OK - no need, tests folder is packaged by default in sdist nowadays
]
#[tool.setuptools.exclude-package-data]
#"*" = [
# "docs/_build",
# "tests/__pycache__",
# "tests/.mypy_cache",
#]
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"-ra",
"--strict-markers",
]
xfail_strict = true
testpaths = "unireedsolomon/tests" # default path to look for tests if nothing is specified in commandline
filterwarnings = [
"once::Warning",
]
required_plugins = "pytest-cov"
[tool.coverage.run]
branch = true
relative_files = true
include = [
"*/unireedsolomon/ff.py",
"*/unireedsolomon/cff.pyx",
"*/unireedsolomon/polynomial.py",
"*/unireedsolomon/cpolynomial.pyx",
"*/unireedsolomon/rs.py",
]
[tool.coverage.paths]
source = ["src/unireedsolomon"]
[tool.coverage.report] # Beware: you need to delete .coveragerc if you have one, otherwise .coveragerc will take precedence!
show_missing = true
include = [
"*.py",
]
omit = [
"*/python?.?/*",
"*/site-packages/nose/*",
"*/opt/python/pypy*",
"*/tests/*",
]
exclude_lines = [
# a more strict default pragma
"\\# pragma: no cover\\b",
# allow defensive code
"^\\s*raise AssertionError\\b",
"^\\s*raise NotImplementedError\\b",
"^\\s*return NotImplemented\\b",
"^\\s*raise$",
# typing-related code
"^if (False|TYPE_CHECKING):",
": \\.\\.\\.(\\s*#.*)?$",
"^ +\\.\\.\\.$",
"-> ['\"]?NoReturn['\"]?:",
]
[tool.cibuildwheel]
#build = "*"
#skip = ""
#test-skip = ""
archs = ["auto"]
#build-frontend = "pip"
#dependency-versions = "pinned"
#environment = {}
#environment-pass = []
build-verbosity = "1"
#before-all = ""
#before-build = ""
#repair-wheel-command = ""
test-command = "pytest {package}/tests"
#before-test = ""
#test-requires = []
test-extras = ["test"] # reuse the [test] extras optional dependencies to install test dependencies, instead of redefining in test-requires
[tool.cibuildwheel.config-settings]
--build-option = "--cythonize"
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
# While black is awesome, it does not support cython, so we avoid for the moment
# to keep a similar formatting between the pure python and the cython implementations.
# see: https://github.com/psf/black/issues/359
#[tool.black]
#line-length = 88
#target-version = ['py39', 'py310', 'py311']
#include = '\.pyi?$'
# We use preview style for formatting Black itself. If you
# want stable formatting across releases, you should keep
# this off.
#preview = false