I'm currently building a project that imply sources from different languages such as C, C++ and some homemade python module. I'm using Automake/Autotools to install the sources. Problem here is when i'm building a .deb out of this i have some problems.
- Installation
Python installation is performed like this in my Makefile.am
$(PYTHON) setup.py install \
--prefix $(DESTDIR)$(prefix) \
--record $(DESTDIR)$(sysconfdir)/nina/nina_installed_files.txt \
--verbose
Which is working perfectly when running make install
(installation path : /usr/local/lib/python2.7/dist-packages
)
But, when i'm packaging the .deb with dpkg-buildpackage
commands, it's installing package at /usr/lib/python2.7/site-package
which is not in pythonpath. I saw that you can append some path to python path, but i don't want to change .bashrc
if it's not absolutely necessary.
Ideadly i'd like to find a way to install python module at /usr/lib/python2.7/dist-packages
but python setup.py install
doesn't allow full installation path argument.
PS : i alrealy tried --root $(DESTDIR)
argument instead of --prefix, but this way is installing in /usr/local/lib/python2.7/dist-packages
. And install some files in /usr/local
is contrary to .deb packaging rules. Plus it doesn't work with autotools this way.
setup.py
comming from, can you post the code?# -*- coding: utf-8 -*- from distutils.core import setup, Extension # define the extension module uinput_wrapping_module = Extension('uinput_wrapping_module', sources=['uinput_wrapping_module.c','write_keyboard.c','timed_keystrokes.c','manage_devices.c']) # run the setup setup(ext_modules=[uinput_wrapping_module], name='name', version=1, description='Wrapped C', url='', )