Skip to content
Permalink
Browse files

switching to pkg_utils

  • Loading branch information
jonrkarr committed Dec 4, 2017
1 parent 3056aa8 commit c0083980bad90546758af10b6e0760ee6699ff7b
Showing with 44 additions and 56 deletions.
  1. +11 −21 .circleci/config.yml
  2. +6 −6 docs/requirements.txt
  3. +2 −2 requirements.txt
  4. +23 −25 setup.py
  5. +2 −2 tests/requirements.txt
@@ -3,50 +3,40 @@ jobs:
build:
working_directory: /root/project
docker:
- image: karrlab/build:0.0.10
- image: karrlab/build:0.0.16
steps:
- checkout

- restore_cache:
keys:
- cache-v1-{{ .Branch }}-{{ checksum "requirements.txt" }}
- cache-v1-{{ .Branch }}-
- cache-v1-
- cache-v3-{{ .Branch }}-{{ checksum "requirements.txt" }}
- 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-v1-{{ .Branch }}-{{ checksum "requirements.txt" }}
key: cache-v3-{{ .Branch }}-{{ checksum "requirements.txt" }}
paths:
- /usr/local/lib/python2.7/site-packages
- /usr/local/lib/python3.6/site-packages

- run: |
set +e
pip2 install -e git+https://github.com/KarrLab/karr_lab_build_utils.git#egg=karr_lab_build_utils
RESULT=$?
if [ $RESULT -ne 0 ]; then
exit $RESULT
fi
karr_lab_build_utils2 run-tests tests --with-xunit --with-coverage
RESULT2=$?
pip3 install -e git+https://github.com/KarrLab/karr_lab_build_utils.git#egg=karr_lab_build_utils
RESULT=$?
if [ $RESULT -ne 0 ]; then
exit $RESULT
fi
karr_lab_build_utils3 run-tests tests --with-xunit --with-coverage
RESULT3=$?
karr_lab_build_utils make-and-archive-reports
karr_lab_build_utils3 make-and-archive-reports
if [[ $RESULT2 -eq 0 && $RESULT3 -eq 0 ]]; then
exit 0
@@ -1,13 +1,13 @@
bs4
cement
configparser
google-api-python-client
google_api_python_client
httplib2
oauth2client
PyOpenSSL
pyopenssl
six
Sphinx >= 1.6
sphinx >= 1.6
sphinx_rtd_theme
sphinxcontrib-bibtex
robpol86-sphinxcontrib-googleanalytics
sphinxcontrib-spelling
sphinxcontrib_bibtex
robpol86_sphinxcontrib_googleanalytics
sphinxcontrib_spelling
@@ -1,6 +1,6 @@
bs4
cement
google-api-python-client
google_api_python_client
httplib2
oauth2client
PyOpenSSL
pyopenssl
@@ -1,41 +1,39 @@
from setuptools import setup, find_packages
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 = ''
name = 'gdoc_down'
dirname = os.path.dirname(__file__)

# get version
with open('gdoc_down/VERSION', 'r') as file:
version = file.read().strip()

# parse requirements.txt
install_requires = [line.rstrip() for line in open('requirements.txt')]
tests_require = [line.rstrip() for line in open('tests/requirements.txt')]

setup(
name="gdoc_down",
version=version,
# get package metadata
md = pkg_utils.get_package_metadata(dirname, name)
setuptools.setup(
name=name,
version=md.version,
description="Download Google documents to files",
long_description=long_description,
url="https://github.com/KarrLab/gdoc_down",
download_url='https://github.com/KarrLab/gdoc_down',
long_description=md.long_description,
url="https://github.com/KarrLab/" + name,
download_url='https://github.com/KarrLab/' + name,
author="Jonathan Karr",
author_email="jonrkarr@gmail.com",
license="MIT",
keywords='Google documents drive download latex tex html pdf docx',
packages=find_packages(exclude=['tests', 'tests.*']),
packages=setuptools.find_packages(exclude=['tests', 'tests.*']),
package_data={
'gdoc_down': [
name: [
'VERSION',
'client.json',
],
},
install_requires=install_requires,
tests_require=tests_require,
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 :: End Users/Desktop',
@@ -1,6 +1,6 @@
docx
mock
odfpy
PyPDF2
python-docx
pypdf2
python_docx
rtf2xml

0 comments on commit c008398

Please sign in to comment.
You can’t perform that action at this time.