From 5c0f85c31180847a40f3a8573eac8fdd220d9122 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 26 May 2024 04:04:58 +0200 Subject: [PATCH] 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. ``` --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 7278b39cf..52c2951c4 100755 --- a/setup.py +++ b/setup.py @@ -34,8 +34,7 @@ def parse_deps(deps): ret = [] for dep in deps: if dep.startswith('git+'): - repo_name = dep.split('/')[-1].split('.git')[0] - dep = f'{repo_name} @ {dep}' + continue # Don't include git dependencies in the setup.py, or Twine will complain ret.append(dep)