Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download URL is needed if source URL is given in setup.py #431

Closed
anders-kiaer opened this issue Apr 28, 2021 · 0 comments · Fixed by #435
Closed

Download URL is needed if source URL is given in setup.py #431

anders-kiaer opened this issue Apr 28, 2021 · 0 comments · Fixed by #435
Labels
bug 🐛 Something isn't working

Comments

@anders-kiaer
Copy link
Collaborator

If a plugin project has stated source url in setup.py, but not download url, it fails here:

if dist["download_url"] is None and dist["source_url"] is None:
warnings.warn(
f"Plugin distribution {dist_name} has no download/source URL specified. "
"Will therefore not automatically become part of built Docker image."
)
continue
if dist["download_url"].startswith(PYPI_URL_ROOT):
pypi_data = requests.get(f"{PYPI_URL_ROOT}/pypi/{dist_name}/json").json()
if dist["dist_version"] in pypi_data["releases"]:
requirements.append(f"{dist_name}=={dist['dist_version']}")
continue
if dist["source_url"] is None:
raise RuntimeError(
f"Could not find version {dist['dist_version']} of {dist_name} on PyPI. "
"Falling back to git source code is not possible since "
"project_urls['Source'] is not defined in setup.py."
)

AttributeError: 'NoneType' object has no attribute 'startswith'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant