Package: python-rjsmin
Version: 1.0.12+dfsg1-4
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu disco ubuntu-patch
Dear maintainers,
The python-rjsmin package currently has a commented-out override of
dh_auto_test in debian/rules; without any override, the dh_auto_test target
is currently a no-op:
dh_auto_test -a -O--buildsystem=python_distutils
dh_auto_test: Please use the third-party "pybuild" build system instead of
python-distutils
dh_auto_test: This feature will be removed in compat 12.
(https://buildd.debian.org/status/fetch.php?pkg=python-rjsmin&arch=amd64&ver=1.0.12%2Bdfsg1-4%2Bb2&stamp=1530277908&raw=0)
In Ubuntu, we have added the attached patch, to manually trigger tests at
build time. Do you think this would be appropriate to include in Debian as
well?
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
[email protected] [email protected]
diff -Nru python-rjsmin-1.0.12+dfsg1/debian/control
python-rjsmin-1.0.12+dfsg1/debian/control
--- python-rjsmin-1.0.12+dfsg1/debian/control 2016-03-10 01:43:35.000000000
-0800
+++ python-rjsmin-1.0.12+dfsg1/debian/control 2019-02-11 11:51:51.000000000
-0800
@@ -10,6 +10,7 @@
python-setuptools,
python3-all-dev,
python3-setuptools,
+ python3-chardet,
Standards-Version: 3.9.6
Vcs-Browser:
https://git.openstack.org/cgit/openstack/deb-python-rjsmin?h=debian%2Fnewton
Vcs-Git: https://git.openstack.org/openstack/deb-python-rjsmin -b debian/newton
diff -Nru python-rjsmin-1.0.12+dfsg1/debian/patches/series
python-rjsmin-1.0.12+dfsg1/debian/patches/series
--- python-rjsmin-1.0.12+dfsg1/debian/patches/series 1969-12-31
16:00:00.000000000 -0800
+++ python-rjsmin-1.0.12+dfsg1/debian/patches/series 2016-03-09
03:27:49.000000000 -0800
@@ -0,0 +1 @@
+skip-jsmin-bench.patch
diff -Nru python-rjsmin-1.0.12+dfsg1/debian/patches/skip-jsmin-bench.patch
python-rjsmin-1.0.12+dfsg1/debian/patches/skip-jsmin-bench.patch
--- python-rjsmin-1.0.12+dfsg1/debian/patches/skip-jsmin-bench.patch
1969-12-31 16:00:00.000000000 -0800
+++ python-rjsmin-1.0.12+dfsg1/debian/patches/skip-jsmin-bench.patch
2016-03-09 07:54:25.000000000 -0800
@@ -0,0 +1,14 @@
+Description: Skip jsmin tests as dropped from source
+Author: James Page <[email protected]>
+Forwared: not-needed
+
+--- a/bench/main.py
++++ b/bench/main.py
+@@ -46,7 +46,6 @@ import time as _time
+
+ import_notes = []
+ class jsmins(object):
+- from bench import jsmin as p_01_simple_port
+ if _sys.version_info >= (2, 4):
+ from bench import jsmin_2_0_9 as p_02_jsmin_2_0_9
+ else:
diff -Nru python-rjsmin-1.0.12+dfsg1/debian/rules
python-rjsmin-1.0.12+dfsg1/debian/rules
--- python-rjsmin-1.0.12+dfsg1/debian/rules 2016-03-10 01:43:35.000000000
-0800
+++ python-rjsmin-1.0.12+dfsg1/debian/rules 2018-11-03 08:46:15.000000000
-0700
@@ -2,6 +2,8 @@
PYTHONS:=$(shell pyversions -vr)
PYTHON3S:=$(shell py3versions -vr)
+ARCH:=$(shell dpkg-architecture -qDEB_TARGET_GNU_CPU)
+OS:=$(shell dpkg-architecture -qDEB_TARGET_ARCH_OS)
UPSTREAM_GIT := https://github.com/ndparker/rjsmin.git
include /usr/share/openstack-pkg-tools/pkgos.make
@@ -21,12 +23,15 @@
rm -rf $(CURDIR)/debian/python*/usr/lib/python*/dist-packages/*.pth
rm -rf $(CURDIR)/debian/python*/usr/share/doc/rjsmin*
-#override_dh_auto_test:
-#ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
-# set -e ; for pyvers in $(PYTHONS) $(PYTHON3S); do \
-# python$$pyvers setup.py test ; \
-# done
-#endif
+override_dh_auto_test:
+ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
+ env
+ set -e ; for pyvers in $(PYTHONS) $(PYTHON3S); do \
+ PYTHONPATH=$(CURDIR):$(CURDIR)/build/lib.$(OS)-$(ARCH)-$$pyvers
python$$pyvers \
+ bench/main.py bench/bootstrap.js
bench/DateTimeShortcuts.js bench/jquery-1.7.1.js \
+ bench/knockout-2.0.0.js
bench/markermanager.js; \
+ done
+endif
override_dh_clean:
dh_clean -O--buildsystem=python_distutils