File: rules

package info (click to toggle)
python-emmet-core 0.44.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 60,668 kB
  • sloc: python: 10,541; makefile: 28
file content (40 lines) | stat: -rwxr-xr-x 1,157 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
#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=emmet-core

PY3VERS=$(shell py3versions --supported -v)

# debian does not use internet access at build-time
# so skip tests requiring internet
SKIP_TEST_LIST += test_from_url test_seriallization

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_test:
	for py in $(PY3VERS); do \
	SKIP_TESTS=""; \
	list_initialised=0; \
	for t in $(SKIP_TEST_LIST); do \
	  if [ $${list_initialised} = 0 ]; then \
	    SKIP_TESTS=$$t; \
	    list_initialised=1; \
	  else \
	    SKIP_TESTS="$${SKIP_TESTS} or $$t"; \
	  fi; \
	done; \
	if [ "x$${SKIP_TESTS}" != "x" ]; then \
	  SKIP_TESTS="not ( $${SKIP_TESTS} )"; \
	fi; \
	echo "skipping tests: $${SKIP_TESTS}"; \
	  pybuilddir=`pybuild --pyver $$py --print build_dir | awk '{print $$3}'`; \
	  testdir=$(CURDIR)/.pybuild/test_python$$py; \
	  mkdir $$testdir; cp -a tests $$testdir; \
	  cd $$testdir; \
	  PMG_TEST_FILES_DIR=$(CURDIR)/debian/test_files PYTHONPATH=$$pybuilddir \
	    python$$py -m pytest -v -k "$${SKIP_TESTS}" $$testdir; \
	done