I am trying to build a local package using couple of #python   functions I have written (hosted on git and installed locally), no guide/tutorial I tried so far seem to work!

For example, I followed steps in this one: https://www.freecodecamp.org/news/build-your-first-python-package/ and I also tried this: https://realpython.com/python-import/#create-and-install-a-local-package.

Can anyone please recommend something tried and tested? Ideally something idiot proof because I am learning 

How to Build Your Very First Python Package

A few months ago, I decided to release Caer [http://github.com/jasmcaus/caer], a Computer Vision package available in Python. I found the process to be excruciatingly painful. You can probably guess why  — little (and confusing) documentation, lack of good tutorials, and so on. So I decided to write this article in the

freeCodeCamp.org

@m_cadek I found #Flit to be relatively easy when I started using it recently. The only thing that stumped me initially was that I had a single-file module, but I wanted some data files to get packaged with it. Flit handles that automatically, but you need to structure your code as a package (directory w/ an __init__.py file) instead of just a module. Once I got that straightened out, it was smooth sailing.

https://flit.pypa.io/en/stable/index.html

Flit 3.9.0 — Flit 3.9.0 documentation

@joshburnett This looks like it could work!

Hope you do not mind me asking, but I presume the requirement to push anything onto PyPI is optional, no?

Also, I assumed package is collection of python scripts which may or may not be further structured into modules or submodules?

For example:
cute_package/
fun.py
--- /cute_module/
---/ fun.py
------/cute_submodule/
------/fun.py

I might be getting the terminology wrong here.

@m_cadek Close. A module is just a single file. As soon as you want more than one file, then it's either simply multiple modules, or you put them together into a package. A package is just a directory with a __init__.py file in it (which can be empty, or used for defining things that are common to all the modules).

And no, you definitely don't have to put anything on PyPI! But even for that local usage case, you'd just use the `flit build` command to build your package into a wheel.

@m_cadek So you'd just need to add those empty __init__.py files in each of your subdirectory levels and you should be set.

Finally, the last thing you need to make it installable (instead of just something that you copy into each project where you want to use it) is the pyproject.toml file. You can use `flit init` to start one, and then you just edit it by hand from there. Once you have that, you can install it by just pointing pip at it (execute `pip install .` from the directory).

@m_cadek Finally (really finally this time), you don't even need something like Flit if all you're looking to do is make it so you can install your local package or module via pip. In that case, all you need is the pyproject.toml file. Pip will look for that and work fine.
@m_cadek Poetry [https://python-poetry.org] in the of the easiest package management / build tools to use in the Python ecosystem these days. Building your own package with it and publishing it to PyPi (or a private pkg repo) should be a breeze (just follow the docs)
Poetry - Python dependency management and packaging made easy

Python dependency management and packaging made easy

@cristianrasch This looks very good too!Thank you!