I’m working to make a python script/package I helped develop into a “real” Python package that can be installed via
pip. The current code is sort of more of a “Python shell script” if you like, where you just clone the repo and add to your path and then call
mepo. This was (rightly) pointed out to be not the Right Way™ to do Python, but rather it should be installed a la
pip install mepo.
from command.tag.create import create
from mepo.command.tag.create import create
and I can now do:
python3 -m build && pip install .
and thanks to this magic:
[options.entry_points] console_scripts = mepo = mepo.__main__:main
I can see a
~/dev_env/bin/mepo command in my wee environment, and it seems to work! (Not backwardly compatible due to pickle weirdness, but works!)
But now I need more help. With mepo, I made some “etc” files like a Bash completion script, and some bash/tcsh function/aliases that users can do
source mepo-cd.bash and get that functionality. The thing I don’t know is: How does one package up things like this?
I found some Stack Overflow threads talking about
setup.py days, but I’m trying to be forward-looking and using
setup.cfg and I saw that
data_files is deprecated in the latest docs but there is no pointer to what one should use instead.
So, what is the “Right Way™” to package files like this for use with
pip install etc? Once I know that, I can tell people how to go find where it’s installed and