fix requirements for package (#15285)

* fix requirements

* https

* verbose

Co-authored-by: Luca Antiga <luca.antiga@gmail.com>
This commit is contained in:
Jirka Borovec 2022-10-25 12:52:42 +02:00 committed by GitHub
parent dec2373391
commit 9a725ce71c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -119,11 +119,10 @@ def load_requirements(
"""
with open(os.path.join(path_dir, file_name)) as file:
lines = [ln.strip() for ln in file.readlines()]
reqs = []
for ln in lines:
reqs.append(_augment_requirement(ln, comment_char=comment_char, unfreeze=unfreeze))
# filter empty lines
return [str(req) for req in reqs if req]
reqs = [_augment_requirement(ln, comment_char=comment_char, unfreeze=unfreeze) for ln in lines]
# filter empty lines and containing @ which means redirect to some git/http
reqs = [str(req) for req in reqs if req and not any(c in req for c in ["@", "http:", "https:"])]
return reqs
def load_readme_description(path_dir: str, homepage: str, version: str) -> str:

View File

@ -34,6 +34,7 @@ runs:
user: __token__
password: ${{ inputs.pypi-token }}
packages_dir: pypi/
verbose: true
- name: filter packages
run: rm pypi/*