mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 14:15:30 -04:00
detect python3 and python3
This commit is contained in:
parent
88a23a4d12
commit
4a2b25e6ab
1 changed files with 10 additions and 1 deletions
|
|
@ -7,7 +7,16 @@ LIBRARY = libnwpython.a
|
|||
OBJ = python_input.o task_python.o nwchem_wrap.o nw_inp_from_string.o
|
||||
|
||||
ifndef PYTHONVERSION
|
||||
PYTHONVERSION=$(shell python -V| cut -d ' ' -f 2 |cut -d . -f 1-2)
|
||||
GOTPYTHON := $(shell command -v python 2> /dev/null)
|
||||
GOTPYTHON2 := $(shell command -v python2 2> /dev/null)
|
||||
GOTPYTHON3 := $(shell command -v python3 2> /dev/null)
|
||||
ifdef GOTPYTHON3
|
||||
PYTHONVERSION=$(shell python3 -V| cut -d ' ' -f 2 |cut -d . -f 1-2)
|
||||
else ifdef GOTPYTHON2
|
||||
PYTHONVERSION=$(shell python2 -V| cut -d ' ' -f 2 |cut -d . -f 1-2)
|
||||
else ifdef GOTPYTHON
|
||||
PYTHONVERSION=$(shell python -V| cut -d ' ' -f 2 |cut -d . -f 1-2)
|
||||
endif
|
||||
endif
|
||||
|
||||
LIB_INCLUDES = $(shell python$(PYTHONVERSION)-config --includes| sed -e "s/\-iwithsysroot/\-I/g")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue