Skip to content

Commit c2180f8

Browse files
committed
Made pyproject.toml compliant with python -m build
1 parent 59cf884 commit c2180f8

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

pypi.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# 4. Determine minimum versions and dependencies:
77
# a) Run: `./versions.py -mode min`
88
# b) Fix/bump all minimum versions and dependencies identified
9+
# c) Fix/bump the maximum "Programming Language" version in `pyproject.toml`
910
# 5. Commit all above changes as the latest version number (e.g. v1.15.0)
1011
# 6. Push the commit to `main`
1112
#

pyproject.toml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,27 @@ classifiers = [
1515
"Development Status :: 3 - Alpha",
1616
"Intended Audience :: Science/Research",
1717
"Intended Audience :: Developers",
18-
"License :: OSI Approved :: BSD License",
19-
"Programming Language :: Python",
2018
"Topic :: Software Development",
2119
"Topic :: Scientific/Engineering",
2220
"Operating System :: Microsoft :: Windows",
2321
"Operating System :: POSIX",
2422
"Operating System :: Unix",
2523
"Operating System :: MacOS",
24+
"Programming Language :: Python",
25+
"Programming Language :: Python :: 3",
2626
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
28+
"Programming Language :: Python :: 3.12",
29+
"Programming Language :: Python :: 3.13",
30+
"Programming Language :: Python :: 3.14",
2731
]
2832
keywords = ["time series", "matrix profile", "motif", "discord"]
2933
maintainers = [
3034
{name = "Sean M. Law", email = "seanmylaw@gmail.com"},
3135
{name = "Nima Sarajpoor", email = "nimasarajpoor@gmail.com"}
3236
]
33-
license = {text = "3-clause BSD License"}
37+
license = "BSD-3-Clause"
38+
license-files = ["LICENSE.txt"]
3439
dependencies = [
3540
"numpy >= 1.24",
3641
"scipy >= 1.10",
@@ -39,7 +44,6 @@ dependencies = [
3944

4045
[tool.setuptools]
4146
packages = ["stumpy"]
42-
license-files = ["LICENSE.txt"]
4347

4448
[project.optional-dependencies]
4549
ci = [
@@ -99,6 +103,9 @@ numpydoc = "*"
99103
myst-nb = "*"
100104
jupyterlab-myst = "*"
101105
sphinx-togglebutton = "*"
106+
# release
107+
twine = "*"
108+
python-build = "*" # Equivalent to PyPI `build` package
102109

103110
[tool.pixi.activation]
104111
# Always execute ./setup.sh when activating the default environment

versions.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,24 @@ def get_all_min_versions(MIN_PYTHON):
484484
"README.rst",
485485
]
486486

487+
with open("pyproject.toml", "r") as f:
488+
pyproject_lines = f.readlines()
489+
487490
test_pkg_mismatch_regex()
488491

489492
for pkg_name, pkg_version in pkgs.items():
490493
for name, version, fname, line_num in find_pkg_mismatches(
491494
pkg_name, pkg_version, fnames
492495
):
496+
if fname == "pyproject.toml":
497+
line = pyproject_lines[line_num - 1]
498+
if "Programming Language :: Python" in line and Version(
499+
pkg_version
500+
) <= Version(version):
501+
# Skip lines in `pyproject.toml` where the "Programming Language"
502+
# version may be higher than the minimum Python version
503+
continue
504+
493505
print(
494506
f"{pkg_name} {pkg_version} Mismatch: Version {version} "
495507
f"found in {fname}:{line_num}"

0 commit comments

Comments
 (0)