Look at the git repo, find the setup.py
, setup.cfg
or pyproject.toml
file in the root and find what name has been set.
- In
setup.py
, look for thename
keyword in thesetup()
function call. - In
setup.cfg
, look for thename
entry under the[metadata]
section. - If there is only a
pyproject.toml
file, then look for a[tool.poetry]
or[tool.flit.metadata]
or[project]
section, and thename
entry under that section. (Which section exactly depends on the packaging tool used; flint and poetry expect different sections and there may be other projects usingpyproject.toml
to create Python packages in future).
For example, the Pyramid project has a setup.py
file, which has:
setup(
name='pyramid',
so you'd use:
$ pip install -e git+https://github.com/Pylons/pyramid.git#egg=pyramid
Or, if you look at the FastAPI repository, then you'd find a pyproject.toml
file with:
[tool.flit.metadata]
module = "fastapi"
and so you'd use
$ pip install -e git+https://github.com/tiangolo/fastapi.git#egg=fastapi