Search
🐍

간단한 Python 패키징

작성일
2020/10/06
태그
Python
Environment
작성자
1 more property

Python package initializer

clean and simple python package initializer without any dependency and hidden magic

Instruction

1.
Install your package skeleton
mkdir your_project git clone <https://github.com/nyanye/python-package-initializer.git> rm -rf ./python-package-initializer/.git mv python-package-initializer/* your_project rm -rf ./python-package-initializer
Plain Text
1.
Edit setup.py's PKG_NAME - python script for package installation
2.
Edit PKG_NAME/__init__.py's from package_name - python module for package initialization
3.
Edit PKG_NAME/about.py - python module for package metadata
4.
Edit README.md - basic repository document written in markdown format
Now you can write your own package

Why is it useful

1.
about.py module keeps package metadata in single source which is referenced by setup.py and package namespace.
>>> import package_name >>> package_name.__version__ >>> '0.3.9'
Python
1.
I'm tired of writing down setup.py script for every python package. It includes essentials but also minimal so it's highly re-usable
2.
It's compatible from the last release of Python 2.7 to latest release of Python 3.8