Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BLD: parameterize python_requires #13637

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

Conversation

tacaswell
Copy link
Member

Only write the minimum version 1 place instead of 3

Only write the minimum version 1 place instead of 3
@@ -11,14 +11,16 @@
from setuptools.command.test import test as TestCommand
from setuptools.command.build_ext import build_ext as BuildExtCommand

if sys.version_info < (3, 6):
min_version = (3, 6)

Copy link
Member

@jklymak jklymak Mar 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want to just define min_ver_str = '.'.join(str(n) for n in min_version) here, and use that below? EDIT: You could then use f-strings:
`f"...Python {min_ver_str} or above is required"
(Ooops that was dumb, since you wouldn't print these if f strings were allowed)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be slightly better. I‘ll wait a day or so to see if there‘s feedback. Otherwise I will merge as is. You can always do a follow up if you feel inclined.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or

min_version = distutils.version.LooseVersion("3.6.0")
if platform.python_version() < min_version: ...

...

python_requires=">={}".format(min_version)

@tacaswell tacaswell added this to the v3.2.0 milestone Mar 8, 2019
setup.py Outdated Show resolved Hide resolved
Co-Authored-By: tacaswell <tcaswell@gmail.com>
@dstansby dstansby merged commit ef6fe2e into matplotlib:master Mar 11, 2019
@tacaswell tacaswell deleted the bld_parameterize_python_requires branch March 11, 2019 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.