File: rules

package info (click to toggle)
python-roborock 4.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 2,476 kB
  • sloc: python: 16,570; makefile: 17; sh: 6
file content (20 lines) | stat: -rwxr-xr-x 892 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/make -f
export PYBUILD_TEST_ARGS=--no-cov --ignore=tests/test_api.py --ignore=tests/test_a01_api.py -k "not test_device_trait_command_parsing" --snapshot-warn-unused
export PYBUILD_AFTER_BUILD=find {build_dir} -type f -name "*.py" -exec sed -i 's/^from Crypto\./from Cryptodome./g' {{}} +
export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/lib/python3*/dist-packages/roborock/devices/README.md

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	for py in `py3versions -s`; do \
	    build_dir=".pybuild/cpython3_$${py#python}/build"; \
	    cp -a tests pyproject.toml "$$build_dir/"; \
	    cd "$$build_dir"; \
	    find tests -type f -name "*.py" -exec sed -i 's/^from Crypto\./from Cryptodome./g' {} +; \
	    $${py} -m pytest tests ${PYBUILD_TEST_ARGS}; \
	    rm -r tests pyproject.toml; \
		cd $(CURDIR); \
	done
endif