Skip to content

Commit

Permalink
updating to pkg_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Dec 4, 2017
1 parent 2124fe3 commit 3956ccc
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 44 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand Down
8 changes: 4 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
58 changes: 23 additions & 35 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit 3956ccc

Please sign in to comment.