From 13ebfe393175a44b263058da0aa9e81423984345 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 11 Apr 2019 23:41:06 -0700 Subject: Refactor base_version to major_version. - base_version includes the minor version number, and we want the major version which is only the first two bits of the version number. --- setup.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 0f097cac4..cd89ac1e1 100644 --- a/setup.py +++ b/setup.py @@ -54,11 +54,13 @@ docs_extras = [ testing_extras = tests_require + ['coverage', 'nose'] -base_version = parse_version(VERSION).base_version +major_version = ".".join( + str(v) for v in parse_version(VERSION)._version.release[:2] +) # black is refusing to make anything under 80 chars so just splitting it up docs_fmt = 'https://docs.pylonsproject.org/projects/pyramid/en/{}-branch/' -docs_url = docs_fmt.format(base_version) +docs_url = docs_fmt.format(major_version) setup( name='pyramid', @@ -87,7 +89,7 @@ setup( url="https://trypyramid.com", project_urls={ 'Documentation': docs_url, - 'Changelog': '{}whatsnew-{}.html'.format(docs_url, base_version), + 'Changelog': '{}whatsnew-{}.html'.format(docs_url, major_version), 'Issue Tracker': 'https://github.com/Pylons/pyramid/issues', }, license="BSD-derived (http://www.repoze.org/LICENSE.txt)", -- cgit v1.2.3 From 755e34af7e2e259a2e25853d042ffa84414dcce3 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 11 Apr 2019 23:55:01 -0700 Subject: Don't play with _privates --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index cd89ac1e1..9dcde2f44 100644 --- a/setup.py +++ b/setup.py @@ -54,9 +54,7 @@ docs_extras = [ testing_extras = tests_require + ['coverage', 'nose'] -major_version = ".".join( - str(v) for v in parse_version(VERSION)._version.release[:2] -) +major_version = ".".join(VERSION.split(".")[:2]) # black is refusing to make anything under 80 chars so just splitting it up docs_fmt = 'https://docs.pylonsproject.org/projects/pyramid/en/{}-branch/' -- cgit v1.2.3 From e4ae88a2bc707538437a15645fb12a8ee063f70e Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 12 Apr 2019 12:52:29 -0700 Subject: refactor major_version to branch_version --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 9dcde2f44..e3154d210 100644 --- a/setup.py +++ b/setup.py @@ -54,11 +54,11 @@ docs_extras = [ testing_extras = tests_require + ['coverage', 'nose'] -major_version = ".".join(VERSION.split(".")[:2]) +branch_version = ".".join(VERSION.split(".")[:2]) # black is refusing to make anything under 80 chars so just splitting it up docs_fmt = 'https://docs.pylonsproject.org/projects/pyramid/en/{}-branch/' -docs_url = docs_fmt.format(major_version) +docs_url = docs_fmt.format(branch_version) setup( name='pyramid', @@ -87,7 +87,7 @@ setup( url="https://trypyramid.com", project_urls={ 'Documentation': docs_url, - 'Changelog': '{}whatsnew-{}.html'.format(docs_url, major_version), + 'Changelog': '{}whatsnew-{}.html'.format(docs_url, branch_version), 'Issue Tracker': 'https://github.com/Pylons/pyramid/issues', }, license="BSD-derived (http://www.repoze.org/LICENSE.txt)", -- cgit v1.2.3 From 0642e293546f6f674e5d33f8fd0c82d664aebe60 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 13 Apr 2019 00:01:29 -0700 Subject: lint --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index e3154d210..4db78d158 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,6 @@ # ############################################################################## from setuptools import find_packages, setup -from pkg_resources import parse_version def readfile(name): -- cgit v1.2.3