Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1047 from marscher/update_setup
Browse files Browse the repository at this point in the history
[setup/recipe] updated dependencies, test against py36
  • Loading branch information
marscher authored Feb 18, 2017
2 parents 436da54 + 3b4930d commit 0643b03
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 92 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sudo: false
env:
global:
- PATH=$HOME/miniconda/bin:$PATH
- common_py_deps="conda-build=2.1.2"
- common_py_deps="conda-build=2.1.4"
- PACKAGENAME=pyemma
- ORGNAME=omnia
- PYTHONHASHSEED=0
Expand All @@ -21,20 +21,19 @@ env:
- CONDA_PY=2.7 CONDA_NPY=1.11
- CONDA_PY=3.4 CONDA_NPY=1.10
- CONDA_PY=3.5 CONDA_NPY=1.11
- CONDA_PY=3.6 CONDA_NPY=1.11

before_install:
- devtools/ci/travis/install_miniconda.sh
- conda config --set always_yes true
- conda config --add channels omnia
- conda config --add channels conda-forge
#- conda config --add channels conda-forge
- conda install -q $common_py_deps

script:
- conda build -q devtools/conda-recipe

after_success:
- pwd; ls -alh
#- bash <(curl -s https://codecov.io/bash) -s $HOME
- pip install codecov
- codecov --file $HOME/coverage.xml
- bash <(curl -s https://codecov.io/bash) -s $HOME -e CONDA_PY,CONDA_NPY

10 changes: 7 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ environment:
CONDA_PY: "34"
ARCH: "64"

- MINICONDA_PYTHON: "C:\\Miniconda3-x64"
CONDA_PY: "36"
ARCH: "64"

install:
- "SET PATH=%MINICONDA_PYTHON%;%MINICONDA_PYTHON%\\Scripts;%PATH%;"

- conda config --set always_yes true
- conda config --add channels omnia
- conda config --add channels conda-forge
- conda install -q conda-build=2.1.2 jinja2
# - conda config --add channels conda-forge
- conda install -q conda-build=2.1.4 jinja2

# use agg backend in matplotlib to avoid gui popup, which can not be closed.
- echo %userprofile%
Expand All @@ -40,7 +44,7 @@ build: false # Not a C# project, build stuff at the test step instead.

test_script:
# run testsuite and upload test results to AppVeyor; return exit code of testsuite
- conda build -q devtools/conda-recipe
- "%CMD_IN_ENV% conda build -q devtools/conda-recipe"

#on_success:
# - devtools/ci/appveyor/after_success.bat
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ checkout:
dependencies:
override:
- devtools/ci/circle/install_miniconda.sh
- conda config --add channels conda-forge
- conda config --add channels omnia
- conda config --set always_yes true
- conda install conda-build

Expand Down
10 changes: 1 addition & 9 deletions devtools/conda-recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
if not defined APPVEYOR (
echo not on appveyor
"%PYTHON%" setup.py install
) else (
echo on appveyor
cmd /E:ON /V:ON /C %APPVEYOR_BUILD_FOLDER%\devtools\ci\appveyor\run_with_env.cmd "%PYTHON%" setup.py install
)
set build_status=%ERRORLEVEL%
if %build_status% == 1 exit 1
%PYTHON% setup.py install --single-version-externally-managed --record record.txt
6 changes: 5 additions & 1 deletion devtools/conda-recipe/build.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
#!/bin/bash
$PYTHON setup.py install
if [[ $OSTYPE == darwin* ]]; then
export CFLAGS="-headerpad_max_install_names"
export CXXFLAGS=$CFLAGS
fi
$PYTHON setup.py install --single-version-externally-managed --record record.txt
40 changes: 12 additions & 28 deletions devtools/conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,34 @@ build:

requirements:
build:
- cython
- mdtraj
- numpy x.x
- python
- setuptools
- cython >=0.20
- bhmm >=0.6,<0.7
- joblib >0.8.4
- matplotlib
- mdtraj >=1.7
- mock
- funcsigs
- msmtools >=1.1.3
- thermotools >=0.2.3
- nose
- numpy x.x
- pyyaml
- scipy
- six
- psutil >=3.1.1
- decorator >=4.0.0
- progress_reporter <=1.2

run:
- python
- setuptools
run:
- bhmm >=0.6,<0.7
- decorator >=4.0.0
- joblib >0.8.4
- matplotlib
- mdtraj >=1.7
- mdtraj
- mock
- funcsigs
- msmtools >=1.1.3
- thermotools >=0.2.3
- msmtools >=1.2
- numpy x.x
- progress_reporter <=1.2
- psutil >3.1
- python
- pyyaml
- scipy
- setuptools
- six >=1.10
- psutil >=3.1.1
- decorator >=4.0.0
- progress_reporter <=1.2
- thermotools >=0.2.3

test:
requires:
- pytest
- pytest-cov
#- pytest-xdist
imports:
- pyemma

Expand Down
25 changes: 0 additions & 25 deletions pyemma/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,3 @@ def no_progress_bars():
import pyemma
pyemma.config.show_progress_bars = False
pyemma.config.use_trajectory_lengths_cache = False


def static_var(name, value):
def decorate(func):
setattr(func, name, value)
return func
return decorate


def get_extension_names():
import json, pkg_resources
extensions_file = pkg_resources.resource_filename('pyemma', '_extensions.json')
with open(extensions_file) as f:
inp = json.load(f)
extension_stubs = [e.split('.')[-1] for e in inp]
return extension_stubs


# this hook should ignore setuptools generated stub loaders for extension,
# because they cause PathMismatch errors in pytest during discovery.
@static_var('extension_stubs', get_extension_names())
def pytest_ignore_collect(path, config):

if any(path.basename.startswith(e) for e in pytest_ignore_collect.extension_stubs):
return True
23 changes: 3 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,23 +219,6 @@ def run_tests(self):

versioneer_cmds['test'] = PyTest

from setuptools.command.egg_info import egg_info

class extensions_json(egg_info):
def run(self):
f = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'pyemma', '_extensions.json')
print("Generating {}".format(f))
extension_names = [e.name for e in extensions()]

with open(f, 'wb') as fp:
import json
s = json.dumps(extension_names).encode('ascii')
fp.write(s)

egg_info.run(self)

versioneer_cmds['egg_info'] = extensions_json

return versioneer_cmds


Expand All @@ -262,9 +245,9 @@ def run(self):
# runtime dependencies
install_requires=['numpy>=1.7.0',
'scipy>=0.11',
'mdtraj>=1.7.0',
'mdtraj>=1.8.0',
'matplotlib',
'msmtools>=1.1.4',
'msmtools>=1.2',
'thermotools>=0.2.3',
'bhmm>=0.6,<0.7',
'joblib>0.8.4',
Expand Down Expand Up @@ -293,7 +276,7 @@ def run(self):
]

metadata['package_data'] = {
'pyemma': ['pyemma.cfg', 'logging.yml', '_extensions.json', 'setup.cfg'],
'pyemma': ['pyemma.cfg', 'logging.yml', 'setup.cfg'],
'pyemma.coordinates.tests': ['data/*'],
'pyemma.msm.tests': ['data/*'],
'pyemma.datasets': ['*.npz'],
Expand Down

0 comments on commit 0643b03

Please sign in to comment.