Skip to content

Commit

Permalink
Merge pull request #108 from cgat-developers/AC-setup
Browse files Browse the repository at this point in the history
reverted back to old setup.py
  • Loading branch information
Adam Cribbs authored Jul 26, 2021
2 parents f7ee682 + 32a039f commit ee35e8e
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cgatapps_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion cgat/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.6.3"
__version__ = "0.6.4"
Empty file added requires.txt
Empty file.
41 changes: 37 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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'}
Expand Down

0 comments on commit ee35e8e

Please sign in to comment.