@@ -13,8 +13,23 @@ SHELL:= /bin/bash
1313
1414# Select this to have anaconda installed for you.
1515CONDA =./anaconda3
16+ # CONDA=/opt/anaconda3
17+ # CONDA=~/anaconda3
18+
19+ # ifeq ($(shell uname -s),MINGW64_NT-10.0-18362)
20+ ifeq ($(TRAVIS_OS_NAME ) ,windows)
21+ # CONDA=/c/tools/anaconda3
22+ CONDA=/c/tools/miniconda3
23+ endif
24+
25+
1626CONDA_ACTIVATE =source $(CONDA ) /etc/profile.d/conda.sh; conda activate
1727
28+ # ifeq ($(shell uname -s),MINGW64_NT-10.0-18362)
29+ ifeq ($(TRAVIS_OS_NAME ) ,windows)
30+ CONDA_ACTIVATE=source $(CONDA)/Scripts/activate; conda activate
31+ endif
32+
1833# Development:
1934# Test hapi() data read functions using repository code:
2035# make repository-test-data # Test using $(PYTHON)
@@ -67,8 +82,18 @@ ifeq ($(shell uname -s),Darwin)
6782 CONDA_PKG=Miniconda3-latest-MacOSX-x86_64.sh
6883endif
6984
70- condaenv :
85+
86+ condaenv :
87+ # ifeq ($(shell uname -s),MINGW64_NT-10.0-18362)
88+ ifeq ($(TRAVIS_OS_NAME ) ,windows)
89+ cp $(CONDA)/Library/bin/libcrypto-1_1-x64.* $(CONDA)/DLLs/
90+ cp $(CONDA)/Library/bin/libssl-1_1-x64.* $(CONDA)/DLLs/
91+
92+ # $(CONDA)/Scripts/conda config --set ssl_verify no
93+ $(CONDA)/Scripts/conda create -y --name $(PYTHON) python=$(PYTHON_VER)
94+ else
7195 make $(CONDA)/envs/$(PYTHON) PYTHON=$(PYTHON)
96+ endif
7297
7398$(CONDA ) /envs/$(PYTHON ) : /tmp/$(CONDA_PKG )
7499 $(CONDA_ACTIVATE ) ; \
@@ -79,6 +104,12 @@ $(CONDA)/envs/$(PYTHON): /tmp/$(CONDA_PKG)
79104 bash /tmp/$(CONDA_PKG ) -b -p $(CONDA )
80105
81106pythonw =$(PYTHON )
107+
108+ # ifeq ($(shell uname -s),MINGW64_NT-10.0-18362)
109+ ifeq ($(TRAVIS_OS_NAME ) ,windows)
110+ pythonw=python
111+ endif
112+
82113ifeq ($(UNAME_S ) ,Darwin)
83114# Use pythonw instead of python. On OS-X, this prevents "need to install python as a framework" error.
84115# The following finds the path to the binary of $(PYTHON) and replaces it with pythonw, e.g.,
@@ -90,10 +121,13 @@ endif
90121# 'python setup.py develop' creates symlinks in system package directory.
91122repository-test-data :
92123 @make clean
124+
93125 make condaenv PYTHON=$(PYTHON)
126+
94127 # https://stackoverflow.com/questions/30306099/pip-install-editable-vs-python-setup-py-develop
95128 $(CONDA_ACTIVATE) $(PYTHON); pip install pytest deepdiff; pip install --editable .
96129 # $(CONDA_ACTIVATE) $(PYTHON); $(PYTHON) setup.py develop | grep "Best"
130+
97131 $(CONDA_ACTIVATE) $(PYTHON); $(pythonw) -m pytest -v -m 'not long' hapiclient/test/test_hapi.py
98132 $(CONDA_ACTIVATE) $(PYTHON); $(pythonw) -m pytest -v -m 'long' hapiclient/test/test_hapi.py
99133 $(CONDA_ACTIVATE) $(PYTHON); $(pythonw) -m pytest -v hapiclient/test/test_hapitime2datetime.py
@@ -221,3 +255,6 @@ clean:
221255 - @rm -f MANIFEST
222256 - @rm -rf .pytest_cache/
223257 - @rm -rf hapiclient.egg-info/
258+ - @rm -rf /c/tools/Anaconda3/envs/python3.6/Scripts/wheel.exe*
259+ - @rm -rf /c/tools/Anaconda3/envs/python3.6/vcruntime140.dll.*
260+
0 commit comments