472,372 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,372 software developers and data experts.

How to test python extension modules during 'make check' / 'make distcheck'?

Hi pythonians,

I'm one of the maintainers of an open source image processing toolkit
(OpenCV) and responsible for parts of the autotools setup. The package
mainly consists of four shared libraries but is accompanied by a python
package containing some pure python code and of course extension modules
for the four libraries.

Now during the last month we were preparing a major release which means
testing, fixing, testing, fixing, ... in the first degree. Typical
functionality of the shared libraries is verified during 'make check'
and 'make distcheck' by binaries that are linked against the libraries
(straight forward) and are listed in the 'TESTS' automake primary.

Unfortunately, many problems with the python wrappers arose from time to
time. Currently we have to build and install before we can run any
python-based test routines. When trying to integrate python module
testing into the automake setup, there are some problems that I couldn't
find a solution for:

a) the extension modules are built in different (other) subdirectories -
so they are not in the local path where python could find them

b) the libraries and extension modules are built with libtool and may
have rpaths compiled in (is this problematic)?

c) a different version of our wrappers might be installed on the testing
machine, somewhere in python/site-packages. How can I make sure that
python only finds my 'new' local generated modules?

Since the project is targeted at C/C++ developers in the first degree
and the python wrappers are just an add-on, there is no chance to
migrate it away from automake to someting else (like distutils, etc.).

Did someone solve a similar problem?

Thanks in advance,

Mark

P.S.: I'll post a similar message to the automake mailing list, but
probably python developers are a minority there ...

--
Dipl.-Ing. Mark Asbach Tel +49 (0)241-80-27677
Institute of Communications Engineering Fax +49 (0)241 80-22196
RWTH Aachen University, Germany http://www.ient.rwth-aachen.de
Nov 2 '06 #1
1 1559

Mark Asbach wrote:
Hi pythonians,

I'm one of the maintainers of an open source image processing toolkit
(OpenCV) and responsible for parts of the autotools setup. The package
mainly consists of four shared libraries but is accompanied by a python
package containing some pure python code and of course extension modules
for the four libraries.

Now during the last month we were preparing a major release which means
testing, fixing, testing, fixing, ... in the first degree. Typical
functionality of the shared libraries is verified during 'make check'
and 'make distcheck' by binaries that are linked against the libraries
(straight forward) and are listed in the 'TESTS' automake primary.

Unfortunately, many problems with the python wrappers arose from time to
time. Currently we have to build and install before we can run any
python-based test routines. When trying to integrate python module
testing into the automake setup, there are some problems that I couldn't
find a solution for:

a) the extension modules are built in different (other) subdirectories -
so they are not in the local path where python could find them
As I understand it's not python that cannot find them but dynamic
linker. On ELF UNIX systems you can set LD_LIBRARY_PATH to help linker
find dependencies, on Windows -- PATH. If you need details, you can
find them in dynamic linker manuals.
b) the libraries and extension modules are built with libtool and may
have rpaths compiled in (is this problematic)?
libtools seems to have some knobs to cope with rpath:
http://sourceware.org/ml/bug-glibc/2.../msg00058.html
c) a different version of our wrappers might be installed on the testing
machine, somewhere in python/site-packages. How can I make sure that
python only finds my 'new' local generated modules?
Set PYTHONPATH to the directory where locally generated modules are
located. They will be found before site packages.

-- Leo

Nov 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Matthias Baas | last post by:
Hi, are there any guidelines about what to do if a Windows extension for Python 2.4 requires the C++ runtime (msvcp71.dll)? If I want to distribute a binary installer of an extension that...
27
by: Josh | last post by:
We have a program written in VB6 (over 100,000 lines of code and 230 UI screens) that we want to get out of VB and into a better language. The program is over 10 years old and has already been...
1
by: Petr Prikryl | last post by:
Do you think that the following could became PEP (pre PEP). Please, read it, comment it, reformulate it,... Abstract Introduction of the mechanism for language extensions via modules...
15
by: kyosohma | last post by:
Hi, I am trying to get a small group of volunteers together to create Windows binaries for any Python extension developer that needs them, much like the package/extension builders who volunteer...
4
by: Arnaud Delobelle | last post by:
Hi fellow python enthusiasts. Having recently acquired a MacBook Pro (Intel Core 2 Duo) which comes with python2.5, I have been installing some modules that I need (PIL, psycopg2, PyXML ...). ...
0
by: Murat Gunduz | last post by:
Dear list member, I am using a Linux machine (Fedora Core 7, 64 bit): Linux 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 14:56:37 EDT 2007 x86_64 I tried to compile a software (ncvtk) with the simple...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.