File: rules

package info (click to toggle)
migrate 0.13.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 968 kB
  • sloc: python: 5,854; makefile: 95; sh: 91
file content (53 lines) | stat: -rwxr-xr-x 1,495 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
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
#!/usr/bin/make -f

UPSTREAM_GIT := https://opendev.org/x/sqlalchemy-migrate.git
include /usr/share/openstack-pkg-tools/pkgos.make

LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")

%:
	dh $@ --buildsystem=python_distutils --with python3,sphinxdoc

override_dh_auto_clean:
	rm -rf dist build
	find . -name '*\.py[co]' -exec rm {} \;
	rm -f docs/reference.txt debian/install
	cp debian/test_db.cfg $(CURDIR)
	rm -rf .testrepository

override_dh_auto_build:
	echo "Do nothing..."

override_dh_auto_install:
	pkgos-dh_auto_install --no-py2 --in-tmp
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	chmod +x debian/test.sh

	PYTHONPATH=$(CURDIR)/debian/python3-gnocchiclient/usr/lib/python3/dist-packages \
		PATH=$(PATH):$(CURDIR)/debian/tmp/usr/bin \
		$(CURDIR)/debian/test.sh

	# Clean everything
	rm -rf debian/bin
	rm -rf sqlalchemy_migrate-$(VERSION).egg-info
endif


override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR) python3 -m sphinx -b html -a -E -N -D today="$(BUILD_DATE)" doc/source debian/python-migrate-doc/usr/share/doc/python-migrate-doc/html/
	dh_sphinxdoc -O--buildsystem=python_distutils
endif

override_dh_installchangelogs:
	dh_installchangelogs -i doc/source/changelog.rst

override_dh_compress:
	dh_compress -i -X.py -X.rst -X.js -Xobjects.inv

override_dh_auto_test:
	echo "Do nothing..."

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3