6

I have a few projects, all containing setup.py and requirements.txt. Is it possible to package a whole project in one single file including all requirements compiled and ready to install?

What I have tried:

python setup.py bdist_wheel

Builds a .whl file and puts it in the dist directory. The wheel does not contain any dependencies.

pip wheel -r requirements.txt -w wheelhouse

Builds wheels for every single requirement and puts it in the wheelhouse directory. Includes nicely compiled code for numpy for example (I know I have to build this on every platform I want it to run later on, that's fine).

Seems I am just missing the last piece of the puzzle.

Machavity
  • 29,816
  • 26
  • 86
  • 96
kev
  • 7,912
  • 12
  • 51
  • 92

1 Answers1

3

You probably want to take a look at tools like cx_Freeze or PyInstaller if you absolutely want one single file containing everything. Pip itself cannot do what you want.

Tibebes. M
  • 5,841
  • 4
  • 12
  • 34
renefritze
  • 1,959
  • 14
  • 23