Skip to content

A reaaaally short script for generating Python executable files using info from Pipfile

License

Notifications You must be signed in to change notification settings

it-is-wednesday/pipenv-pex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pipenv-pex

Quickly create PEX files out of your Pipenv projects using this one simple command!

PEX files are an expansion upon zipapps. You can bundle your application's modules along with their dependencies into one file, executable using a Python interpreter.

Installation

Using the lovely pipx:

pipx install pipenv-pex

Usage

cd project-with-pipfile
pipenv-pex --entry-point "epic_project:main"
python ./project-with-pipfile.pex
  • --entry-point argument should have the form “pkg.mod:fn”, where “pkg.mod” is a package/module in the archive, and “fn” is a callable in the given module. (taken fromhere)
  • All parameters except --exclude are passed directly to PEX, --entry-point being one of them.

Why not use pex directly?

Since pipenx-pex piggybacks on the informaton in your Pipfile, some automations become possible:

  • Dependencies are fetched from your Pipfile, so you don't have to update your Makefile each time you change a dependency in your Pipfile
  • (unrelated to pipenv actually) Irrelevant noise files are ignored when bundling the modules (such as .mypy_cache, __pycache__ etc.), saving a few precious MBs :) additional files and directories can be added to this list via the --exclude parameter.

About

A reaaaally short script for generating Python executable files using info from Pipfile

Resources

License

Stars

Watchers

Forks

Packages

No packages published