summaryrefslogtreecommitdiffstats
path: root/__root__/setup.py
diff options
context:
space:
mode:
Diffstat (limited to '__root__/setup.py')
-rw-r--r--__root__/setup.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/__root__/setup.py b/__root__/setup.py
index 4e3c871..8f67aab 100644
--- a/__root__/setup.py
+++ b/__root__/setup.py
@@ -42,6 +42,7 @@ def doraise_py_compile(file, cfile=None, dfile=None, doraise=False):
py_compile.compile = doraise_py_compile
PREFER_GITHUB = True
+PREFER_FORGE = 'github' if PREFER_GITHUB else 'pagure' # alternatively: None
DEBUG = getenv("SETUPDEBUG")
DBGPFX = str(__file__)
@@ -563,12 +564,16 @@ def cond_require(package, *packages, **preferred):
url_dict = dict(name=pkg_name, ver=pkg.version)
download_url = ''
-if PREFER_GITHUB:
+if PREFER_FORGE == 'github':
url = 'https://github.com/jnpkrn/{name}'
if 'git.' in pkg.version:
download_url = url + '/tarball/' + pkg.version.partition('git.')[-1]
elif pkg.version.split('+')[-1] != 'a':
download_url = url + '/tarball/v{ver}'
+elif PREFER_FORGE == 'pagure':
+ url = 'https://pagure.io/{name}'
+ if pkg.version.split('+')[-1] != 'a':
+ download_url = 'https://pagure.io/releases/{name}/{name}-{ver}.tar.gz'
else:
url = 'http://people.redhat.com/jpokorny/pkgs/{name}'
if pkg.version.split('+')[-1] != 'a':