Commit cd137a2a authored by Ondřej Nový's avatar Ondřej Nový

Use pybuild to build package.

parent 120a9137
......@@ -3,11 +3,10 @@ swift (2.22.0-1) UNRELEASED; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.4.0.
* Remove prerm/preinst scripts for upgrading from version 2.6.0-2.
* d/rules: Fix typo dh_install -> dh_auto_install
* Add lintian overrides for
package-supports-alternative-init-but-no-init.d-script
* python3-swift.lintian-overrides: Fix wrong binary package name
* python3-swift.install: Install only Python 3
* Use pybuild to build package.
-- Ondřej Nový <onovy@debian.org> Mon, 05 Aug 2019 13:32:18 +0200
......
etc
test
swift.egg-info
#!/usr/bin/make -f
#export DH_VERBOSE=1
export SWIFT_TEST_CONFIG_FILE=$(CURDIR)/debian/swift-test.conf
export PYBUILD_TEST_ARGS=\
test/unit \
--exclude-test=test.unit.common.test_utils.TestUtils.test_get_logger_sysloghandler_plumbing
include /usr/share/openstack-pkg-tools/pkgos.make
%:
dh $@ --buildsystem=python_distutils --with python3,sphinxdoc,systemd
dh $@ --buildsystem=pybuild --with python3,sphinxdoc,systemd
# clean sphinx build output
override_dh_auto_clean:
......@@ -13,21 +17,17 @@ override_dh_auto_clean:
rm -f debian/*.init
rm -f debian/*.service
rm -f debian/python3-swift.postinst
rm -f $(CURDIR)/swift-test.conf
dh_auto_clean
override_dh_auto_build:
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func python3-swift.postinst
override_dh_auto_install:
dh_auto_install
# build with sphinx documentation
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
LC_ALL=C.UTF-8 PYTHONPATH=. python3 -m sphinx doc/source $(CURDIR)/debian/swift-doc/usr/share/doc/swift-doc/base
LC_ALL=C.UTF-8 PYTHONPATH=. python3 -m sphinx api-ref/source $(CURDIR)/debian/swift-doc/usr/share/doc/swift-doc/api-ref
dh_sphinxdoc
endif
rm debian/tmp/usr/bin/swift-init
override_dh_auto_install:
pkgos-dh_auto_install --no-py2 --in-tmp
override_dh_auto_build:
dh_auto_build
/usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func python3-swift.postinst
# Create the init scripts and systemd unit files from the template
set -e ; for i in $(sort $(wildcard debian/*.init.in)) ; do \
......@@ -37,17 +37,14 @@ override_dh_auto_install:
debian/gen-systemd-unit $$i ; \
done
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
echo "[unit_test]\nfake_syslog = True" > $(CURDIR)/swift-test.conf
SWIFT_TEST_CONFIG_FILE=$(CURDIR)/swift-test.conf PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages python3 -m nose -v test/unit --exe \
--exclude-test=test.unit.common.test_utils.TestUtils.test_get_logger_sysloghandler_plumbing
rm -f $(CURDIR)/swift-test.conf
# build with sphinx documentation
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
LC_ALL=C.UTF-8 PYTHONPATH=. python3 -m sphinx doc/source $(CURDIR)/debian/swift-doc/usr/share/doc/swift-doc/base
LC_ALL=C.UTF-8 PYTHONPATH=. python3 -m sphinx api-ref/source $(CURDIR)/debian/swift-doc/usr/share/doc/swift-doc/api-ref
dh_sphinxdoc
endif
dh_auto_install
rm debian/tmp/usr/bin/swift-init
rm -rf debian/python3-swift/usr/lib/python*/dist-packages/test
gen-init-configurations:
# Create the init scripts and systemd unit files from the template
set -e ; for i in $(sort $(wildcard debian/*.init.in)) ; do \
......@@ -87,6 +84,3 @@ override_dh_installdocs:
override_dh_missing:
dh_missing --fail-missing
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
[unit_test]
fake_syslog = True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment