1

I have a project named myapp written in python, and I'm creating it using setuptools, with the corresponding setup file at myapp/setup.py, where all the dependencies of my project are specified. Then, I'm creating a debian package myapp.deb that contains the whole python project, and its only dependency is python-setuptools. The problem is that I'm not sure who should handle my project's dependencies. For now, it goes like this

  1. when I run apt-get install myapp, it copies the python code to /var/lib/myapp and installs the python-setuptools dependency.
  2. the postinst script of the myapp.deb package calls python /var/lib/myapp/setup.py install, installing myapp with setuptools, which fetches all the dependencies that I specified in the setup.py file.

So, my questions are:

  • Is this fine, to let python's setuptools handle the dependencies?
  • Should I remove the dependencies from myapp/setup.py and add the corresponding debian packages as dependencies of the outter myapp.deb package? In this case, setuptools would install myapp, but not fetch any dependency, which should already have been retrieved with apt-get install myapp. But in that case, I need those dependencies also to run the unit tests of myapp when I call python myapp/setup.py test. How do I handle the test dependencies?
  • Should I completely rely on apt, remove setup.py, and not use setuptools at all? In that case, how would I run my unit tests, with the proper dependencies set?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.