diff --git a/.github/workflows/cgatapps_python.yml b/.github/workflows/cgatapps_python.yml index d484cdd2..1d666e31 100644 --- a/.github/workflows/cgatapps_python.yml +++ b/.github/workflows/cgatapps_python.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macos-latest"] - python-version: ["3.8"] + python-version: ["3.7", "3.8"] defaults: run: @@ -29,7 +29,7 @@ jobs: key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('conda/environments/cgat-apps.yml') }} - - uses: mamba-org/provision-with-micromamba@main + - uses: conda-incubator/setup-miniconda@v2 with: mamba-version: "*" python-version: ${{ matrix.python-version }} diff --git a/cgat/version.py b/cgat/version.py index 63af8876..364e7bae 100644 --- a/cgat/version.py +++ b/cgat/version.py @@ -1 +1 @@ -__version__ = "0.6.3" +__version__ = "0.6.4" diff --git a/requires.txt b/requires.txt new file mode 100644 index 00000000..e69de29b diff --git a/setup.py b/setup.py index 8171a5ad..adb4ccd7 100644 --- a/setup.py +++ b/setup.py @@ -35,12 +35,16 @@ ######################################################################## ######################################################################## # Import setuptools -# Use existing setuptools, otherwise raise ImportError. +# Use existing setuptools, otherwise try ez_setup. try: import setuptools -except ImportError as error: - print(error.__class__.__name__ + ": " + error.message) - +except ImportError: + # try to get via ez_setup + # ez_setup did not work on all machines tested as + # it uses curl with https protocol, which is not + # enabled in ScientificLinux + import ez_setup + ez_setup.use_setuptools() from setuptools import setup, find_packages, Extension @@ -135,6 +139,35 @@ def is_exe(fpath): 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'}