Python 3.11.6 (main, Oct 2 2023, 13:45:54) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip_api
>>> pip_api.parse_requirements("test.txt")
Traceback (most recent call last):
File "/home/chrism/projects/apex/eao_dash/.devenv/state/venv/lib/python3.11/site-packages/pip_api/_parse_requirements.py", line 260, in _parse_local_package_name
value = [kw.value for kw in setup_kwargs if kw.arg == "name"][0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/chrism/projects/apex/eao_dash/.devenv/state/venv/lib/python3.11/site-packages/pip_api/_parse_requirements.py", line 531, in parse_requirements
name, url = _parse_editable(known.editable)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chrism/projects/apex/eao_dash/.devenv/state/venv/lib/python3.11/site-packages/pip_api/_parse_requirements.py", line 285, in _parse_editable
return _parse_local_package_name(url_no_extras[len("file://") :]), url_no_extras
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/chrism/projects/apex/eao_dash/.devenv/state/venv/lib/python3.11/site-packages/pip_api/_parse_requirements.py", line 263, in _parse_local_package_name
raise PipError(
pip_api.exceptions.PipError: Directory '/home/chrism/projects/apex/eao_dash' is not installable. Could not parse package name from 'setup.py'.
Where test.txt is:
-r ./requirements.txt
-e ./.
That would be totally reasonable, but this project is of the new regime where the setup.py looks like:
Using pip-api 0.0.30, a minor issue.
Where
test.txt
is:That would be totally reasonable, but this project is of the new regime where the setup.py looks like:
And it gets all its metadata from
pyproject.toml
:It should likely fall back to trying to parse the name out of
pyproject.toml
.