[Reproducible-builds] [dh-python] 82/183: pybuild: prefer --test-nose/--test-pytest over test_suite
Jérémy Bobbio
lunar at moszumanska.debian.org
Fri Sep 19 15:30:23 UTC 2014
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository dh-python.
commit efb88882dd89de87ad2af214324fe3db6cbb7162
Author: Piotr Ożarowski <piotr at debian.org>
Date: Fri Aug 16 00:20:27 2013 +0200
pybuild: prefer --test-nose/--test-pytest over test_suite
if maintainer enabled these options, s(he) clearly didn't want to use
setup.py's test_suite (i.e. `python setup.py test`)
---
debian/changelog | 2 ++
dhpython/build/plugin_distutils.py | 11 ++++++-----
pybuild | 6 ++++++
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index b861e33..dc6d337 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ dh-python (1.20130809-1) UNRELEASED; urgency=low
dh doesn't pass DESTDIR in other steps and hence files for single binary
packages ended in debian/tmp by default (closes: 719434)
* Fix typo in plugin_cmake.py (thanks to D. Barbier, closes: #719528)
+ * pybuild: --test-nose/--test-pytest have higher priority than setup.py's
+ test_suite now
-- Piotr Ożarowski <piotr at debian.org> Fri, 09 Aug 2013 15:55:11 +0200
diff --git a/dhpython/build/plugin_distutils.py b/dhpython/build/plugin_distutils.py
index 6d79ca5..c1f081d 100644
--- a/dhpython/build/plugin_distutils.py
+++ b/dhpython/build/plugin_distutils.py
@@ -101,9 +101,10 @@ class BuildSystem(Base):
@shell_command
@create_pydistutils_cfg
def test(self, context, args):
- fpath = join(args['dir'], args['setup_py'])
- with open(fpath) as fp:
- if fp.read().find('test_suite') > 0:
- # TODO: is that enough to detect if test target is available?
- return '{interpreter} {setup_py} test {args}'
+ if not self.cfg.custom_tests:
+ fpath = join(args['dir'], args['setup_py'])
+ with open(fpath) as fp:
+ if fp.read().find('test_suite') > 0:
+ # TODO: is that enough to detect if test target is available?
+ return '{interpreter} {setup_py} test {args}'
return super(BuildSystem, self).test(context, args)
diff --git a/pybuild b/pybuild
index 27738d9..e9c2d24 100755
--- a/pybuild
+++ b/pybuild
@@ -405,6 +405,12 @@ def parse_args(argv):
for version in args.versions:
versions.extend(version.split())
args.versions = versions
+
+ if args.test_nose or args.test_pytest or args.system == 'custom':
+ args.custom_tests = True
+ else:
+ args.custom_tests = False
+
return args
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dh-python.git
More information about the Reproducible-builds
mailing list