diff --git a/.circleci/config.yml b/.circleci/config.yml index 21ee6c1..17e799d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,13 +13,13 @@ jobs: - cache-v3-{{ .Branch }}- - cache-v3- - - run: pip2 install -e . - - run: pip2 install -U -e git+https://github.com/KarrLab/karr_lab_build_utils.git#egg=karr_lab_build_utils + - run: pip2 install -U git+https://github.com/KarrLab/karr_lab_build_utils.git#egg=karr_lab_build_utils - run: karr_lab_build_utils2 install-requirements - - - run: pip3 install -e . - - run: pip3 install -U -e git+https://github.com/KarrLab/karr_lab_build_utils.git#egg=karr_lab_build_utils + - run: pip2 install -U -e .[all] + + - run: pip3 install -U git+https://github.com/KarrLab/karr_lab_build_utils.git#egg=karr_lab_build_utils - run: karr_lab_build_utils3 install-requirements + - run: pip3 install -U -e .[all] - save_cache: key: cache-v3-{{ .Branch }}-{{ checksum "requirements.txt" }} diff --git a/docs/requirements.txt b/docs/requirements.txt index 44ce136..0d196c3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,9 +2,9 @@ attrdict configparser networkx git+https://github.com/KarrLab/obj_model.git#egg=obj_model -robpol86-sphinxcontrib-googleanalytics +robpol86_sphinxcontrib_googleanalytics six -Sphinx >= 1.6 +sphinx >= 1.6 sphinx_rtd_theme -sphinxcontrib-bibtex -sphinxcontrib-spelling +sphinxcontrib_bibtex +sphinxcontrib_spelling diff --git a/setup.py b/setup.py index 8cbbdba..e96ac3f 100644 --- a/setup.py +++ b/setup.py @@ -1,52 +1,40 @@ -import pip -pip.main(['install', 'git+https://github.com/KarrLab/wc_utils.git#egg=wc_utils']) - -from setuptools import setup, find_packages -from wc_utils.util.install import parse_requirements, install_dependencies +import setuptools +try: + import pkg_utils +except ImportError: + import pip + pip.main(['install', 'git+https://github.com/KarrLab/pkg_utils.git#egg=pkg_utils']) + import pkg_utils import os -# get long description -if os.path.isfile('README.rst'): - with open('README.rst', 'r') as file: - long_description = file.read() -else: - long_description = '' - -# get version -with open('wc_rules/VERSION', 'r') as file: - version = file.read().strip() - -# parse dependencies and links from requirements.txt files -with open('requirements.txt', 'r') as file: - install_requires, dependency_links_install = parse_requirements(file.readlines()) -with open('tests/requirements.txt', 'r') as file: - tests_require, dependency_links_tests = parse_requirements(file.readlines()) -dependency_links = list(set(dependency_links_install + dependency_links_tests)) +name = 'wc_rules' +dirname = os.path.dirname(__file__) -# install non-PyPI dependencies -install_dependencies(dependency_links) +# get package metadata +md = pkg_utils.get_package_metadata(dirname, name) # install package -setup( - name="wc_rules", - version=version, +setuptools.setup( + name=name, + version=md.version, description="Language for describing whole-cell models", - long_description=long_description, - url="https://github.com/KarrLab/wc_rules", - download_url='https://github.com/KarrLab/wc_rules', + long_description=md.long_description, + url="https://github.com/KarrLab/" + name, + download_url='https://github.com/KarrLab/' + name, author="John Sekar", author_email="johnarul.sekar@gmail.com", license="MIT", keywords='whole-cell systems biology', - packages=find_packages(exclude=['tests', 'tests.*']), + packages=setuptools.find_packages(exclude=['tests', 'tests.*']), package_data={ - 'wc_rules': [ + name: [ 'VERSION', ], }, - install_requires=install_requires, - tests_require=tests_require, - dependency_links=dependency_links, + install_requires=md.install_requires, + extras_require=md.extras_require, + tests_require=md.tests_require, + dependency_links=md.dependency_links, classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Science/Research',