File: rules

package info (click to toggle)
django-restricted-resource 2016.8-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 240 kB
  • sloc: python: 695; makefile: 14; sh: 7
file content (23 lines) | stat: -rwxr-xr-x 781 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
#!/usr/bin/make -f

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

.PHONY: override_dh_auto_test
override_dh_auto_test:
	# Run the bundled tests (in-memory database) when building the package
	LC_ALL=C python3 ./django_restricted_resource/test_project/manage.py test

override_dh_auto_clean:
	dh_auto_clean
	$(RM) django_restricted_resource/__init__.pyc
	# Cleanup versiontools leftovers
	$(RM) -r setup.cfg django_restricted_resource.egg-info/

# get upstream version for get-orig-source target
VERSION:= $(shell dpkg-parsechangelog | grep '^Version: ' | sed -e 's/^Version: //' | sed -e 's/\-.*$$//')

sdist-orig:
	python setup.py sdist
	mv -v dist/django-restricted-resource-$(VERSION)*.tar.gz ../django-restricted-resource_$(VERSION).orig.tar.gz
	$(RM) -r versiontools-*.egg/