3

I would like to package a software that contains both C++ and Python code. The C++ headers and libraries compile fine on launchpad and are properly installed (thanks to some .install files).

On the Python side of things, the names of the (raw) install files would be

/build/buildd/trilinos-11.1~20130107/debian/tmp/usr/lib/python2.7/dist-packages/PyTrilinos/AztecOO.py /build/buildd/trilinos-11.1~20130107/debian/tmp/usr/lib/python2.7/dist-packages/PyTrilinos/AztecOO.pyc /build/buildd/trilinos-11.1~20130107/debian/tmp/usr/lib/python2.7/dist-packages/PyTrilinos/_AztecOO.so 

What's the proper way to have them installed? Should I also create an .install file listing those files, or is there way to use dh_python2?

2 Answers 2

1

Both. First you install them, then you call dh_python2.

dh_python will move things around, remove .pyc files, and handle byte-compilation at installation time.

2
  • What do you mean by "then"? Is a dedicated install target in debian/rules necessary that controls the installation and also calls dh_python2? Commented Jan 12, 2013 at 18:35
  • dh_install is to put them in the right package. You need to make sure that dh_python2 gets called, but that usually wouldn't happen in an install target... Commented Jan 12, 2013 at 19:19
1

The usual thing to do is to create a setup.py file and then call this from your rules file. With dh, your rules file, at least the python part, can then be as simple as

%: dh $@ --with python2 --buildsystem=python_distutils --install-layout=deb 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.