File: rules

package info (click to toggle)
pypi2deb 4.20240727
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 200 kB
  • sloc: python: 1,088; sh: 36; makefile: 25
file content (18 lines) | stat: -rwxr-xr-x 542 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

VERSION := $(shell python3 -c "import pypi2deb; print(pypi2deb.VERSION)")

%:
	dh $@ --with python3

override_dh_auto_clean:
	# Test if versions are synchronized (only if releasing); this will bomb if not synced
	if [ "$(DEB_DISTRIBUTION)" != "UNRELEASED" -a "$(VERSION)" != "$(DEB_VERSION)" ] ; \
	then \
		echo 'Please update VERSION variable in pypi2deb/__init__.py'; exit 1 ; \
	fi

	dh_auto_clean
	find . -type d -name __pycache__ -print0 | xargs --null --no-run-if-empty rm -rf