Skip to content

Commit 4ecde5b

Browse files
committed
Simplify LD_LIBRARY_PATH on Travis
Based from: http://stackoverflow.com/a/24115039/5208670 Moved to own section to separate as a prep-enviroment step
1 parent 0f00e3a commit 4ecde5b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.travis.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
sudo: false
22

3-
# language: csharp installs mono/dotnet but has limited python.
43
language: python
54
python:
65
- 2.7
@@ -29,6 +28,11 @@ addons:
2928
- mono-devel
3029
- ca-certificates-mono
3130

31+
before_install:
32+
# Set-up dll path for embedded tests
33+
- PY_LIBDIR=$(python -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))')
34+
- export LD_LIBRARY_PATH=$PY_LIBDIR:$LD_LIBRARY_PATH
35+
3236
install:
3337
- pip install --upgrade pycparser coverage codecov pytest
3438
# setup.py install works too, but need to deal w Python.test then
@@ -39,11 +43,6 @@ script:
3943
- export PYTHONPATH=`pwd`:$PYTHONPATH
4044
- python -m pytest
4145

42-
# Set-up dll path for embedded tests
43-
- OUTPUT=$(python --version 2>&1)
44-
- PY_VER=${OUTPUT:7:9}
45-
- export LD_LIBRARY_PATH=/opt/python/$PY_VER/lib:$LD_LIBRARY_PATH
46-
- echo $LD_LIBRARY_PATH
4746
- cp Python.Runtime.dll.config src/embed_tests/bin/Python.Runtime.dll.config
4847
# Run embedded tests
4948
# - mono ./packages/NUnit.*/tools/nunit3-console.exe src/embed_tests/bin/Python.EmbeddingTest.dll

0 commit comments

Comments
 (0)