#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export PYBUILD_NAME = gensim
export PYBUILD_DISABLE_python2 = 1

# The Debian build process does not allow network access
# since this could result in non-determinism in the build.
export SKIP_NETWORK_TESTS = 1

# The tests rely on files that are removed from the tarball
# see debian/copyright for the details of the files and reasons,
# so only enable the tests that are known to not use the files.
export SKIP_DATA_TESTS = 1

# Workaround for gensim not using the fasttext in $PATH
# https://github.com/RaRe-Technologies/gensim/pull/3264
export FT_HOME = /usr/bin

# Enable verbose tests
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
export PYBUILD_TEST_ARGS=-v
endif

%:
	dh $@ --with python3 --buildsystem=pybuild
