Skip to content

Commit 221bfba

Browse files
committed
Fix python-semver#315: Create 3.0.0-dev.3
* Improve entries for PyPI in setup.cfg * Remove key "download_url" as it points to a broken URL * Add Changelog entry pointing to RTD * Raise version to 3.0.0-dev.3 * Update release procedure * Update Black formatter config * Replace "exclude" with "extend-exclude" * Ignore all *.py files in project's root directory * Include "setup.py" explicity
1 parent dd8f5f3 commit 221bfba

File tree

6 files changed

+53
-33
lines changed

6 files changed

+53
-33
lines changed

Diff for: changelog.d/315.doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve release procedure text

Diff for: docs/usage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Getting the Version of semver
2626
To know the version of semver itself, use the following construct::
2727

2828
>>> semver.__version__
29-
'3.0.0-dev.2'
29+
'3.0.0-dev.3'
3030

3131

3232
Creating a Version

Diff for: pyproject.toml

+7-14
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,13 @@ build-backend = "setuptools.build_meta"
1111
line-length = 88
1212
target-version = ['py36', 'py37', 'py38', 'py39', 'py310']
1313
# diff = true
14-
exclude = '''
15-
(
16-
/(
17-
\.eggs # exclude a few common directories in the
18-
| \.git # root of the project
19-
| \.mypy_cache
20-
| \.tox
21-
| \.venv
22-
| \.env
23-
| _build
24-
| build
25-
| dist
26-
)/
27-
)
14+
extend-exclude = '''
15+
# A regex preceded with ^/ will apply only to files and directories
16+
# in the root of the project.
17+
^/*.py
18+
'''
19+
include = '''
20+
^/setup.py
2821
'''
2922

3023
[tool.towncrier]

Diff for: release-procedure.md

+42-16
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,31 @@ create a new release.
55

66
## Prepare the Release
77

8-
1. Verify that issues about new release are closed https://github.com/python-semver/python-semver/issues.
8+
1. Verify:
99

10-
1. Verify that no pull requests that should be included in this release haven't been left out https://github.com/python-semver/python-semver/pulls.
10+
* all issues for a new release are closed: <https://github.com/python-semver/python-semver/issues>.
1111

12-
1. Verify that continuous integration for latest build was passing https://travis-ci.com/python-semver/python-semver.
12+
* that all pull requests that should be included in this release are merged: <https://github.com/python-semver/python-semver/pulls>.
1313

14-
1. Create a new branch `release/VERSION`.
14+
* that continuous integration for latest build was passing: <https://github.com/python-semver/python-semver/actions>.
15+
16+
1. Create a new branch `release/<VERSION>`.
1517

1618
1. If one or several supported Python versions have been removed or added, verify that the 3 following files have been updated:
17-
* [setup.py](https://github.com/python-semver/python-semver/blob/master/setup.py)
18-
* [tox.ini](https://github.com/python-semver/python-semver/blob/master/tox.ini)
19-
* [.travis.yml](https://github.com/python-semver/python-semver/blob/master/.travis.yml)
19+
* `setup.cfg`
20+
* `tox.ini`
21+
* `.git/workflows/pythonpackage.yml`
22+
23+
1. Verify that the version has been updated and follow
24+
<https://semver.org>:
25+
26+
* `src/semver/__about__.py`
27+
* `docs/usage.rst`
2028

2129
1. Add eventually new contributor(s) to [CONTRIBUTORS](https://github.com/python-semver/python-semver/blob/master/CONTRIBUTORS).
2230

23-
1. Verify that `__version__` in [semver.py](https://github.com/python-semver/python-semver/blob/master/semver.py) have been updated and follow https://semver.org.
31+
32+
1. Check if all changelog entries are created. If some are missing, [create them](https://python-semver.readthedocs.io/en/latest/development.html#adding-a-changelog-entry).
2433

2534
1. Show the new draft [CHANGELOG](https://github.com/python-semver/python-semver/blob/master/CHANGELOG.rst) entry for the latest release with:
2635

@@ -36,32 +45,47 @@ create a new release.
3645

3746
$ tox -e docs
3847

48+
1. Commit all changes, push, and create a pull request.
49+
3950

4051
## Create the New Release
4152

42-
1. Ensure that long description (ie [README.rst](https://github.com/python-semver/python-semver/blob/master/README.rst)) can be correctly rendered by Pypi using `restview --long-description`
53+
1. Ensure that long description ([README.rst](https://github.com/python-semver/python-semver/blob/master/README.rst)) can be correctly rendered by Pypi using `restview --long-description`
54+
55+
1. Clean up your local Git repository. Be careful,
56+
as it **will remove all files** which are not
57+
versioned by Git:
58+
59+
$ git clean -xfd
60+
61+
Before you create your distribution files, clean
62+
the directory too:
63+
64+
$ rm dist/*
65+
66+
1. Create the distribution files (wheel and source):
67+
68+
$ tox -e prepare-dist
4369

4470
1. Upload the wheel and source to TestPyPI first:
4571

46-
```bash
47-
$ git clean -xfd
48-
$ rm dist/*
49-
$ python3 setup.py sdist bdist_wheel
72+
```bash
5073
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
5174
```
5275

53-
If you have a `~/.pypirc` with a `testpyi` section, the upload can be
76+
If you have a `~/.pypirc` with a `testpypi` section, the upload can be
5477
simplified:
5578

56-
$ twine upload --repository testpyi dist/*
79+
$ twine upload --repository testpypi dist/*
5780

5881
1. Check if everything is okay with the wheel.
82+
Check also the web site `https://test.pypi.org/project/<VERSION>/`
5983

6084
1. Upload to PyPI:
6185

6286
```bash
6387
$ git clean -xfd
64-
$ python setup.py register sdist bdist_wheel
88+
$ tox -e prepare-dist
6589
$ twine upload dist/*
6690
```
6791

@@ -78,4 +102,6 @@ create a new release.
78102
document the new release.
79103
Usually it's enough to take it from a commit message or the tag description.
80104
105+
1. Announce it in <https://github.com/python-semver/python-semver/discussions/categories/announcements>.
106+
81107
You're done! Celebrate!

Diff for: setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ author_email = [email protected]
1414
maintainer = Sebastien Celles, Tom Schraitle
1515
maintainer_email = [email protected]
1616
url = https://github.com/python-semver/python-semver
17-
download_url = https://github.com/python-semver/python-semver/downloads
1817
project_urls =
18+
Changelog = https://python-semver.readthedocs.io/en/latest/changelog.html
1919
Documentation = https://python-semver.rtfd.io
2020
Releases = https://github.com/python-semver/python-semver/releases
2121
Bug Tracker = https://github.com/python-semver/python-semver/issues

Diff for: src/semver/__about__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"""
1717

1818
#: Semver version
19-
__version__ = "3.0.0-dev.2"
19+
__version__ = "3.0.0-dev.3"
2020

2121
#: Original semver author
2222
__author__ = "Kostiantyn Rybnikov"

0 commit comments

Comments
 (0)