Merge pull request #2022 from ofek/setuptools

Remove erroneous runtime dependence on setuptools
This commit is contained in:
Kubernetes Prow Robot 2023-06-11 15:57:48 -07:00 committed by GitHub
commit 51f3e636f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,9 @@ with open('requirements.txt') as f:
for line in f:
line, _, _ = line.partition('#')
line = line.strip()
if ';' in line:
if not line or line.startswith('setuptools'):
continue
elif ';' in line:
requirement, _, specifier = line.partition(';')
for_specifier = EXTRAS.setdefault(':{}'.format(specifier), [])
for_specifier.append(requirement)