easy packing!
Project description
EasyPack: Build, distribute and deploy modules easily.
A very simple and powerful single module packaging tool.
Create a new easy pack project
On the project folder run:
python -m easy_pack.scaffold my_package -module_name my_module -resources_file -mit_license
This will generate the following tree:
project_folder
|-- module_info.txt # module info file
|-- my_module # module folder
| |-- files # additional files folder
| | |-- .. # place any file here and it will be packed with the module
| |-- __init__.py # module file
| |-- resources.py # helper class to access the additional files once the moude is installed
|
|-- resources
|-- license.txt # license file (txt format)
|-- readme.md # readme (mark-down format)
The module_info.txt file
To customize your module, edit this file to match your code.
Module versioning:
Three integers (major, minor, build) uniquely identifying a specific build. The system will automatically increment the build number in each build. Minor and major values should be adjusted manually.
Module name:
String containing the name of the module
Author:
String containing the name of the author (your name)
Author email:
String containing the email of the author (your email)
Package description:
String containing a brief description of your package
Required packages:
List of strings with the packages your package is dependent on (ie. ['easy-pack', 'matplotlib', 'numpy']).
Package url:
String containing the url of your project, usually a github repository (ie. 'https://github.com/germanespinosa/easy-pack').
License type:
String containing a string with the license type (ie. "MIT").
License file:
String containing the relative path (from the module folder) to the license file.
Readme file:
String containing the relative path (from the module folder) to the readme file.
Package name:
String containing the name of your package
Module description:
String containing a brief description of your module
Building the package:
On the project folder run:
python -m easy_pack.build
This will generate a folder python-build with the following tree:
python-build
|-- my_module-version # build folder
| |-- dist
| | |-- my_package-version.tar.gz # package
| |-- my_module # unpacked files
| | |-- files # additional files folder
| | | |-- __init__.py
| | | |-- resources.py
| |-- my_module.egg-info # supporting files
| | |-- dependency_links.txt
| | |-- not-zip-safe
| | |-- PKG-INFO
| | |-- requires.txt
| | |-- SOURCES.txt
| | |-- top_level.txt
|-- MANIFEST.in # manifest file
|-- README.md # readme file
|-- setup.py # setup
Installing your package locally using pip
From the build folder run:
pip install .
Installing your package locally using Easy-Pack build tool
You can install a package after build using the install parameter:
python -m easy_pack.build -install
Uploading your package to pypi using Twine
To upload your package to pypi you will need a (https://pypi.org/) account. from the build folder run:
python -m twine upload dist/*
you will be asked username and password, the password value is a token generated on the pypi website.
Uploading your package to pypi using Easy-Pack build tool
You can upload a package after build using the upload parameter:
python -m easy_pack.build -upload -user [USERNAME] -password [TOKEN]
Testing your package
From any computer with pip installed run:
pip install [package_name]
Once the installation is finished, open python and try importing your module:
import [module_name]
You are all done
Package created with Easy-pack
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
File details
Details for the file easy-pack-1.0.137.tar.gz
.
File metadata
- Download URL: easy-pack-1.0.137.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 355594c7e6045e6d2a545744516b727d6a21eb4eefb0c4655e280e8d9ac9302e |
|
MD5 | 85dfd51f4f69a5754744f4fa72ee75dc |
|
BLAKE2b-256 | f7c076d181fb6311c176b3d0aecc934221d4282f93c4aab374aed6ca5c6fe295 |