Skip to content

Commit d91e38f

Browse files
authored
Add windows build to travis (#32)
1 parent 8fc172d commit d91e38f

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ matrix:
1414
env:
1515
- TEST_SUITE=osx
1616
- TRAVIS_PYTHON_VERSION=3.6.8
17+
# Windows
18+
- name: "Python 3.6, Windows + pydicom"
19+
os: windows
20+
language: shell
21+
env:
22+
- TEST_SUITE=windows
23+
- TRAVIS_PYTHON_VERSION=3.6.8
1724
# Conda next, also takes a while
1825
- name: "Python 3.6, Ubuntu + conda + pydicom"
1926
os: linux

build_tools/travis/install.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ elif [[ "$TEST_SUITE" == 'conda' ]]; then
4747
conda activate test-environment
4848
conda install --yes nose pytest pytest-cov setuptools
4949
conda install --yes -c conda-forge pydicom
50+
elif [[ "$TEST_SUITE" == 'windows' ]]; then
51+
choco install python --version $TRAVIS_PYTHON_VERSION
52+
#ls /c
53+
#echo ""
54+
#echo "chocolatey installs:"
55+
#ls /c/ProgramData/chocolatey/bin/
56+
#ls /c/Python36 # make this generic
57+
#echo $PATH
58+
#echo $CL
59+
export PATH="/c/Python36:/c/Python36/Scripts:$PATH" # make this generic
60+
python -m pip install --upgrade pip
61+
python -m pip install pydicom pytest pytest-cov
5062
else
5163
pip install pytest pytest-cov
5264
fi

pylibjpeg/tests/test_environment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def test_os(self):
4343
elif os_name == 'linux':
4444
assert platform.system() == 'Linux'
4545
assert "CPython" in platform.python_implementation()
46+
elif os_name == 'windows':
47+
assert platform.system() == 'Windows'
4648
else:
4749
raise NotImplementedError("Unknown 'TRAVIS_OS_NAME' value")
4850

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ def get_source_files():
114114
extra_compile_args = []
115115
extra_link_args = []
116116
if platform.system() == 'Windows':
117-
os.environ['LIB'] == os.path.join(sys.executable, '../', 'libs')
117+
os.environ['LIB'] = os.path.abspath(
118+
os.path.join(sys.executable, '../', 'libs')
119+
)
118120
extra_compile_args = get_mscv_args()
119121
elif platform.system() in ['Darwin', 'Linux']:
120122
opts = get_gcc_args()

0 commit comments

Comments
 (0)