Skip to content

Commit f9a7031

Browse files
committed
Improve pyproject.toml
* Use setuptools * Add metadata * Use dynamic version from semver.__about__.__version__ * Add build.sh script to call build module
1 parent 31d1836 commit f9a7031

File tree

3 files changed

+54
-72
lines changed

3 files changed

+54
-72
lines changed

build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
#
3+
# A simple, correct PEP 517 build frontend
4+
# See also https://pypi.org/project/build/
5+
6+
/usr/bin/env python3 --version
7+
/usr/bin/env python3 -m pip install build
8+
/usr/bin/env python3 -m build --version
9+
echo "-----"
10+
/usr/bin/env python3 -m build "$@"

pyproject.toml

Lines changed: 43 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1+
#
2+
#
3+
# See also https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
4+
15
[build-system]
26
requires = [
37
# sync with setup.py until we discard non-pep-517/518
4-
"setuptools>=40.0",
8+
"setuptools>=62.0",
59
"setuptools-scm",
610
"wheel",
11+
"build",
712
]
813
build-backend = "setuptools.build_meta"
914

1015
[project]
1116
name = "semver"
12-
version = "3.0.0-alpha0"
1317
description = "Python helper for Semantic Versioning (http://semver.org/)"
14-
readme = "README.rst"
1518
requires-python = ">=3.6"
1619
license = {file = "LICENSE.txt"}
17-
keywords = ["semantic versioning", "version", "semver", ]
20+
keywords = ["semantic versioning", "version", "semver",]
1821
authors = [
1922
{name = "Kostiantyn Rybnikov", email = "k-bx@k-bx.com"}
2023
]
2124
maintainers = [
22-
{name = "Thomas Schraitle", email = ""}
25+
{name = "Sebastien Celles", email = "s.celles@gmail.com"},
26+
{name = "Tom Schraitle", email = "tom_schr@web.de"},
2327
]
2428
classifiers=[
2529
# See https://pypi.org/pypi?%3Aaction=list_classifiers
@@ -33,35 +37,51 @@ classifiers=[
3337
"Programming Language :: Python :: 3.7",
3438
"Programming Language :: Python :: 3.8",
3539
"Programming Language :: Python :: 3.9",
36-
# "Programming Language :: Python :: Implementation :: PyPy",
40+
"Programming Language :: Python :: 3.10",
41+
"Programming Language :: Python :: 3.11",
3742
"Topic :: Software Development :: Libraries :: Python Modules",
3843
]
44+
dynamic = ["version"]
3945

40-
[project.optional-dependencies]
41-
test = [
42-
"pytest",
43-
"pytest-cov[all]",
44-
]
45-
doc = ["sphinx",
46-
"sphinx-argparse",
47-
]
46+
[tool.setuptools.dynamic]
47+
version = {attr = "semver.__about__.__version__"}
4848

49+
[project.readme]
50+
file = "README.rst"
51+
content-type = "text/x-rst"
4952

5053
[project.urls]
51-
homepage = "https://github.com/python-semver/python-semver"
52-
documentation = "https://python-semver.rtfd.io/"
53-
changelog = "https://github.com/python-semver/python-semver/blob/master/CHANGELOG.rst"
54+
Homepage = "https://github.com/python-semver/python-semver"
55+
Changelog = "https://python-semver.readthedocs.io/en/latest/changelog.html"
56+
Documentation = "https://python-semver.rtfd.io"
57+
Releases = "https://github.com/python-semver/python-semver/releases"
58+
"Bug Tracker" = "https://github.com/python-semver/python-semver/issues"
5459

5560
[project.scripts]
56-
pysemver = "semver:main"
61+
pysemver = "semver.cli:main"
62+
63+
[tool.setuptools]
64+
# package-dir = {"" = "src"}
65+
include-package-data = true
5766

67+
[tool.setuptools.packages.find]
68+
where = ["src"]
69+
namespaces = false
5870

59-
[tool.flit.metadata]
60-
module = "semver"
61-
homepage = "https://github.com/python-semver/python-semver"
62-
license = "License :: OSI Approved :: BSD License"
71+
[tool.setuptools.package-data]
72+
semver = ["py.typed"]
6373

6474

75+
[project.optional-dependencies]
76+
test = [
77+
"pytest",
78+
"pytest-cov[all]",
79+
]
80+
doc = [
81+
"sphinx",
82+
"sphinx-argparse",
83+
]
84+
6585

6686
[tool.black]
6787
line-length = 88
@@ -78,7 +98,7 @@ include = '''
7898

7999
[tool.towncrier]
80100
package = "semver"
81-
# package_dir = "src"
101+
package_dir = "src"
82102
filename = "CHANGELOG.rst"
83103
directory = "changelog.d/"
84104
title_format = "Version {version}"
@@ -125,52 +145,3 @@ template = "changelog.d/_template.rst"
125145
directory = "removal"
126146
name = "Removals"
127147
showcontent = true
128-
129-
130-
[tool.poetry]
131-
name = "semver"
132-
version = "2.9.0"
133-
description = "Python helper for Semantic Versioning (http://semver.org/)"
134-
authors = [
135-
"Kostiantyn Rybnikov <k-bx@k-bx.com>",
136-
"Sébastien Celles <s.celles@gmail.com>",
137-
]
138-
license = "BSD-3-Clause"
139-
readme = "README.rst"
140-
homepage = "https://github.com/python-semver/python-semver"
141-
repository = "https://github.com/python-semver/python-semver"
142-
documentation = "https://python-semver.readthedocs.io/en/latest/"
143-
keywords = ["semantic versioning", "semver", "version", ]
144-
classifiers = [
145-
"Topic :: Software Development",
146-
"Topic :: Software Development :: Libraries :: Python Modules",
147-
"Environment :: Web Environment",
148-
"Intended Audience :: Developers",
149-
"License :: OSI Approved :: BSD License",
150-
"Operating System :: OS Independent",
151-
"Programming Language :: Python",
152-
"Programming Language :: Python :: 3",
153-
"Programming Language :: Python :: 3.6",
154-
"Programming Language :: Python :: 3.7",
155-
"Programming Language :: Python :: 3.8",
156-
"Programming Language :: Python :: 3.9",
157-
]
158-
packages = [
159-
{ include = "src/semver/" },
160-
]
161-
include = ["CHANGELOG.rst", "CONTRIBUTORS", "README.rst"]
162-
163-
164-
[tool.poetry.scripts]
165-
pysemver = "semver:main"
166-
167-
168-
[tool.poetry.dependencies]
169-
python = "^3.5"
170-
171-
172-
[tool.poetry.dev-dependencies]
173-
pytest = "^3.0"
174-
flake8 = "^3.7"
175-
isort = "^4.3"
176-

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ classifiers =
3131
Programming Language :: Python :: 3.8
3232
Programming Language :: Python :: 3.9
3333
Programming Language :: Python :: 3.10
34+
Programming Language :: Python :: 3.11
3435
Topic :: Software Development :: Libraries :: Python Modules
3536
license = BSD
3637

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy