I'm not enthusiastic enough to register with PyPI, but I'll put the code pieces that I want to use in multiple projects on Github so that I can install them with pip. Fixing the version and keeping it up-to-date can be done by the pip itself, so there is less to think about.
Write setup.py
First, make sure you can pip install on your local file system
$ pip install .Push to Github
Make sure you can pip install from Github
$ pip install git+https://github.com/nishio/rich_tokenizerThis seems to lose the information about the install from git when pip freeze is done.
$ pip install git+https://github.com/nishio/rich_tokenizerThis looks good.
$ pip install -e git+https://github.com/nishio/rich_tokenizer#egg=rich_tokenizerThis would output `-e git+https://github.com/nishio/rich_tokenizer@4284.... .af7e#egg=rich_tokenizer
python - How to state in requirements.txt a direct github source - Stack Overflow
reference
This page is auto-translated from /nishio/自分用pip using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.