Single command for python package creation from one/multiple .py files ( Make packaging fun again! )
Most of the packages are simple and a collection of few functions or classes. We have created a package for that now that can create python packages, upload to github and distribute to pypi all in a single call. We collect desired packagename, author name and a few info interactively and create the package from a single python file. You can use multiple python scripts too. To use multiple scripts give a space seperated list when asked for file locations with main file (the file where all the functions and classes you want user to use is present) at the start. For simple packaging, one single file is enough.
- Supports python 3.6+
- Autopopulates setup files, README.md and version etc , uploads to GitHub and PyPI
- Easily Customizable
- Easiest to use with only single interactive command
- 1 min video tutorial
Fun part: This package is also created by running the script located at src/pypacklib/__main__.py
pip3 install pypacklib
pip3 install git+https://github.com/Souvic/pypacklib.git
Easy-to-follow prompts will guide you through the process
pypack
- Run the command pypack (and just follow the interactive framework forgetting the lines[2,3,4] written below)
- Input yes at the first prompt as you will be questioned.
- Follow the instructions that will appear.
- Make necessary changes if you have to (e.g. updating README.md file) now on the github repo before submitting to PyPi(by following the upload instruction below)
- Make all necessary changes in the python files(location: src/packagename/) in the github repo.
- Run the command pypack (and just follow the interactive framework forgetting the lines[2,3,4] written below)
- Input no at the first prompt.
- Follow the instructions that will appear.
Set up your $HOME/.pypirc file with the passtoken like this to save twine password to avoid typing username and password everytime Doc Link
Create $HOME/.pypirc and paste the below code replacing only _yourpasstoken
[pypi]
username = __token__
password = yourpasstoken
Use git store password utility to avoid typing GitHub username and password everytime Doc Link
Paste the below code for that with your passtoken and username
git credential-store --file ~/.mysecretfilelocation store
protocol=https
host=github.com
username=yourusername
password=passtoken
You can use Github-flavored Markdown to write your content for your README.md