control: tags -1 patch
From 1a9cc89fb12a97e2808ee96fa18d774e583d5fd7 Mon Sep 17 00:00:00 2001
From: Ghislain Antony Vaillant <ghisv...@gmail.com>
Date: Sat, 10 Jun 2017 12:57:30 +0100
Subject: [PATCH 2/3] Normalize the build and DEP-8 tests

---
 debian/rules            | 11 ++++++-----
 debian/tests/control    | 14 ++++++++++++--
 debian/tests/pydocstyle |  3 ---
 3 files changed, 18 insertions(+), 10 deletions(-)
 delete mode 100755 debian/tests/pydocstyle

diff --git a/debian/rules b/debian/rules
index cb2ceb8..e8195e2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,16 +4,17 @@
 export PYBUILD_NAME=pydocstyle
 export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/bin
 
+# skip test_integration (install_package needs fix, doesn't run with py3, writes into /usr/local etc.)
+# https://github.com/PyCQA/pydocstyle/issues/177
+export PYBUILD_BEFORE_TEST=cp -r src/tests {build_dir}
+export PYBUILD_TEST_ARGS=-x tests/test_d*
+export PYBUILD_AFTER_TEST=rm -rf {build_dir}/tests
+
 DEBDATE := $(shell dpkg-parsechangelog -Sdate | date -u +%F -f -)
 
 %:
 	dh $@ --with python3 --buildsystem=pybuild
 
-override_dh_auto_test:
-	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} -Wd -m pytest -v -x src/tests/test_d*" dh_auto_test
-	# skip test_integration (install_package needs fix, doesn't run with py3, writes into /usr/local etc.)
-	# https://github.com/PyCQA/pydocstyle/issues/177
-
 override_dh_auto_install:
 	dh_auto_install
 	python3 setup.py install_scripts --skip-build \
diff --git a/debian/tests/control b/debian/tests/control
index 69743a9..15c83a8 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,12 @@
-Tests: pydocstyle
-Depends: python3-all, python3-mock, python3-pytest, python3-setuptools
\ No newline at end of file
+Test-Command: set -e
+ ; cp -r src/tests "$AUTOPKGTEST_TMP"
+ ; for py in $(py3versions -r 2>/dev/null)
+ ; do cd "$AUTOPKGTEST_TMP"
+ ; echo "Testing with $py:"
+ ; $py -m pytest -v -x tests/test_d*
+ ; done
+Depends: python3-all,
+         python3-mock,
+         python3-pydocstyle,
+         python3-pytest,
+         python3-setuptools
diff --git a/debian/tests/pydocstyle b/debian/tests/pydocstyle
deleted file mode 100755
index d594ef3..0000000
--- a/debian/tests/pydocstyle
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-set -e
-for py in $(py3versions -i); do echo "[*] testing $py:"; PYTHONPATH=. $py -Wd -m pytest -v -x src/tests/test_d* 2>&1; done
-- 
2.11.0

From 34cc4667b8e0d5634c0f5f625b57e82456b7205a Mon Sep 17 00:00:00 2001
From: Ghislain Antony Vaillant <ghisv...@gmail.com>
Date: Sat, 10 Jun 2017 12:52:04 +0100
Subject: [PATCH 1/3] Provide the public modules in a separate package

- New binary package: python3-pydocstyle

Gbp-Dch: Full
Thanks: Ghislain Antony Vaillant
Closes: #864545
---
 debian/control | 14 ++++++++++++++
 debian/rules   |  6 ++++++
 2 files changed, 20 insertions(+)

diff --git a/debian/control b/debian/control
index 7724896..c228433 100644
--- a/debian/control
+++ b/debian/control
@@ -21,6 +21,7 @@ Package: pydocstyle
 Architecture: all
 Depends: ${misc:Depends},
          ${python3:Depends},
+         python3-pydocstyle
 Conflicts: pep257
 Replaces: pep257
 Description: Python docstring style checker (PEP-257 conventions)
@@ -30,3 +31,16 @@ Description: Python docstring style checker (PEP-257 conventions)
  these conventions have been complied with, and if docstring are missing.
  .
  This is a successor of the application "pep257".
+
+Package: python3-pydocstyle
+Architecture: all
+Section: python
+Depends: ${misc:Depends},
+         ${python3:Depends}
+Description: public modules for pydocstyle
+ PEP-257 provides conventions for Python docstrings (string literals which
+ occur as first statement in a module, function, class or method definition
+ for documentation purposes). This tool checks Python code whether
+ these conventions have been complied with, and if docstring are missing.
+ .
+ This package provides the modules for Python 3.
diff --git a/debian/rules b/debian/rules
index 7151ddb..cb2ceb8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,7 @@
 #export DH_VERBOSE=1
 #export DEB_BUILD_OPTIONS=nocheck
 export PYBUILD_NAME=pydocstyle
+export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/bin
 
 DEBDATE := $(shell dpkg-parsechangelog -Sdate | date -u +%F -f -)
 
@@ -13,6 +14,11 @@ override_dh_auto_test:
 	# skip test_integration (install_package needs fix, doesn't run with py3, writes into /usr/local etc.)
 	# https://github.com/PyCQA/pydocstyle/issues/177
 
+override_dh_auto_install:
+	dh_auto_install
+	python3 setup.py install_scripts --skip-build \
+		--install-dir=debian/$(PYBUILD_NAME)/usr/bin
+
 override_dh_installchangelogs:
 	dh_installchangelogs docs/release_notes.rst
 
-- 
2.11.0

Reply via email to