Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 UPSTREAM_GIT := https://github.com/openstack/oslo.policy.git
4 include /usr/share/openstack-pkg-tools/pkgos.make
5
6 %:
7 dh $@ --buildsystem=pybuild --with python3,sphinxdoc
8
9 override_dh_auto_clean:
10 rm -rf build *.egg-info .stestr doc/source/reference/api .pybuild
11 find . -iname '*.pyc' -delete
12 for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
13
14 override_dh_auto_build:
15 echo "Do nothing..."
16
17 override_dh_auto_install:
18 pkgos-dh_auto_install --no-py2
19
20 override_dh_python3:
21 dh_python3 --shebang=/usr/bin/python3
22
23 override_dh_auto_test:
24 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
25 pkgos-dh_auto_test --no-py2 'oslo_policy\.tests\.(?!(.*test_fixtures\.FixtureTestCase\.test_enforce_http_true.*|.*test_fixtures\.FixtureTestCase\.test_enforce_https_true.*|.*test_policy\.EnforcerTest\.test_enforcer_understands_domain_scope.*|.*test_policy\.EnforcerTest\.test_enforcer_raises_invalid_scope_with_project_scope_type.*))'
26 endif
27
28 override_dh_sphinxdoc:
29 ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
30 PYTHONPATH=. PYTHON=python3 python3 -m sphinx -b html doc/source debian/python-oslo.policy-doc/usr/share/doc/python-oslo.policy-doc/html
31 dh_sphinxdoc
32 endif