Skip to content

Commit 21fa1dc

Browse files
committed
Use $MYNAME instead of explicit package name.
This should ease applying .travis.yml patches in diffpy projects.
1 parent 58c1169 commit 21fa1dc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ addons:
3636
- python-setuptools
3737

3838
before_install:
39+
- MYNAME=diffpy.pdfgui
3940
- umask 022
4041
- git fetch origin --tags
4142
- if ${MYUSEMC}; then
@@ -75,22 +76,22 @@ before_install:
7576

7677
install:
7778
- $NOMC || CONDA_PY=${MYPYTHON_VERSION} conda build conda-recipe
78-
- $NOMC || conda list --name=_test --export diffpy.pdfgui > /tmp/mypackage.txt
79+
- $NOMC || conda list --name=_test --export ${MYNAME} > /tmp/mypackage.txt
7980
- $NOMC || source activate testenv
8081
- $NOMC || conda install --yes --use-local --file=/tmp/mypackage.txt
8182

8283
- $NOAPT || pip install $MYPIPFLAGS coverage
8384
- $NOAPT || easy_install --user "${MYTARBUNDLE}"
8485

8586
- cd ${MYRUNDIR}
86-
- MYGIT_REV=$(python -c "import diffpy.pdfgui.version as v; print(v.__gitsha__)")
87+
- MYGIT_REV=$(python -c "import ${MYNAME}.version as v; print(v.__gitsha__)")
8788
- if [[ "${TRAVIS_COMMIT}" != "${MYGIT_REV}" ]]; then
8889
echo "Version mismatch ${TRAVIS_COMMIT} vs ${MYGIT_REV}.";
8990
exit 1;
9091
fi
9192

9293
script:
93-
- coverage run --source diffpy.pdfgui -m diffpy.pdfgui.tests.rundeps
94+
- coverage run --source ${MYNAME} -m ${MYNAME}.tests.run
9495

9596
after_success:
9697
- pip install $MYPIPFLAGS codecov

0 commit comments

Comments
 (0)