Answer the question
In order to leave comments, you need to log in
How to properly package Python applications in a DEB package?
I am developing another project, there is an opportunity to creatively realize myself. I decided to fully configure the environment and deploy. The project itself is written in Django (1.8, python 3.4).
I use Ansible to set up the environment and deploy, but what I don't like is installing dev packages and compiling dependencies on each server. Googling led to the packaging of applications in deb-packages. But I have not found good, voluminous tutorials / guides. Now the installation of the application looks something like this:
1. Download the repository.
2. Install virtualenv.
3. Install pip dependencies.
4. Restart all servers.
The question is simple - how to package an application in a deb package? Maybe there are articles, blogs, aimed at this topic?
PS. Released on wheel packages. Can they somehow be integrated into this process of packaging in deb, or is it from a completely different opera?
Answer the question
In order to leave comments, you need to log in
It's easy with wheel. You create a local folder with wheel-packages, they are already compiled there. You copy it to the server and install from there. If desired, you can also wrap it in a deb package.
pip wheel --wheel-dir=/path/to/dir lxml
pip install --no-index --find-links=/path/to/dir
You need to read the guide for building deb packages.
help.ubuntu.ru/wiki/%D1%81%D0%BE%D0%B7%D0%B4%D0%B0...
habrahabr.ru/post/78094
I think for a start there is enough to push off. The examples may be outdated.
What will be in the deb package is not very important. It might just be a text file.
In your case, we prepare the entire environment, for example, in /opt/my_project
We create a deb package and write dependencies on packages.
For example, before installing our package, you need to install python 3.4
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question