File: rules

package info (click to toggle)
python-jedi 0.14.1-1
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 7,720 kB
  • sloc: python: 21,190; makefile: 172; ansic: 13
file content (32 lines) | stat: -rwxr-xr-x 1,239 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/make -f

export PYBUILD_DISABLE=test

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

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG.rst

override_dh_auto_clean:
	rm -rf .cache
	dh_auto_clean

override_dh_auto_test:
	dh_auto_test -- --system=custom --test-args='PYTHONPATH={build_dir} {interpreter} {dir}/test/run.py'

DEB_UPSTREAM_VERSION:=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
DEB_UPSTREAM_REV:=$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*git[0-9]+\+([^-]+).*,\1,p')
get-orig-source:
	if [ -n "$(DEB_UPSTREAM_REV)" ]; then\
		git clone https://github.com/davidhalter/jedi.git _upstream_repo && \
		cd _upstream_repo && git archive --format=tar.gz --prefix='jedi-$(DEB_UPSTREAM_VERSION)/' $(DEB_UPSTREAM_REV) \
		  -o ../python-jedi_$(DEB_UPSTREAM_VERSION).orig.tar.gz && \
		cd .. && rm -rf _upstream_repo/; \
	else\
		uscan --force-download --rename --destdir=. --download-version $(DEB_UPSTREAM_VERSION);\
	fi
	git clone https://github.com/davidhalter/jedi-vim.git && \
	cd jedi-vim && git archive --format=tar.gz --prefix='jedi-vim-$(DEB_UPSTREAM_VERSION)/' HEAD \
	  -o ../python-jedi_$(DEB_UPSTREAM_VERSION).orig-vim.tar.gz && \
	cd .. && rm -rf jedi-vim/