From f3b1c75f9c95c34764ab893cb1524756838c4a7d Mon Sep 17 00:00:00 2001 From: Acribbs Date: Fri, 5 Apr 2024 11:17:19 +0100 Subject: [PATCH] reversted setup.py changes --- requires.txt | 0 setup.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 requires.txt diff --git a/requires.txt b/requires.txt new file mode 100644 index 000000000..e69de29bb diff --git a/setup.py b/setup.py index cd7a2ef0d..adb4ccd73 100644 --- a/setup.py +++ b/setup.py @@ -137,6 +137,37 @@ def is_exe(fpath): HTTPS_REQUIREMENT = re.compile( r'^-e (?P.*).+#(?P.+)-(?P\d(?:\.\d)*)$') install_requires = [] +dependency_links = [] + +for requirement in ( + l.strip() for l in open('requires.txt') if not l.startswith("#")): + match = REPO_REQUIREMENT.match(requirement) + if match: + assert which(match.group('vcs')) is not None, \ + ("VCS '%(vcs)s' must be installed in order to " + "install %(link)s" % match.groupdict()) + install_requires.append("%(package)s==%(version)s" % match.groupdict()) + dependency_links.append(match.group('link')) + continue + + if requirement.startswith("https"): + install_requires.append(requirement) + continue + + match = HTTPS_REQUIREMENT.match(requirement) + if match: + install_requires.append("%(package)s>=%(version)s" % match.groupdict()) + dependency_links.append(match.group('link')) + continue + + install_requires.append(requirement) + +if major == 2: + install_requires.extend(['web.py>=0.37', + 'xlwt>=0.7.4', + 'matplotlib-venn>=0.5']) +elif major == 3: + pass cgat_packages = find_packages() cgat_package_dirs = {'cgat': 'cgat'} @@ -286,6 +317,7 @@ def is_exe(fpath): }, # dependencies install_requires=install_requires, + dependency_links=dependency_links, # extension modules ext_modules=extensions, cmdclass={'build_ext': build_ext},