File: rules

package info (click to toggle)
python-jieba 0.42.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,864 kB
  • sloc: python: 194,937; makefile: 16; sh: 3
file content (28 lines) | stat: -rwxr-xr-x 1,131 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
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=jieba

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_test:
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="cd {dir}/test; PATH=$$PATH:{build_dir} python{version} {dir}/test/jieba_test.py" dh_auto_test

override_dh_fixperms:
	dh_fixperms
	# Fix executable bits on python modules
	find debian/python3-jieba -name "*.py" -exec chmod -x {} +

override_dh_installexamples:
	dh_installexamples
	# Convert Mandarin example files to UTF-8.
	# Resolves Lintian Warning: python-jieba-doc: national-encoding
	if [ -f debian/python-jieba-doc/usr/share/doc/python-jieba-doc/examples/test/test.txt ]; then \
		iconv -f GBK -t UTF-8 debian/python-jieba-doc/usr/share/doc/python-jieba-doc/examples/test/test.txt \
		> debian/python-jieba-doc/usr/share/doc/python-jieba-doc/examples/test/test.txt.tmp && \
		mv debian/python-jieba-doc/usr/share/doc/python-jieba-doc/examples/test/test.txt.tmp \
		debian/python-jieba-doc/usr/share/doc/python-jieba-doc/examples/test/test.txt; \
	fi