Very thin wrapper around zipapp that let's you package a python module and dependencies.
Project description
zipit
Very thin wrapper around zipapp that let's you package a python module and dependencies.
Example
We'll use our demo "app" to showcase zipit.
First, let's take a look at what our app contains:
$ cd demo
$ ls app
__main__.py requirements.txt
Our "app" contains two files:
__main__.py
: This is the entrypoint to our app.requirements.txt
: This is a classic requirements file as consumed by pip.
Getting things set up
First we need to install the dependencies for our app. zipit doesn't much care how dependencies are installed. We just need to keep track of where they're installed.
Let's use pip:
mkdir deps
$ python3 -m pip install -r app/requirements.txt --target deps
zipit
Once the dependencies are installed, we can let zipit do it's work:
cd ..
$ python3 -m zipit demo/app -d demo/deps
This will produce .pyz
file runable with python.
$ python3 app.pyz
Hello, World!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zipit-0.0.2.tar.gz
.
File metadata
- Download URL: zipit-0.0.2.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a7a909d5eb4a0bdd65a4b9c3700a2249cd06eab2dd4c622568810cb011fe578 |
|
MD5 | e4594937749c48ce284d5b17b776d3f8 |
|
BLAKE2b-256 | 257063fe3407340d1389e06095b36fa12dce1e27d7d6750b4fd535900afa68ba |
File details
Details for the file zipit-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: zipit-0.0.2-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80450c2daf7af804ad7a2fd6b59f72fec5afad63de53a1cdc117bffe0016767b |
|
MD5 | 4e2d1e1c187bcc1f7de5bda78745ba90 |
|
BLAKE2b-256 | c823ee501988966c3d4428935ae50e4e01e11023ce28409d179d0a08dba52555 |