Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install to deb binary

Tags:

package

pip

deb

So I got to install a large number of requirements from pip for production servers. Most of those requirements require python-dev and build-essential to compile.

Now the way I look at it - python-dev and build-essential comes with some overhead, and one might argue, some security issues.

To save performance on production environment, my idea is to make binary packages for those requirements.

I have found that most pip installations come with installed-files.txt file, listing all installed files. So it is quite easy just to pack all of the listed files to some binary package.

Now my question - is it worth it ? and is there some easier way to go around it ? Also, maybe someone has tried it and got some helper scripts ready on github. What about creating some virtual env - installing all of the dependancies and making single large binary package for all of them ?

like image 853
Katafalkas Avatar asked Oct 22 '22 08:10

Katafalkas


1 Answers

You can package all the Python packages as Debian Packages with py2dsc. See the Debian Python Wiki for more details. I have done that in the last hour and it works well.

like image 112
Martin Ueding Avatar answered Oct 24 '22 20:10

Martin Ueding