I am currently creating a python library, and I want to find what is the best way for a user to install it on their computer.
It is not distributed on Pypi (or Pypi test) for now, so I want them to install it manually easily from their clone of the git repo.
I couldn't find a lot of up-to-date information, with the new way of building libraries (with a pyproject.toml).
A coworker told me he just uses pip install . from the root of the library. On the other hand, since I prefer to use virtual environments, I build the library with python -m build. I then install my library in an other venv with the .whl file generated, with pip install /path/to/the/library/dist/my_library.whl.
Is this the correct way to do it ? Is there a better or simpler way for users to manually install my library ?
pip install .Will install it within the current virtual environment. You can also usepip install git+https://github.com/user/repository.git. See here: stackoverflow.com/questions/20101834/…pyproject.toml)." These are references for the docs: packaging.python.org/en/latest/guides/writing-pyproject-toml and setuptools.pypa.io/en/latest/userguide/quickstart.html