Bug 531901
| Summary: | The python package has a dependency on the python-devel package | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Andrew McNabb <amcnabb> |
| Component: | python | Assignee: | Dave Malcolm <dmalcolm> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | rawhide | CC: | a.badger, dmalcolm, ivazqueznet, james.antill, jonathansteffan, katzj, kparal |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-10-30 03:27:17 UTC | Type: | --- |
| 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: | 510659 | ||
Sorry, in the last line, that should be python-devel, not python3-devel. Discussed before in: https://bugzilla.redhat.com/show_bug.cgi?id=251645#c18 Upstream bug about this (no response -- if someone wants to follow up, we can talk to tarek on #distutils): http://bugs.python.org/issue4359 FWIW, I'm for doing this as distutils at this point in time. Thanks for filing this report. From IRC: <abadger1999> dmalcolm: https://bugzilla.redhat.com/show_bug.cgi?id=251645#c18 <abadger1999> dmalcolm: Upstream report too (but with no input since I opened it) http://bugs.python.org/issue4359 From my reading of the code, get_makefile_filename merely tells you what the filename is. _init_posix() needs to actually _read_ the filename, so it would have to be present; similarly for parse_config_h(). So it looks like for _init_posix() to work, the following files should be moved from the -devel to the main subpackage: %{_libdir}/python%{pybasever}/config/Makefile /usr/include/python2.6/pyconfig-{32|64}.h (but not /usr/include/python2.6/pyconfig.h ; it doesn't seem to be used) thus requiring also these dirs be moved from -devel to core: %dir %{_libdir}/python%{pybasever}/config /usr/include/python2.6 whilst keeping the rest of their content in the -devel subpackage (thus requiring a slight rewrite of the %files part of the specfile) Does this sound correct? That sounds correct though I haven't read over that part of the code for several years, now. OK, without python-devel installed, with local build of python-2.6.4-1.fc13.i386:
$ python -c "import distutils.sysconfig; distutils.sysconfig._init_posix()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.6/distutils/sysconfig.py", line 378, in _init_posix
raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/lib/python2.6/config/Makefile (No such file or directory)
With fixed local build of python (without python-devel installed) it works:
$ python -c "import distutils.sysconfig; print distutils.sysconfig._init_posix()"
None
Built into rawhide as 2.6.4-2 (http://koji.fedoraproject.org/koji/taskinfo?taskID=1778332)
I also addressed this for python 3, see: https://bugzilla.redhat.com/show_bug.cgi?id=526126#c38 *** Bug 533341 has been marked as a duplicate of this bug. *** |
Currently, %{pylibdir}/config/* are put into the devel subpackage. However, distutils needs to load %{pylibdir}/config/Makefile (see the get_makefile_filename() function in distutils/sysconfig.py. Since distutils is and should be in the main python package, then %{pylibdir}/config/Makefile also needs to be in the main python package instead of the devel subpackage. Based on _init_posix() in distutils/sysconfig.py, it looks like this is also true for /usr/include/python2.6/pyconfig.h. The only alternative would be to put distutils into the python3-devel subpackage, but that doesn't seem right at all.