Bug#845495: src:python-tz: Non-maintainer upload of python-tz/2016.7-0.1 to DELAYED/5

Arnaud Fontaine arnau at debian.org
Thu Nov 24 07:17:44 UTC 2016


Hello,

Thanks for taking care of this.

> diff --git a/debian/python-tz.install b/debian/python-tz.install
> new file mode 100644
> index 0000000..dbdb301
> --- /dev/null
> +++ b/debian/python-tz.install
> @@ -0,0 +1 @@
> +/usr/lib/python2*
> diff --git a/debian/python3-tz.install b/debian/python3-tz.install
> new file mode 100644
> index 0000000..fef6392
> --- /dev/null
> +++ b/debian/python3-tz.install
> @@ -0,0 +1 @@
> +/usr/lib/python3*
> diff --git a/debian/rules b/debian/rules
> index 399f7d5..f1d5e38 100755
> --- a/debian/rules
> +++ b/debian/rules
>  override_dh_install:
> -	dh_install
> +	dh_install --fail-missing

Files  will  be automatically  copied  by  pybuild  if you  add  'export
PYBUILD_NAME=tz' to debian/rules, so  you don't need the dh_auto_install
override, nor the *.install files. See the following link:
  https://wiki.debian.org/Python/LibraryStyleGuide#debian.2Frules

> --- a/debian/rules
> +++ b/debian/rules
> [...]
> -override_dh_auto_test:
> -	python -m unittest discover -v pytz/tests
> -	for python in $(PY3VERS); do \
> -	    $$python -m unittest discover -v pytz/tests; \
> -	done
> -

I tested this and it seems that no tests are being ran:

     dh_auto_test -O--buildsystem=pybuild -O--test-pytest
  I: pybuild base:184: cd /tmp/pytz-2016.7/.pybuild/pythonX.Y_2.7/build; python2.7 -m unittest discover -v 
  
  ----------------------------------------------------------------------
  Ran 0 tests in 0.000s
  
  OK
  I: pybuild base:184: cd /tmp/pytz-2016.7/.pybuild/pythonX.Y_3.5/build; python3.5 -m unittest discover -v 
  
  ----------------------------------------------------------------------
  Ran 0 tests in 0.000s
  
  OK

Here are  the 2  ways I  know to run  Unit Tests  at build  time (source
package of 2015.7 uses debian/test-pytz):

  * Use python-pytest:
    + Add to debian/rules:
      export PYBUILD_TEST_PYTEST=1
      export PYBUILD_TEST_ARGS=--doctest-modules
    + Add Build-Depends against python-pytest and python3-pytest.
    + Remove override_dh_auto_install and debian/test-pytz as they are
      not needed anymore.

  * Or, copy debian/test-pytz before running tests (PYBUILD_BEFORE_TEST)
    and  override  dh_auto_test. Not  sure  if  there  is a  better  way
    though...
    
Cheers,
-- 
Arnaud Fontaine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-zope-developers/attachments/20161124/65d3a366/attachment.sig>


More information about the pkg-zope-developers mailing list