[Python-modules-commits] [python-scrapy] 01/03: Build documentation in override_dh_sphinxdoc.

Michael Fladischer fladi at moszumanska.debian.org
Mon Jan 22 08:10:42 UTC 2018


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch debian/master
in repository python-scrapy.

commit ee0fe0c2c5356a291d22a8a1ba71c2b5dc17b681
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Sun Jan 21 21:29:52 2018 +0100

    Build documentation in override_dh_sphinxdoc.
---
 debian/changelog              |  1 +
 debian/python-scrapy-doc.docs |  1 -
 debian/rules                  | 17 +++++++++--------
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f318054..b868247 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ python-scrapy (1.5.0-1) UNRELEASED; urgency=low
   * Enable autopkgtest-pkg-python testsuite.
   * Remove debian/python-scrapy.examples as upstream no longer provides
     the related files.
+  * Build documentation in override_dh_sphinxdoc.
 
  -- Michael Fladischer <fladi at debian.org>  Tue, 09 Jan 2018 08:55:16 +0100
 
diff --git a/debian/python-scrapy-doc.docs b/debian/python-scrapy-doc.docs
deleted file mode 100644
index a213c54..0000000
--- a/debian/python-scrapy-doc.docs
+++ /dev/null
@@ -1 +0,0 @@
-docs/build/html
diff --git a/debian/rules b/debian/rules
index aa8fe4b..29d6a84 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,10 +5,6 @@ export PYBUILD_NAME=scrapy
 export PYBUILD_BEFORE_TEST=cd {dir}/tests/keys; cat example-com.key.pem example-com.cert.pem >cert.pem
 export DH_ALWAYS_EXCLUDE=license.txt:_sources/:.buildinfo
 
-LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
-BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
-SPHINXOPTS := -D html_last_updated_fmt=\"$(BUILD_DATE)\"
-
 %:
 	dh $@ --with python2,python3,bash_completion,sphinxdoc --buildsystem=pybuild
 
@@ -16,14 +12,19 @@ override_dh_auto_install:
 	dh_auto_install
 	mv debian/python-scrapy/usr/bin/scrapy debian/python-scrapy/usr/bin/python2-scrapy
 	mv debian/python3-scrapy/usr/bin/scrapy debian/python3-scrapy/usr/bin/python3-scrapy
-	cd docs/ && $(MAKE) html SPHINXOPTS="$(SPHINXOPTS)"
+
+override_dh_sphinxdoc:
+ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
+	PYTHONPATH=. sphinx-build -b html -N docs/ $(CURDIR)/debian/python-scrapy-doc/usr/share/doc/python-scrapy-doc/html
+	dh_sphinxdoc
+endif
 
 override_dh_install:
 	dh_install -Xjquery.js
 
-override_dh_auto_clean:
-	dh_auto_clean
-	cd docs/ && $(MAKE) clean
+override_dh_clean:
+	rm -rf docs/.build
+	dh_clean
 
 override_dh_compress:
 	dh_compress -X.js -Xobjects.inv

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-scrapy.git



More information about the Python-modules-commits mailing list