File: rules

package info (click to toggle)
python-eth-utils 5.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,140 kB
  • sloc: python: 5,985; makefile: 238
file content (30 lines) | stat: -rwxr-xr-x 1,038 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
29
30
#!/usr/bin/make -f

# Copy the fixtures directory to the build environment, as it is needed by the tests.
export PYBUILD_BEFORE_TEST = cp -R {dir}/fixtures {build_dir}

export PYBUILD_TEST_ARGS = $(if $(filter i386,$(DEB_BUILD_ARCH)), \
	|| echo "Known test issues (i386 set order)")

# Remove the fixtures directory after the tests have completed.
export PYBUILD_AFTER_TEST=rm -R {build_dir}/fixtures

%:
	dh $@ --buildsystem=pybuild

execute_before_dh_auto_build:
 # Build HTML documentation
	mkdir -p docs/_build/html
	sphinx-build -b html -D html_theme=default \
		docs docs/_build/html

execute_after_dh_auto_install:
 # Use debhelper to obtain the upstream version
 # See patches/0001-change-auto-version.patch for more info
	sed -i "s/@DEB_VERSION@/$$(head -1 debian/changelog | \
		grep -Po '\(\K[^~+-]+')/" \
		debian/python3-eth-utils/usr/lib/python3.*/dist-packages/eth_utils/__init__.py

execute_after_dh_sphinxdoc:
 # Delete '_source' directory
	rm -rf debian/python3-eth-utils/usr/share/doc/python3-eth-utils/html/_sources/