Skip to content

Commit

Permalink
make pre-release: check if psutil version already exists on PYPI
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Dec 15, 2023
1 parent 7c10295 commit 3080df4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ PY3_DEPS = \
check-manifest \
concurrencytest \
coverage \
packaging \
pylint \
pyperf \
pypinfo \
Expand Down Expand Up @@ -269,6 +270,13 @@ pre-release: ## Check if we're ready to produce a new release.
${MAKE} sdist
${MAKE} check-sdist
${MAKE} install
$(PYTHON) -c \
"import requests, sys; \
from packaging.version import parse; \
from psutil import __version__; \
res = requests.get('https://pypi.org/pypi/psutil/json', timeout=5); \
versions = sorted(res.json()['releases'], key=parse, reverse=True); \
sys.exit('version %r already exists on PYPI' % __version__) if __version__ in versions else 0"
${MAKE} download-wheels-github
${MAKE} download-wheels-appveyor
${MAKE} check-wheels
Expand Down
2 changes: 1 addition & 1 deletion psutil/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
AF_LINK = _psplatform.AF_LINK

__author__ = "Giampaolo Rodola'"
__version__ = "5.9.6"
__version__ = "5.9.7"
version_info = tuple([int(num) for num in __version__.split('.')])

_timer = getattr(time, 'monotonic', time.time)
Expand Down

0 comments on commit 3080df4

Please sign in to comment.