File: rules

package info (click to toggle)
sqlparse 0.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 548 kB
  • sloc: python: 4,345; sql: 142; makefile: 114; sh: 23
file content (43 lines) | stat: -rwxr-xr-x 1,129 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

export PYBUILD_NAME=sqlparse
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS=-v
# Run 2to3 against tests files if testing against python3, clean up afterwards
export PYBUILD_BEFORE_TEST=cp -R {dir}/tests {build_dir}; [ "{version.major}" = "2" ] || 2to3 -w {build_dir}/tests
export PYBUILD_AFTER_TEST=rm -fR {build_dir}/tests
# Disabling running tests for pypy for now due to missing dependencies
export PYBUILD_DISABLE_pypy=test

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf docs/build

override_dh_pypy:
	# No PyPy cli script.
	rm -rf debian/pypy-sqlparse/usr/bin
	dh_pypy

override_dh_python2:
	# No Python 2 cli script.
	rm -rf debian/python-sqlparse/usr/bin
	dh_python2

override_dh_auto_install:
	dh_auto_install
	# Use the separate binary package for the cli script.
	mkdir -p debian/sqlformat/usr/bin
	mv debian/python3-sqlparse/usr/bin/sqlformat \
	   debian/sqlformat/usr/bin
	rm -rf debian/python3-sqlparse/usr/bin

build: build-indep
build-indep: docs/build/html

build-arch:

docs/build/html:
	cd docs && $(MAKE) html