Don't provide git+https:// dependencies in setup.py extras.

Otherwise Twine will complain with errors like this:

```
HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
Can't have direct dependency: pybluez@
git+https://github.com/pybluez/pybluez ; extra == "bluetooth". See
https://packaging.python.org/specifications/core-metadata for more
information.
```
This commit is contained in:
Fabio Manganiello 2024-05-26 04:04:58 +02:00
parent e6702398dc
commit 5c0f85c311
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -34,8 +34,7 @@ def parse_deps(deps):
ret = [] ret = []
for dep in deps: for dep in deps:
if dep.startswith('git+'): if dep.startswith('git+'):
repo_name = dep.split('/')[-1].split('.git')[0] continue # Don't include git dependencies in the setup.py, or Twine will complain
dep = f'{repo_name} @ {dep}'
ret.append(dep) ret.append(dep)