From 579f6d14910866ac6ee4bd8e5e75c5e3ba7ffb25 Mon Sep 17 00:00:00 2001 From: Marcel Schoengens Date: Mon, 16 Apr 2018 13:36:23 +0200 Subject: [PATCH] Adapted travis config. --- .travis.yml | 3 +++ Makefile | 2 ++ README.md | 2 +- doc/source/conf.py | 2 +- examples/extensions/models/gaussian_cpp/Makefile | 3 +++ setup.py | 10 ++++++++-- 6 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 18e9c325..ef6e87f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,9 @@ install: - pip install -r requirements/backend-spark.txt script: - make test +before_deploy: +- make clean +- mkdir dist deploy: - provider: pypi user: mschoengens diff --git a/Makefile b/Makefile index c2aed790..e973beb0 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ help: clean: find . -name "*.pyc" -type f -delete + find . -name "*.pkl" -type f -delete find . -name "__pycache__" -delete find . -name ".#*" -delete find . -name "#*#" -delete @@ -72,6 +73,7 @@ reinstall: uninstall install whl_file: clean + mkdir -p build/dist python3 setup.py -v bdist_wheel -d build/dist @echo @echo "Find" `ls build/dist` "in build/dist/." diff --git a/README.md b/README.md index bd38febe..a7e0db1d 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ scientists by providing # Documentation For more information, check out the -* [Tutorial](http://abcpy.readthedocs.io/en/v0.5.0/README.html) +* [Documentation](http://abcpy.readthedocs.io/en/v0.5.0) * [Examples](https://github.com/eth-cscs/abcpy/tree/v0.5.0/examples) directory and * [Reference](http://abcpy.readthedocs.io/en/v0.5.0/abcpy.html) diff --git a/doc/source/conf.py b/doc/source/conf.py index 017427c8..0e49b051 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -31,7 +31,7 @@ def __getattr__(cls, name): # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. diff --git a/examples/extensions/models/gaussian_cpp/Makefile b/examples/extensions/models/gaussian_cpp/Makefile index b824ac46..cfa190a9 100644 --- a/examples/extensions/models/gaussian_cpp/Makefile +++ b/examples/extensions/models/gaussian_cpp/Makefile @@ -8,6 +8,9 @@ INCLUDEPATH=/usr/include/python3.4m cpp_simple: _gaussian_model_simple.so gaussian_model_simple.py +clean: + rm gaussian_model_simple.o gaussian_model_simple.py gaussian_model_simple_wrap.cpp + %.py: %.i $(SWIG) $(SWIGFLAGS) -o $@ $< diff --git a/setup.py b/setup.py index 138d3680..484774c4 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,15 @@ # Always prefer setuptools over distutils +import sys from setuptools import setup, find_packages -from pip.req import parse_requirements -from pip.download import PipSession from os import path +try: # for pip >= 10 + from pip._internal.req import parse_requirements + from pip._internal.download import PipSession +except ImportError: # for pip <= 9.0.3 + from pip.req import parse_requirements + from pip.download import PipSession + here = path.abspath(path.dirname(__file__)) install_reqs_raw = parse_requirements('requirements.txt', session=PipSession())