-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.python
68 lines (53 loc) · 2.07 KB
/
Makefile.python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
include config/base.config
####
PYTHONVER = 3.13.1
PYTHON = Python-${PYTHONVER}
PYTHON_INST_PATH = ${NLYTIQ_INST_PATH}
# Python needs freetype include directory
CXXFLAGS += $(shell freetype-config --cflags)
### MacOSX specific CFLAGS/LDFLAGS (c.f. https://stackoverflow.com/questions/41489439/pip3-installs-inside-virtual-environment-with-python3-6-failing-due-to-ssl-modul)
ifeq ($(OS),Darwin)
include config/forcepyllvm.config
CFLAGS += -I$(shell brew --prefix openssl)/include \
-I$(shell brew --prefix sqlite3)/include \
-I$(shell brew --prefix gdbm)/include \
-I$(shell brew --prefix ossp-uuid)/include/ossp/ \
-I/opt/X11/include \
-I/usr/local/include \
-I/usr/local//Cellar/zlib/1.2.11/include
LDFLAGS += -L$(shell brew --prefix openssl)/lib \
-L$(shell brew --prefix sqlite3)/lib \
-L$(shell brew --prefix gdbm)/lib \
-L$(shell brew --prefix ossp-uuid)/lib/ \
-L/opt/X11/lib/ \
-L/usr/local/lib \
-L/usr/local//Cellar/zlib/1.2.11/lib
endif
# ${_EPF_} contains the front matter for configure after the include below
include config/configure.prefix.flag.config
#--------------------------------------------------------------------------#
all: install-python-modules
clean: clean-python
configure-python:
tar -Jxvf sources/${PYTHON}.tar.xz
ifeq (${OS},Darwin)
cd ${PYTHON} ; ${_EPF_} ./configure --prefix=${NLYTIQ_INST_PATH} \
--disable-optimizations \
--with-openssl=$(shell brew --prefix openssl)
--disable-profiling
else
cd ${PYTHON} ; ${_EPF_} ./configure --prefix=${NLYTIQ_INST_PATH} \
--enable-optimizations --enable-shared
endif
touch configure-python
make-python: configure-python
cd ${PYTHON} ; make -j${NCPU}
touch make-python
install-python: make-python
cd ${PYTHON} ; make install
touch install-python
install-python-modules: install-python
${_EPF_} LD_LIBRARY_PATH=${NLYTIQ_INST_PATH}/lib ${NLYTIQ_INST_PATH}/bin/pip3 install -r sources/python-pkgs-requirements.txt
touch install-python-modules
clean-python:
rm -rf ${PYTHON} make-python configure-python install-python install-python-modules python