classification
Title: Missing dependency in distutils build
Type: behavior Stage:
Components: Distutils Versions: Python 3.2, Python 3.0, Python 2.7, Python 2.6
process
Status: open Resolution: accepted
Dependencies: Superseder:
Assigned To: tarek Nosy List: do3cc, tarek (2)
Priority: normal Keywords patch

Created on 2009-02-13 09:57 by do3cc, last changed 2009-10-28 08:32 by do3cc.

Files
File name Uploaded Description Edit Remove
dependency.patch do3cc, 2009-02-13 09:57 A Patch to fix the bug
test_install_lib.py do3cc, 2009-02-15 23:52 a rudimentary test case
test_install_lib.py do3cc, 2009-02-23 19:23
Messages (7)
msg81892 - (view) Author: Patrick Gerken (do3cc) Date: 2009-02-13 09:57
When running the command install_lib, the command build_clib is not run.
If a package contains clibs they can be dependencies for extension libs,
at least that is stated in the module docstring of build_clib.

In real life you can see it when trying to run the command install_lib
on the current reportlab2.3.

The patch provided needs do be applied in the distutils dir directly with

patch install_lib.py dependency.patch

As requested, I asked on the mailing list first, whether this really is
a bug. 
http://mail.python.org/pipermail/distutils-sig/2009-February/010974.html

I am half finished writing a test case, that I'll append to this ticket
later.
msg81894 - (view) Author: Tarek Ziadé (tarek) Date: 2009-02-13 10:02
be careful to write your test in distutils (setuptools is not part of
Python)
msg82187 - (view) Author: Patrick Gerken (do3cc) Date: 2009-02-15 23:52
The attached test works breaks without the patch and passes with the patch.

I am not sure whether the test itself is written following best practice.
I would be more than happy for a review, with hints what should be done
better.
msg82189 - (view) Author: Tarek Ziadé (tarek) Date: 2009-02-16 00:00
The patch looks good.

Minor tweaks :

- sys.path should be set to its initial state after the test
(setUp/tearDown might be helpfull here)

- ensure_finalized() should be called right before run() 
  so it acts like the real call
msg82637 - (view) Author: Patrick Gerken (do3cc) Date: 2009-02-23 19:23
Thank you, tarek

The sys.path should have been obvious.
msg94078 - (view) Author: Tarek Ziadé (tarek) Date: 2009-10-15 08:23
It looks like there's a missing part in the patch: get_outputs(), and
get_inputs() should also return files created in build()

Now something I don't understand is how reportlab distribution is doing
to copy the compiled extensions when "install" is called.

Could you point me please to the package so I can test that ?

Thanks !
msg94614 - (view) Author: Patrick Gerken (do3cc) Date: 2009-10-28 08:32
Hi Tarek,

I think clib stuff is installed in the right python directory and the 
ext install step then just finds them.

To reproduce the issue, run 
the "old" easy_install in a virtualenv.
easy_install ReportLab
It will then fail because of the missing library.

I can also show it during Plone Conference, just look for me in irc.

Thanks,

      Patrick
History
Date User Action Args
2009-10-28 08:32:59do3ccsetmessages: + msg94614
2009-10-15 08:23:20tareksetpriority: normal
resolution: accepted
messages: + msg94078

versions: + Python 3.0, Python 3.2, - Python 2.5, Python 2.4
2009-02-23 19:23:04do3ccsetfiles: + test_install_lib.py
messages: + msg82637
2009-02-16 00:00:26tareksetmessages: + msg82189
2009-02-15 23:52:16do3ccsetfiles: + test_install_lib.py
messages: + msg82187
2009-02-13 10:02:23tareksetmessages: + msg81894
2009-02-13 09:57:07do3cccreate