Bug 531901 - The python package has a dependency on the python-devel package
Summary: The python package has a dependency on the python-devel package
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 533341 (view as bug list)
Depends On:
Blocks: 510659
TreeView+ depends on / blocked
 
Reported: 2009-10-29 19:21 UTC by Andrew McNabb
Modified: 2009-11-06 16:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-10-30 03:27:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andrew McNabb 2009-10-29 19:21:20 UTC
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.

Comment 1 Andrew McNabb 2009-10-29 19:21:55 UTC
Sorry, in the last line, that should be python-devel, not python3-devel.

Comment 2 Toshio Ernie Kuratomi 2009-10-29 23:52:43 UTC
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.

Comment 3 Dave Malcolm 2009-10-30 00:00:59 UTC
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?

Comment 4 Toshio Ernie Kuratomi 2009-10-30 00:03:37 UTC
That sounds correct though I haven't read over that part of the code for several years, now.

Comment 5 Dave Malcolm 2009-10-30 03:27:17 UTC
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)

Comment 6 Dave Malcolm 2009-10-30 03:28:02 UTC
I also addressed this for python 3, see:
https://bugzilla.redhat.com/show_bug.cgi?id=526126#c38

Comment 7 Dave Malcolm 2009-11-06 16:26:39 UTC
*** Bug 533341 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.