File: rules

package info (click to toggle)
python-semantic-release 7.32.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 760 kB
  • sloc: python: 6,564; makefile: 167; sh: 19
file content (28 lines) | stat: -rwxr-xr-x 894 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
#!/usr/bin/make -f

export PYBUILD_NAME=semantic-release
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS=-x -k "not test_vcs_helpers.py and not test_current_release_version_should_return_correct_version and not test_cli and not test_config and not test_current_version_should_return_correct_version"

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build $@ --buildsystem=pybuild
	cd docs; PYTHONPATH=.. make man; PYTHONPATH=.. LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8 sphinx-build -bhtml . _build/html

override_dh_auto_clean:
	dh_auto_clean
	rm -rf docs/api/ docs/_build/ python_semantic_release.egg-info/

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(eval BUILD_DIR=$(shell pybuild --print '{build_dir}'))
	for dir in $(BUILD_DIR); do \
		cp -r tests $$dir ; \
	done
	dh_auto_test
	for dir in $(BUILD_DIR); do \
		rm -r $$dir/tests ; \
	done
endif