Package: python-jsonschema
Version: 1.1.0-1
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dear Maintainer,
Please build a python3 package.
I'm attaching a patch with one way to achieve this.

Regards,

Dmitrijs.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJRrHivAAoJEIh7YGGLPBauJdAQAJNdQ+GGjwGWi62+lo8/vIJg
LEB/pTwHSXGg7Jc6Lzgcnp+6V7wFd7ZmWeDfdZO9oipR3C7Jz02Afong0kSb5Pt+
sbgH9LVV1QRz2ieZRmLHaWMxgGqMmCjs3euAYYAD9CElJUFjuXKIMMtTv49D2BFd
fT/BjjTotf3B3deiCYI5Ye4IWYc1aiXJELcx8Eau9vHYmobrrYx7hiiU7xzDho96
+tq0A/qYOcM4m6f7OgVZhNUCDtqgqDtZ9CSIaKw7mE2zwJRTKsswBOxWiVFVvRPp
D0TrceYjJuaJ1IyNRA2pqrY+5zM2erirzzz+a1Xn5D0pSLj3zIPRmrIxuj8v2nkJ
L5KeTr6OtHdHeN9MS6rFpzi6pHU1ba1sdktIQwxuhOpFmNiEEyRybm6NPLNOzEcT
1FTPa4O5eWWp8Jnwb6TfskWVSN9qeiMVzk0lozpDVQ1LVzk3fWzk2gm90by/S+Xu
PDpDtQecqQ7PYvs7I/XsBjeCryvXXlRccUtgU1eubgY44xcak5xP1z97DjBDFtKM
DXbSR4GIi4IXM3CzmChlyBf/bJBsvKNESaO7wBOXYLhmjuNNulUAXMUkJKnW73Rv
dAsUBO8z27wVDE8lC/v0n7GwrQsLssBQ6DkZ7yQup+XoD4NvSqDM/VhR8w9iKam5
wWyQ575mYObwtquihwtt
=Ufkk
-----END PGP SIGNATURE-----
diff -Nru python-jsonschema-1.1.0/debian/changelog python-jsonschema-1.1.0/debian/changelog
--- python-jsonschema-1.1.0/debian/changelog	2013-05-11 08:31:22.000000000 +0100
+++ python-jsonschema-1.1.0/debian/changelog	2013-06-03 11:36:22.000000000 +0100
@@ -1,3 +1,10 @@
+python-jsonschema (1.1.0-1ubuntu1) saucy; urgency=low
+
+  * Merge from Debian, remaining changes:
+    - Build python3 package.
+
+ -- Dmitrijs Ledkovs <dmitrij.led...@ubuntu.com>  Mon, 03 Jun 2013 11:36:05 +0100
+
 python-jsonschema (1.1.0-1) unstable; urgency=low
 
   * Uploading to unstable.
@@ -26,6 +33,15 @@
 
  -- Thomas Goirand <z...@debian.org>  Thu, 31 Jan 2013 23:12:17 +0800
 
+python-jsonschema (0.7-0ubuntu1) raring; urgency=low
+
+  * New upstream release.
+  * Add debian/watch file.
+  * Add python3 package.
+  * Path python3 package to work with hash randomisation.
+
+ -- Dmitrijs Ledkovs <dmitrij.led...@ubuntu.com>  Thu, 06 Dec 2012 16:02:50 +0000
+
 python-jsonschema (0.2-1) unstable; urgency=low
 
   * First Debian Packaging
diff -Nru python-jsonschema-1.1.0/debian/control python-jsonschema-1.1.0/debian/control
--- python-jsonschema-1.1.0/debian/control	2013-05-11 08:31:22.000000000 +0100
+++ python-jsonschema-1.1.0/debian/control	2013-06-03 11:43:30.000000000 +0100
@@ -1,14 +1,16 @@
 Source: python-jsonschema
 Section: python
 Priority: optional
-Maintainer: PKG OpenStack <openstack-de...@lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
+XSBC-Original-Maintainer: PKG OpenStack <openstack-de...@lists.alioth.debian.org>
 Uploaders: Loic Dachary (OuoU) <l...@debian.org>,
            Julien Danjou <a...@debian.org>,
            Thomas Goirand <z...@debian.org>,
            Ghe Rivero <ghe.riv...@stackops.com>,
            Mehdi Abaakouk <sil...@sileht.net>
-Build-Depends: debhelper (>= 9),  python-setuptools (>= 0.6b3),
- python-all (>= 2.6.6-3~), python-nose, python-mock, openstack-pkg-tools
+Build-Depends: debhelper (>= 9),  python-setuptools (>= 0.6b3), python3-setuptools,
+ python-all (>= 2.6.6-3~), python3-all, python-nose, python3-nose, python-mock, python3-mock, openstack-pkg-tools
+X-Python3-Version: >= 3.2
 Standards-Version: 3.9.4
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/python-jsonschema.git
 Vcs-Git: git://anonscm.debian.org/openstack/python-jsonschema.git
@@ -22,6 +24,17 @@
  JSON Schema is a specification for a JSON-based format for defining
  the structure of JSON data. JSON Schema provides a contract for what
  JSON data is required for a given application and how it can be
+ modified, much like what XML Schema provides for XML. JSON Schema is
+ intended to provide validation, documentation, and interaction control
+ of JSON data
+
+Package: python3-jsonschema
+Architecture: all
+Depends: ${python3:Depends}, ${misc:Depends}
+Description: An(other) implementation of JSON Schema (Draft 3) for Python 3
+ JSON Schema is a specification for a JSON-based format for defining
+ the structure of JSON data. JSON Schema provides a contract for what
+ JSON data is required for a given application and how it can be
  modified, much like what XML Schema provides for XML. JSON Schema is
  intended to provide validation, documentation, and interaction control
  of JSON data
diff -Nru python-jsonschema-1.1.0/debian/patches/fix-pyhashrandom.patch python-jsonschema-1.1.0/debian/patches/fix-pyhashrandom.patch
--- python-jsonschema-1.1.0/debian/patches/fix-pyhashrandom.patch	1970-01-01 01:00:00.000000000 +0100
+++ python-jsonschema-1.1.0/debian/patches/fix-pyhashrandom.patch	2013-06-03 11:46:48.000000000 +0100
@@ -0,0 +1,23 @@
+Description: resolve pyhashrandom test suite failure.
+Author: Dmitrijs Ledkovs <dmitrijs.ledk...@canonical.com>
+Forwarded: no
+Last-Update: 20120-12-06
+
+--- a/tests.py
++++ b/tests.py
+@@ -370,6 +370,15 @@
+         }
+ 
+         errors = self.validator.iter_errors(instance, schema)
++        if sys.version_info > (3, 2):
++            all_errors = [(list(e.path), e.validator) for e in errors]
++            self.assertCountEqual(all_errors,
++                                  [(['baz'], 'enum'),
++                                   (['baz'], 'maximum'),
++                                   (['foo'], 'type'),
++                                   (['bar'], 'minItems')])
++            return
++
+         e1, e2, e3, e4 = sorted_errors(errors)
+ 
+         self.assertEqual(list(e1.path), ["bar"])
diff -Nru python-jsonschema-1.1.0/debian/patches/series python-jsonschema-1.1.0/debian/patches/series
--- python-jsonschema-1.1.0/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ python-jsonschema-1.1.0/debian/patches/series	2013-06-03 11:32:48.000000000 +0100
@@ -0,0 +1 @@
+fix-pyhashrandom.patch
diff -Nru python-jsonschema-1.1.0/debian/python3-jsonschema.install python-jsonschema-1.1.0/debian/python3-jsonschema.install
--- python-jsonschema-1.1.0/debian/python3-jsonschema.install	1970-01-01 01:00:00.000000000 +0100
+++ python-jsonschema-1.1.0/debian/python3-jsonschema.install	2013-06-03 11:32:48.000000000 +0100
@@ -0,0 +1 @@
+usr/lib/python3/
diff -Nru python-jsonschema-1.1.0/debian/python-jsonschema.install python-jsonschema-1.1.0/debian/python-jsonschema.install
--- python-jsonschema-1.1.0/debian/python-jsonschema.install	1970-01-01 01:00:00.000000000 +0100
+++ python-jsonschema-1.1.0/debian/python-jsonschema.install	2013-06-03 11:32:48.000000000 +0100
@@ -0,0 +1,2 @@
+usr/lib/python2*/
+
diff -Nru python-jsonschema-1.1.0/debian/rules python-jsonschema-1.1.0/debian/rules
--- python-jsonschema-1.1.0/debian/rules	2013-05-11 08:31:22.000000000 +0100
+++ python-jsonschema-1.1.0/debian/rules	2013-06-03 11:35:34.000000000 +0100
@@ -2,14 +2,31 @@
 
 #export DH_VERBOSE=1
 
+PYTHON3:=$(shell py3versions -r)
+py3sdo=set -ex; $(foreach py, $(PYTHON3), $(py) $(1);)
+
 UPSTREAM_GIT = git://github.com/Julian/jsonschema.git
 
 include /usr/share/openstack-pkg-tools/pkgos.make
 
 %:
-	dh $@ --with python2
+	dh $@ --with python2,python3
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	nosetests tests.py
+	nosetests3 tests.py
 endif
+
+override_dh_auto_build:
+	dh_auto_build
+	$(call py3sdo, setup.py build)
+
+override_dh_auto_install:
+	dh_auto_install
+	$(call py3sdo, setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb)
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -rf build
+	rm -rf *.egg-info __pycache__

Reply via email to