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

Update setup.py: add classifiers & python_requires #2151

Merged
merged 2 commits into from
Apr 25, 2020

Conversation

opacam
Copy link
Member

@opacam opacam commented Apr 24, 2020

No description provided.

setup.py Outdated
@@ -88,6 +88,7 @@ def recursively_include(results, directory, patterns):
description='Android APK packager for Python scripts and apps',
long_description=long_description,
long_description_content_type='text/markdown',
python_requires="==3.*,>=3.6.0",
Copy link
Member

Choose a reason for hiding this comment

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

Nice! Just curious isn't this redundant? Don't we only need python_requires="==3.*,>=3.6.0".
If you added it in case of Python 4, I would say keep it simple

AndreMiras
AndreMiras previously approved these changes Apr 24, 2020
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

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

I think for a while we also didn't have it as like Django is doing, you still want to have people from Python2 to see this package when pip search-ing or pip install-ing, so then we can display an explicit message saying Python 2 is not supported.
See https://github.com/django/django/blob/3.0.5/setup.py tell me if it makes sense to you?

@opacam
Copy link
Member Author

opacam commented Apr 24, 2020

Mmmm...interesting...I did some research...

I think that pip search doesn't care about python version...for instance...I maintain a Python3 only package, never compatible with Python2. This project is named Cohen3 and here you have the first version I published at pipy. You will se that is classified as Python3, but here you have the pip2 search:

opacam@DEPOBOX:~$ pip2 search Cohen3
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Cohen3 (0.9.2)  - Cohen3 - DLNA/UPnP Media Server

And if you try to install a python3 only package, using the branch of this PR:

opacam@DEPOBOX:~$ pip2 install https://github.com/opacam/python-for-android/archive/feature-update-classifiers.zip --user
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting https://github.com/opacam/python-for-android/archive/feature-update-classifiers.zip
  Downloading https://github.com/opacam/python-for-android/archive/feature-update-classifiers.zip
     / 2.0 MB 167 kB/s
ERROR: Package 'python-for-android' requires a different Python: 2.7.18 not in '==3.*,>=3.6.0'

@AndreMiras
Copy link
Member

AndreMiras commented Apr 24, 2020

I think pip do care when searching and your project didn't have the Python classifier on the setup so I think that's why it appeared https://github.com/opacam/Cohen3/blob/0.8.0/setup.py
Either way I don't really mind as it was more a heads up and I think Django really does it for this reason
Edit: to make it clear, I'm talking about python_requires part
Edit: Check specifically the Note https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires

@opacam opacam merged commit 83f35ab into kivy:develop Apr 25, 2020
@opacam opacam deleted the feature-update-classifiers branch April 25, 2020 17:31
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.

2 participants