Merge pull request #15831 from branchvincent/update-python-git-clone

pypi: support updating resources for git clones
This commit is contained in:
Mike McQuaid 2023-08-07 08:19:44 +01:00 committed by GitHub
commit 6b773a36e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,7 +228,13 @@ module PyPI
main_package = if package_name.present?
Package.new(package_name)
else
Package.new(T.must(formula.stable).url, is_url: true)
stable = T.must(formula.stable)
url = if stable.specs[:tag].present?
url = "git+#{stable.url}@#{stable.specs[:tag]}"
else
stable.url
end
Package.new(url, is_url: true)
end
if version.present?