File: rules

package info (click to toggle)
sqlparse 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 584 kB
  • sloc: python: 4,806; sql: 159; makefile: 108; sh: 19
file content (38 lines) | stat: -rwxr-xr-x 1,024 bytes parent folder | download | duplicates (2)
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
#!/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 python3,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_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