66
77DASPK =$(shell python -c 'import pydas.daspk; print pydas.daspk.__file__')
88DASSL =$(shell python -c 'import pydas.dassl; print pydas.dassl.__file__')
9- RDKIT_VERSION =$(shell python -c 'import rdkit; print rdkit.__version__')
109
11- .PHONY : all minimal main solver cantherm clean decython documentation QM mopac_travis
10+ .PHONY : all minimal main solver check cantherm clean decython documentation mopac_travis
1211
13- all : main solver QM
14-
15- noQM : main solver
12+ all : main solver check
1613
1714minimal :
1815 python setup.py build_ext minimal --build-lib . --build-temp build --pyrex-c-in-temp
@@ -39,86 +36,75 @@ endif
3936cantherm :
4037 python setup.py build_ext cantherm --build-lib . --build-temp build --pyrex-c-in-temp
4138
42- QM :
43- @ echo " Checking if you have symmetry..."
44- @ echo " symmetry -h"
45- @ echo " Checking you have rdkit..."
46- @ python -c ' import rdkit; print rdkit.__file__'
47- @ echo " Checking rdkit version..."
48- ifneq ($(RDKIT_VERSION ) ,)
49- @ echo "Found rdkit version $(RDKIT_VERSION)"
50- else
51- $(error RDKit version out of date, please install RDKit version 2015.03.1 or later with InChI support);
52- endif
53- @ echo "Checking rdkit has InChI support..."
54- @ python -c 'from rdkit import Chem; assert Chem.inchi.INCHI_AVAILABLE, "RDKit installed without InChI Support. Please install with InChI."'
39+ check :
40+ @ python utilities.py check-dependencies
5541
5642documentation :
5743 $(MAKE ) -C documentation html
5844 @ echo " Start at: documentation/build/html/index.html"
5945
6046clean :
61- python setup.py clean --build-temp build
62- rm -rf build/
63- find . -name ' *.so' -exec rm -f ' {}' \;
64- find . -name ' *.pyc' -exec rm -f ' {}' \;
65-
47+ @ echo " Removing build directory..."
48+ @ python setup.py clean --build-temp build
49+ @ echo " Removing compiled files..."
50+ @ python utilities.py clean
51+ @ echo " Cleanup completed."
52+
6653clean-solver :
67- rm -r build/pyrex/rmgpy/solver/
68- rm -r build/build/pyrex/rmgpy/solver/
69- find rmgpy/solver/ -name ' *.so' -exec rm -f ' {}' \;
70- find rmgpy/solver/ -name ' *.pyc' -exec rm -f ' {}' \;
54+ @ echo " Removing solver build directories..."
55+ ifeq ($(OS ) ,Windows_NT)
56+ @ -rd /s /q build\pyrex\rmgpy\solver
57+ @ -rd /s /q build\build\pyrex\rmgpy\solver
58+ else
59+ @ -rm -r build/pyrex/rmgpy/solver/
60+ @ -rm -r build/build/pyrex/rmgpy/solver/
61+ endif
62+ @ echo "Removing compiled files..."
63+ @ python utilities.py clean-solver
64+ @ echo "Cleanup completed."
7165
7266decython :
7367 # de-cythonize all but the 'minimal'. Helpful for debugging in "pure python" mode.
7468 find . -name * .so ! \( -name _statmech.so -o -name quantity.so -o -regex ' .*rmgpy/solver/.*' \) -exec rm -f ' {}' \;
7569 find . -name * .pyc -exec rm -f ' {}' \;
7670
7771test-all :
78- ifeq ($(OS ) ,Windows_NT)
79- nosetests --nocapture --nologcapture --all-modules --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
80- else
72+ ifneq ($(OS ) ,Windows_NT)
8173 mkdir -p testing/coverage
8274 rm -rf testing/coverage/*
83- nosetests --nocapture --nologcapture --all-modules --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
8475endif
76+ nosetests --nocapture --nologcapture --all-modules --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
8577
8678test-unittests :
87- ifeq ($(OS ) ,Windows_NT)
88- nosetests --nocapture --nologcapture --all-modules -A 'not functional' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
89- else
79+ ifneq ($(OS ) ,Windows_NT)
9080 mkdir -p testing/coverage
9181 rm -rf testing/coverage/*
92- nosetests --nocapture --nologcapture --all-modules -A 'not functional' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
9382endif
83+ nosetests --nocapture --nologcapture --all-modules -A 'not functional' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
9484
9585test test-unittests-non-auth :
96- ifeq ($(OS ) ,Windows_NT)
97- nosetests --nocapture --nologcapture --all-modules -A 'not functional and not auth' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
98- else
86+ ifneq ($(OS ) ,Windows_NT)
9987 mkdir -p testing/coverage
10088 rm -rf testing/coverage/*
101- nosetests --nocapture --nologcapture --all-modules -A 'not functional and not auth' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
10289endif
90+ nosetests --nocapture --nologcapture --all-modules -A 'not functional and not auth' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy
10391
10492test-functional :
105- ifeq ($(OS ) ,Windows_NT)
106- nosetests --nocapture --nologcapture --all-modules -A 'functional' --verbose --exe rmgpy
107- else
93+ ifneq ($(OS ) ,Windows_NT)
10894 mkdir -p testing/coverage
10995 rm -rf testing/coverage/*
110- nosetests --nocapture --nologcapture --all-modules -A 'functional' --verbose --exe rmgpy
11196endif
97+ nosetests --nocapture --nologcapture --all-modules -A 'functional' --verbose --exe rmgpy
11298
11399test-database :
114100 nosetests -v -d testing/databaseTest.py
115- eg0 : noQM
101+ eg0 : all
116102 mkdir -p testing/eg0
117103 rm -rf testing/eg0/*
118104 cp examples/rmg/superminimal/input.py testing/eg0/input.py
119105 @ echo " Running eg0: superminimal (H2 oxidation) example"
120106 python rmg.py testing/eg0/input.py
121- eg1 : noQM
107+ eg1 : all
122108 mkdir -p testing/eg1
123109 rm -rf testing/eg1/*
124110 cp examples/rmg/minimal/input.py testing/eg1/input.py
@@ -168,7 +154,7 @@ eg7: all
168154 @ echo " Running eg7: gri_mech_rxn_lib example"
169155 python rmg.py testing/eg7/input.py
170156
171- scoop : noQM
157+ scoop : all
172158 mkdir -p testing/scoop
173159 rm -rf testing/scoop/*
174160 cp examples/rmg/minimal/input.py testing/scoop/input.py
0 commit comments