File: rules

package info (click to toggle)
faiss 1.13.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,228 kB
  • sloc: cpp: 91,727; python: 31,865; sh: 874; ansic: 425; makefile: 41
file content (56 lines) | stat: -rwxr-xr-x 1,622 bytes parent folder | download
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all abi=+lfs

include /usr/share/dpkg/architecture.mk

BUILD_TESTING = $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),OFF,ON)
# skip some flaky tests
# TestMemoryLeak fails, MERGE reports "bus error" on buildd (but not debci)
GTEST_FILTER := -TestMemoryLeak.*:MERGE.*
ifeq ($(DEB_HOST_ARCH_BITS),32)
GTEST_FILTER := ${GTEST_FILTER}:testCppcontribSaDecode*
endif
ifeq ($(DEB_BUILD_ARCH), sparc64)
GTEST_FILTER := ${GTEST_FILTER}:testCppcontribSaDecode*:testCppcontribUintreader*
endif
ifeq ($(DEB_BUILD_ARCH), s390x)
GTEST_FILTER := ${GTEST_FILTER}:testCppcontribSaDecode*:testCppcontribUintreader*:TestFastScan.*
endif
ifeq ($(DEB_BUILD_ARCH), armel)
GTEST_FILTER := ${GTEST_FILTER}:TestLowLevelIVF.IVFRQ
endif
ifneq ($(DEB_BUILD_ARCH), amd64)
# strange bus errors
GTEST_FILTER := ${GTEST_FILTER}:*flatcodes
endif

export PYBUILD_SYSTEM = cmake

COMMON_CONFIGURE_ARGS = \
	-DFAISS_ENABLE_GPU=OFF \
	-DFAISS_ENABLE_PYTHON=ON

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
COMMON_CONFIGURE_ARGS += \
	-DFAISS_USE_SYSTEM_GTEST=ON \
	-DFAISS_GTEST_FILTER="$(GTEST_FILTER)"
endif

export PYBUILD_CONFIGURE_ARGS = \
	$(COMMON_CONFIGURE_ARGS) \
	-DBUILD_TESTING=OFF \
	-DFAISS_ENABLE_C_API=OFF

export PYBUILD_CONFIGURE_ARGS_$(shell py3versions -d) = \
	$(COMMON_CONFIGURE_ARGS) \
	-DBUILD_TESTING=$(BUILD_TESTING) \
	-DFAISS_ENABLE_C_API=ON

export PYBUILD_AFTER_INSTALL = \
	cd {build_dir}/faiss/python \
	&& {interpreter} setup.py install --root=$(CURDIR)/debian/python3-faiss --install-lib=/usr/lib/python{version}/site-packages

%:
	dh $@ --buildsystem=pybuild