8000 BUG: Fix setup.py to work in maintenance branches. by charris · Pull Request #19120 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fix setup.py to work in maintenance branches. #19120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import textwrap
import warnings
import builtins
import re


# Python supported version checks. Keep right after stdlib imports to ensure we
Expand All @@ -46,8 +47,14 @@
# The version components are changed from ints to strings, but only VERSION
# seems to matter outside of this module and it was already a str.
FULLVERSION = versioneer.get_version()
ISRELEASED = 'dev' not in FULLVERSION
MAJOR, MINOR, MICRO = FULLVERSION.split('.')[:3]

# Capture the version string:
# 1.22.0.dev0+ ... -> ISRELEASED == False, VERSION == 1.22.0
# 1.22.0rc1+ ... -> ISRELEASED == False, VERSION == 1.22.0
# 1.22.0 ... -> ISRELEASED == True, VERSION == 1.22.0
# 1.22.0rc1 ... -> ISRELEASED == True, VERSION == 1.22.0
ISRELEASED = re.search(r'(dev|\+)', FULLVERSION) is None
MAJOR, MINOR, MICRO = re.match(r'(\d+)\.(\d+)\.(\d+)', FULLVERSION).groups()
VERSION = '{}.{}.{}'.format(MAJOR, MINOR, MICRO)

# The first version not in the `Programming Language :: Python :: ...` classifiers above
Expand Down
0