Bug 1793010
| Summary: | python-pyside2 fails to build with Python 3.9: Unsupported python version detected | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
| Component: | python-pyside2 | Assignee: | Richard Shaw <hobbes1069> |
| Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | cstratak, hobbes1069, laurent.rineau__fedora, mhroncok, tuju |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-01-21 16:07:45 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1785415 | ||
|
Description
Miro Hrončok
2020-01-20 13:48:22 UTC
I don't think this is an error with python-pyside2 but rather an error in setuptools. Setup.py does not contain any version specific requirements that I could find grepping through the sources. I recall this: https://src.fedoraproject.org/rpms/python-pyside2/c/ffa9161bad6ea6e2d4d08095e41f9df69d23531e?branch=master This seems like the same thing. The "Unsupported python version detected." error comes from pyside2, not setuptools. I grepped through the whole source and could not find any relevant occurence of "(3, 8)", so I don't know where that's coming from. I looked through setup.py and didn't see any version information but it may be coming from an imported file. It reads the classifiers:
[pyside-setup-opensource-src-5.13.2 (master %)]$ rg "Unsupported python version detected"
build_scripts/main.py
157: print("Unsupported python version detected. Only these python versions are supported: {}"
def check_allowed_python_version():
"""
Make sure that setup.py is run with an allowed python version.
"""
import re
pattern = r'Programming Language :: Python :: (\d+)\.(\d+)'
supported = []
for line in config.python_version_classifiers:
found = re.search(pattern, line)
if found:
major = int(found.group(1))
minor = int(found.group(2))
supported.append( (major, minor) )
this_py = sys.version_info[:2]
if this_py not in supported:
print("Unsupported python version detected. Only these python versions are supported: {}"
.format(supported))
sys.exit(1)
And the classifiers are in build_scripts/config.py:
# Used by check_allowed_python_version to validate the
# interpreter version.
self.python_version_classifiers = [
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
]
See the linked patch for Python 3.8.
I verified updating the patch fixes the build. Fix committed to master. We'll worry about if it works later :) |