Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.14 KB

File metadata and controls

53 lines (35 loc) · 1.14 KB

Setup

# create a venv first
pip install pex

Independent scripts

Building pex to ship dependencies

make script-env

It creates script-env.pex file, which works like a Python executable but uses the interpreter available in the system while all dependencies in requirements.txt are included inside.

Uploading to customer sites

Copy the following files:

  • dist/script-env.pex
  • scripts/xxx.py

Executing the scripts

Assuming that the current shell has a working, compatible Python interpreter (usually the version installed by us, an indygreg build):

chmod +x dist/script-env.px
./dist/script-env.pex scripts/xxx.py

Independent executable

First, download the appropriate science binary from the scie-lift release page, and make it available via your PATH.

Then run:

make simple-curl-app

Executing the executable

It will automatically download and install the statically built Python and start:

./dist/simple-curl https://example.com

Reference