forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rules
executable file
·51 lines (36 loc) · 1.5 KB
/
rules
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
#!/usr/bin/make -f
SHELL := /bin/bash
export DH_VERBOSE=1
PY3VERS=$(shell py3versions -vr)
PY3DEF=$(shell py3versions -dv)
PY3LIBPATH := $(shell python3 -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_platlib)")
# Look at #634012 to understand why is needed and what will happen if we set
# compat to 9
unexport LDFLAGS
export ATLAS=None
# https://github.com/numpy/numpy/pull/20695
export NPY_DISABLE_SVML=1
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_clean:
override_dh_installman:
dh_installman -ppython-numpy-doc debian/dh_numpy3.1
override_dh_install:
# install numpy.i into the include directory
cp -a tools/swig/numpy.i debian/tmp/usr/lib/python$(PY3DEF)/dist-packages/numpy/core/include/numpy
dh_install
# create symlinks for .h files
set -e; for i in $(PY3DEF); do \
ABITAG=`python$$i -c "import sys; print(sys.abiflags)"`; \
[ -d $(CURDIR)/debian/python3-numpy/usr/include/python$$i$$ABITAG ] || \
mkdir -p $(CURDIR)/debian/python3-numpy/usr/include/python$$i$$ABITAG; \
dh_link -ppython3-numpy usr/lib/python3/dist-packages/numpy/core/include/numpy usr/include/python$$i$$ABITAG/numpy; \
done
override_dh_gencontrol:
python3 debian/versions3.helper >> debian/python3-numpy.substvars
dh_gencontrol
override_dh_auto_test:
override_dh_auto_install:
dh_auto_install
# Install for Python 3
python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \