Skip to content

Commit 92c5406

Browse files
committed
Merge branch 'update-conda-recipe' into maint
* skip unnecessary dependency installation in conda-build * use recent diffpy.structure and diffpy.utils * anticipate later Python-s for conda-build * use pip to install for system python test * skip conda-build test in travis as it needs DISPLAY * switch to ubuntu xenial on travis * fix incorrect import for conda-build test * use latest pycifrw in travis test * enable old conda packages in travis test
2 parents 289d00d + b9a5443 commit 92c5406

7 files changed

Lines changed: 27 additions & 30 deletions

File tree

.travis.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Use container-based travis workers
2-
sudo: false
3-
1+
dist: xenial
42
language: generic
53

64
os:
@@ -23,15 +21,6 @@ branches:
2321
except:
2422
- /^v[0-9]/
2523

26-
addons:
27-
apt:
28-
packages:
29-
- build-essential
30-
- libgsl0-dev
31-
- python-dev
32-
- python-numpy
33-
- python-setuptools
34-
- python-wxtools
3524

3625
before_install:
3726
- MYNAME=diffpy.pdfgui
@@ -70,24 +59,32 @@ before_install:
7059
- $NOMC || conda create --name=testenv --yes python=${MYPYTHON_VERSION} coverage
7160
- $NOMC || conda config --add channels diffpy
7261

62+
# TODO - remove after update to wxpython 4
63+
- $NOMC || conda config --set restore_free_channel true
64+
7365
- $NOAPT || test "${TRAVIS_OS_NAME}" = "linux" || exit $?
7466
- $NOAPT || PATH="$(echo "$PATH" | sed 's,:/opt/pyenv/[^:]*,,g')"
7567
- $NOAPT || test "$(which python)" = "/usr/bin/python" || (
7668
which python; exit 1)
69+
- $NOAPT || sudo apt-get update -qq
70+
- $NOAPT || sudo apt-get install -y
71+
build-essential libgsl0-dev python-dev
72+
python-numpy python-setuptools python-pip python-wxtools
7773
- $NOAPT || devutils/makesdist
7874
- $NOAPT || MYTARBUNDLE="$(ls -t "${PWD}"/dist/*.tar.gz | head -1)"
7975

8076
install:
81-
- $NOMC || conda build --python=${MYPYTHON_VERSION} conda-recipe
77+
- $NOMC || conda build --python=${MYPYTHON_VERSION} --no-test conda-recipe
8278
- $NOMC || conda render --python=${MYPYTHON_VERSION} --output conda-recipe |
8379
sed 's,.*/,,; s/[.]tar[.]bz2$//; s/-/=/g' > /tmp/mypackage.txt
8480
- $NOMC || source activate testenv
8581
- $NOMC || conda install --yes --use-local --file=/tmp/mypackage.txt
8682

83+
# TODO - remove after fix of libgsl.a location in pdffit2
84+
- $NOAPT || sudo ln -si /usr/lib/x86_64-linux-gnu/libgsl.a /usr/lib/libgsl.a
85+
8786
- $NOAPT || pip install $MYPIPFLAGS coverage
88-
# TODO - remove after fixup release of PyCifRW following 4.3.
89-
- $NOAPT || pip install $MYPIPFLAGS "pycifrw==4.2.1"
90-
- $NOAPT || easy_install --user "${MYTARBUNDLE}"
87+
- $NOAPT || pip install $MYPIPFLAGS "${MYTARBUNDLE}"
9188

9289
- cd ${MYRUNDIR}
9390
- MYGIT_REV=$(python -c "import ${MYNAME}.version as v; print(v.__git_commit__)")

conda-recipe/bld.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%PYTHON% setup.py install
1+
%PYTHON% -m pip install --no-deps -vv .
22
if errorlevel 1 exit 1
33

44
:: Add more build steps here, if they are necessary.

conda-recipe/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
$PYTHON setup.py install
3+
$PYTHON -m pip install --no-deps -vv .
44

55
# Add more build steps here, if they are necessary.
66

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
python:
2+
- 2.7

conda-recipe/meta.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ app:
2727
summary: materials structure analysis from Pair Distribution Function
2828

2929
requirements:
30-
build:
31-
- python
30+
host:
31+
- python {{ python }}
32+
- pip
3233
- setuptools
33-
- diffpy.pdffit2
34-
- diffpy.structure 1.*
35-
- diffpy.utils 1.*
3634

3735
run:
3836
- python
@@ -41,8 +39,8 @@ requirements:
4139
- wxpython 3.*
4240
- menuinst [win]
4341
- diffpy.pdffit2
44-
- diffpy.structure 1.*
45-
- diffpy.utils 1.*
42+
- diffpy.structure
43+
- diffpy.utils
4644

4745
test:
4846
# Python imports

conda-recipe/run_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env python
22

3-
import diffpy.pdffit2.tests
4-
assert diffpy.pdffit2.tests.testdeps().wasSuccessful()
3+
import diffpy.pdfgui.tests
4+
assert diffpy.pdfgui.tests.testdeps().wasSuccessful()

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def dirglob(d, *patterns):
100100
# manual and tutorial files should not be zipped
101101
zip_safe = False,
102102
install_requires = [
103-
'diffpy.Structure>=1.2',
104-
'diffpy.pdffit2>=1.1a0',
105-
'diffpy.utils>=1.1',
103+
'diffpy.structure',
104+
'diffpy.pdffit2',
105+
'diffpy.utils',
106106
],
107107

108108
author = 'Simon J.L. Billinge',

0 commit comments

Comments
 (0)