Skip to content
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

Demonstrate python_requires usage #87

Merged
merged 3 commits into from
Jan 31, 2019
Merged

Demonstrate python_requires usage #87

merged 3 commits into from
Jan 31, 2019

Conversation

marcelm
Copy link
Contributor

@marcelm marcelm commented Jan 30, 2019

Closes #53

setup.py Outdated
# install the project if the version does not match. If you support Python 2
# or have more complicated version requirements, see
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
python_requires='>=3.5',
Copy link
Member

Choose a reason for hiding this comment

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

This is at odds with the classifiers above. I'm also concerned about this being missed by folks that fork this repo to start their new project, and not understanding why their package isn't installable with Python 2. Let's make this:

Suggested change
python_requires='>=3.5',
python_requires='>=2.7',

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You’re right, I copied over the suggestion from PR #53 and didn’t notice the inconsistency. To be consistent with the classifiers, however, Python versions 3.0 to 3.3 need to be excluded as documented.

Well, to be precise: With the new commit I made, python_requires allows Python 3.8, but the classifiers don’t. I think that’s fine they are used a bit differently (versions in python_requires are and-ed and classifiers are or-ed).

setup.py Show resolved Hide resolved
@pradyunsg pradyunsg requested a review from di January 31, 2019 09:05
@di di merged commit b064884 into pypa:master Jan 31, 2019
@marcelm marcelm deleted the patch-1 branch January 31, 2019 19:47
@marcelm
Copy link
Contributor Author

marcelm commented Jan 31, 2019

Thanks!

Freso added a commit to Freso/python-musicbrainzngs that referenced this pull request Mar 10, 2019
This specifies which versions of Python the library is compatible with.
This both prevents the module from being installed in an incompatible
Python environment, and will also enable users after future releases to
still `pip install musicbrainzngs` and get a version that is compatible
with their Python setup.

Versions are based on the ones currently being tested for in Travis
according to `.travis.yml`.

See https://packaging.python.org/guides/dropping-older-python-versions/
and pypa/sampleproject#87

Signed-off-by: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
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.

4 participants