This is a small template for building, distributing and packaging a python console application.
TODOS:
- Do this
- Do that
Can be easily installed from pypi with pip3.
pip3 install python_console_package
You can also alway clone the repo from GitHub and run with python.
python3 launcher.py "this/is/my/source/path"
or by
python3 entrypoint.py "this/is/my/source/path"
If installed through pypi then executing the script name python_console_package
essentially runs something like python3 python_console_package/entrypoint.py
(this is specified through entry_points
in setup.py),which is used in the further usage examples.
python3 build.py
to build and package the application using setuptools to the dist directory.
python3 entrypoint.py
this is a launcher for the main script, can be used interchangably with python_console_package/entrypoint.py.
python3 install-dev.py
use the pip3 installer to install this project directory to the system. (Immediatly reflects the changes done to the scripts).
python3 install.py
Build the application and install the resulting package -> the installation is the same as if you would install the package from pypi.
The License of your project, do your research and choose your License with care.
(Here it is APACHE 2.0)
Specifies additional non-python files that should be included into the distributed package.
python3 publish.py
Build the application and upload to pypi using twine (make sure everything is working before as you can not replace a version once it is online).
After you have published the package, tag your package version and push to your git repository.
- Commit your changes
git commit -am "your message"
- Push your changes
git push
- Create a version tag in your repository
git tag 1.0.0
- Push the tag to your repository
git push --tags
Main description and documentation of your project.
A markdown file containing info about the release versions and their changes.
The setuptools configuration, which contains all packaging information and some installation information for your project. Make sure to replace the info before packaging your application. Contains:
- Meta information like: author, version, classifiers, url, description
- Importent information about the structure and files of your package for installation: modules, entrypoints, name, dependencies
python_console_package --setup
If you want to provide a setup function to your users you can implement a function call when this options is specified.
python_console_package --version
Print out the version information of your package
python_console_package "test/path/source"
Call application with a positional text argument.
python_console_package "test/path/source" --option "my optional argument text"
Call application with a optional text argument.
python_console_package "test/path/source" --multiply 1 2 3 8 96
Call application with an optional argument list.
python_console_package "test/path/source" --printm
Call the application with an optional boolean option.