| |
@@ -67,7 +67,10 @@
|
| |
def get_anitya_project(self, package, ecosystem=None):
|
| |
project = package
|
| |
if not ecosystem:
|
| |
- if package.startswith("rust-"):
|
| |
+ if package.startswith("python-"):
|
| |
+ project = package.split("-", 1)[1]
|
| |
+ ecosystem = "pypi"
|
| |
+ elif package.startswith("rust-"):
|
| |
project = package.split("-", 1)[1]
|
| |
ecosystem = "crates.io"
|
| |
else:
|
| |
@@ -104,7 +107,12 @@
|
| |
def add_anitya_project(self, package, ecosystem=None, homepage=None):
|
| |
project = package
|
| |
if not ecosystem:
|
| |
- if package.startswith("rust-"):
|
| |
+ if package.startswith("python-"):
|
| |
+ project = package.split("-", 1)[1]
|
| |
+ ecosystem = "pypi"
|
| |
+ if not homepage:
|
| |
+ homepage = f"https://pypi.org/project/{project}"
|
| |
+ elif package.startswith("rust-"):
|
| |
project = package.split("-", 1)[1]
|
| |
ecosystem = "crates.io"
|
| |
if not homepage:
|
| |
@@ -139,7 +147,10 @@
|
| |
self, package, project, ecosystem=None, distribution="Fedora"
|
| |
):
|
| |
if not ecosystem:
|
| |
- if package.startswith("rust-"):
|
| |
+ if package.startswith("python-"):
|
| |
+ project = package.split("-", 1)[1]
|
| |
+ ecosystem = "pypi"
|
| |
+ elif package.startswith("rust-"):
|
| |
project = package.split("-", 1)[1]
|
| |
ecosystem = "crates.io"
|
| |
url = requests.compat.urljoin(ANITYA_URL, "packages/")
|
| |
Signed-off-by: Michel Alexandre Salim salimma@fedoraproject.org