Skip to main content
edited title
Link
Neah-Ko
  • 123
  • 1
  • 10

Makefil Makefile installing python module out of of pythonpath  ?

Source Link
Neah-Ko
  • 123
  • 1
  • 10

Makefil installing python module out of of pythonpath ?

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.