]> review.fuel-infra Code Review - packages/trusty/python-pysaml2.git/commitdiff
Added Python3 support.
authorThomas Goirand <zigo@debian.org>
Fri, 24 Apr 2015 07:17:49 +0000 (09:17 +0200)
committerThomas Goirand <zigo@debian.org>
Fri, 24 Apr 2015 07:17:49 +0000 (09:17 +0200)
Rewritten-From: 3309e3a1dfea5433351dde378ed1a12e164f4113

debian/changelog
debian/control
debian/python-pysaml2.postinst [new file with mode: 0644]
debian/python-pysaml2.postrm [new file with mode: 0644]
debian/python-pysaml2.prerm [new file with mode: 0644]
debian/python3-pysaml2.postinst [new file with mode: 0644]
debian/python3-pysaml2.postrm [new file with mode: 0644]
debian/python3-pysaml2.prerm [new file with mode: 0644]
debian/rules

index 25b1649c066171f49db87c0ea3a034d1461b91b9..9ef9bd9d36429c476cf9c41c85b6b43270b6079a 100644 (file)
@@ -1,3 +1,9 @@
+python-pysaml2 (2.0.0-2) experimental; urgency=medium
+
+  * Added Python 3 support.
+
+ -- Thomas Goirand <zigo@debian.org>  Fri, 24 Apr 2015 09:03:41 +0200
+
 python-pysaml2 (2.0.0-1) unstable; urgency=medium
 
   * Initial release. (Closes: #760824)
index 5ba88a9b2d84ac34bb03d7624a5f45e2f7bea253..c9297d7666794bc04e6e1b9330f09c273571546e 100644 (file)
@@ -2,11 +2,14 @@ Source: python-pysaml2
 Section: python
 Priority: optional
 Maintainer: PKG OpenStack <openstack-devel@lists.alioth.debian.org>
-Uploaders: Thomas Goirand <zigo@debian.org>
+Uploaders: Thomas Goirand <zigo@debian.org>,
 Build-Depends: debhelper (>= 9),
+               dh-python,
                python-all (>= 2.6.6-3~),
                python-setuptools,
-               python-sphinx
+               python-sphinx,
+               python3-all (>= 3.4),
+               python3-setuptools,
 Build-Depends-Indep: python-crypto,
                      python-dateutil,
                      python-decorator,
@@ -20,23 +23,33 @@ Build-Depends-Indep: python-crypto,
                      python-requests,
                      python-tz,
                      python-zope.interface,
-                     xmlsec1
-Standards-Version: 3.9.5
-X-Python-Version: >= 2.7
+                     python3-crypto,
+                     python3-dateutil,
+                     python3-decorator,
+                     python3-mako,
+                     python3-memcache,
+                     python3-openssl,
+                     python3-paste,
+                     python3-pyasn1,
+                     python3-pytest,
+                     python3-repoze.who,
+                     python3-requests,
+                     python3-tz,
+                     xmlsec1,
+Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/python-pysaml2.git
 Vcs-Git: git://anonscm.debian.org/openstack/python-pysaml2.git
 Homepage: https://github.com/rohe/pysaml2
 
 Package: python-pysaml2
 Architecture: all
-Pre-Depends: dpkg (>= 1.15.6~)
 Depends: python-mako,
          python-memcache,
          python-pyasn1,
          python-repoze.who,
          xmlsec1,
          ${misc:Depends},
-         ${python:Depends}
+         ${python:Depends},
 Description: SAML Version 2 to be used in a WSGI environment - Python 2.x
  This package provides a Python implementation of SAML Version 2 to be used in
  a WSGI environment.
@@ -53,11 +66,37 @@ Description: SAML Version 2 to be used in a WSGI environment - Python 2.x
  .
  This package contains the Python 2.x module.
 
+Package: python3-pysaml2
+Architecture: all
+Depends: python3-mako,
+         python3-memcache,
+         python3-pyasn1,
+         python3-repoze.who,
+         xmlsec1,
+         ${misc:Depends},
+         ${python3:Depends},
+Description: SAML Version 2 to be used in a WSGI environment - Python 3.x
+ This package provides a Python implementation of SAML Version 2 to be used in
+ a WSGI environment.
+ .
+ From wikipedia: Security Assertion Markup Language 2.0 (SAML 2.0) is a version
+ of the SAML standard for exchanging authentication and authorization data
+ between security domains. SAML 2.0 is an XML-based protocol that uses security
+ tokens containing assertions to pass information about a principal (usually an
+ end user) between a SAML authority, that is, an identity provider, and a SAML
+ consumer, that is, a service provider. SAML 2.0 enables web-based
+ authentication and authorization scenarios including cross-domain single
+ sign-on (SSO), which helps reduce the administrative overhead of distributing
+ multiple authentication tokens to the user.
+ .
+ This package contains the Python 3.x module.
+
 Package: python-pysaml2-doc
 Section: doc
 Architecture: all
-Pre-Depends: dpkg (>= 1.15.6~)
-Depends: ${misc:Depends}, ${sphinxdoc:Depends}
+Pre-Depends: dpkg (>= 1.15.6~),
+Depends: ${misc:Depends},
+         ${sphinxdoc:Depends},
 Description: SAML Version 2 to be used in a WSGI environment - doc
  This package provides a Python implementation of SAML Version 2 to be used in
  a WSGI environment.
diff --git a/debian/python-pysaml2.postinst b/debian/python-pysaml2.postinst
new file mode 100644 (file)
index 0000000..639876d
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] ; then
+       update-alternatives --install /usr/bin/pysaml2-make-metadata    pysaml2-make-metadata   /usr/bin/python2-pysaml2-make-metadata 300
+       update-alternatives --install /usr/bin/pysaml2-mdexport         pysaml2-mdexport        /usr/bin/python2-pysaml2-mdexport 300
+       update-alternatives --install /usr/bin/pysaml2-parse-xsd2       pysaml2-parse-xsd2      /usr/bin/python2-pysaml2-parse-xsd2 300
+fi
+
+#DEBHELPER#
+
+exit 0
+
diff --git a/debian/python-pysaml2.postrm b/debian/python-pysaml2.postrm
new file mode 100644 (file)
index 0000000..79f7a1b
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then
+       update-alternatives --remove pysaml2-make-metadata      /usr/bin/python2-pysaml2-make-metadata
+       update-alternatives --remove pysaml2-mdexport           /usr/bin/python2-pysaml2-mdexport
+       update-alternatives --remove pysaml2-parse-xsd2         /usr/bin/python2-pysaml2-parse-xsd2
+fi
+
+#DEBHELPER#
+
+exit 0
+
diff --git a/debian/python-pysaml2.prerm b/debian/python-pysaml2.prerm
new file mode 100644 (file)
index 0000000..26fca4d
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] ; then
+       update-alternatives --remove pysaml2-make-metadata /usr/bin/python2-pysaml2-make-metadata
+       update-alternatives --remove pysaml2-mdexport /usr/bin/python2-pysaml2-mdexport
+       update-alternatives --remove pysaml2-parse-xsd2 /usr/bin/python2-pysaml2-parse-xsd2
+fi
+
+#DEBHELPER#
+
+exit 0
+
diff --git a/debian/python3-pysaml2.postinst b/debian/python3-pysaml2.postinst
new file mode 100644 (file)
index 0000000..fbd89ab
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] ; then
+       update-alternatives --install /usr/bin/pysaml2-make-metadata    pysaml2-make-metadata   /usr/bin/python3-pysaml2-make-metadata 200
+       update-alternatives --install /usr/bin/pysaml2-mdexport         pysaml2-mdexport        /usr/bin/python3-pysaml2-mdexport 200
+       update-alternatives --install /usr/bin/pysaml2-parse-xsd2       pysaml2-parse-xsd2      /usr/bin/python3-pysaml2-parse-xsd2 200
+fi
+
+#DEBHELPER#
+
+exit 0
+
diff --git a/debian/python3-pysaml2.postrm b/debian/python3-pysaml2.postrm
new file mode 100644 (file)
index 0000000..228c70c
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] || [ "$1" = "disappear" ]; then
+       update-alternatives --remove pysaml2-make-metadata      /usr/bin/python3-pysaml2-make-metadata
+       update-alternatives --remove pysaml2-mdexport           /usr/bin/python3-pysaml2-mdexport
+       update-alternatives --remove pysaml2-parse-xsd2         /usr/bin/python3-pysaml2-parse-xsd2
+fi
+
+#DEBHELPER#
+
+exit 0
+
diff --git a/debian/python3-pysaml2.prerm b/debian/python3-pysaml2.prerm
new file mode 100644 (file)
index 0000000..9e1676f
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] ; then
+       update-alternatives --remove pysaml2-make-metadata      /usr/bin/python3-pysaml2-make-metadata
+       update-alternatives --remove pysaml2-mdexport           /usr/bin/python3-pysaml2-mdexport
+       update-alternatives --remove pysaml2-parse-xsd2         /usr/bin/python3-pysaml2-parse-xsd2
+fi
+
+#DEBHELPER#
+
+exit 0
+
index 0f61cff77df8ca38e108e47b893930ed80942ee1..fc08a5c8b740274a420b966dcf180581bf2e2910 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 PYTHONS:=$(shell pyversions -vr)
-#PYTHON3S:=$(shell py3versions -vr)
+PYTHON3S:=$(shell py3versions -vr)
 
 UPSTREAM_GIT = git://github.com/rohe/pysaml2.git
 -include /usr/share/openstack-pkg-tools/pkgos.make
@@ -15,21 +15,28 @@ override_dh_install:
                        --root $(CURDIR)/debian/python-pysaml2; \
        done
        mv $(CURDIR)/debian/python-pysaml2/usr/bin/make_metadata.py \
-               $(CURDIR)/debian/python-pysaml2/usr/bin/pysaml2-make-metadata
+               $(CURDIR)/debian/python-pysaml2/usr/bin/python2-pysaml2-make-metadata
        mv $(CURDIR)/debian/python-pysaml2/usr/bin/mdexport.py \
-               $(CURDIR)/debian/python-pysaml2/usr/bin/pysaml2-mdexport
+               $(CURDIR)/debian/python-pysaml2/usr/bin/python2-pysaml2-mdexport
        mv $(CURDIR)/debian/python-pysaml2/usr/bin/parse_xsd2.py \
-               $(CURDIR)/debian/python-pysaml2/usr/bin/pysaml2-parse-xsd2
-# Python3 is not yet supported upstream
-#      set -e && for pyvers in $(PYTHON3S); do \
-#              python$$pyvers setup.py install --install-layout=deb \
-#                      --root $(CURDIR)/debian/python3-pysaml2; \
-#      done
+               $(CURDIR)/debian/python-pysaml2/usr/bin/python2-pysaml2-parse-xsd2
+
+       set -e && for pyvers in $(PYTHON3S); do \
+               python$$pyvers setup.py install --install-layout=deb \
+                       --root $(CURDIR)/debian/python3-pysaml2; \
+       done
+       mv $(CURDIR)/debian/python3-pysaml2/usr/bin/make_metadata.py \
+               $(CURDIR)/debian/python3-pysaml2/usr/bin/python3-pysaml2-make-metadata
+       mv $(CURDIR)/debian/python3-pysaml2/usr/bin/mdexport.py \
+               $(CURDIR)/debian/python3-pysaml2/usr/bin/python3-pysaml2-mdexport
+       mv $(CURDIR)/debian/python3-pysaml2/usr/bin/parse_xsd2.py \
+               $(CURDIR)/debian/python3-pysaml2/usr/bin/python3-pysaml2-parse-xsd2
+
        rm -rf $(CURDIR)/debian/python*-pysaml2/usr/lib/python*/dist-packages/*.pth
 
 override_dh_auto_test:
 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
-       set -e && for pyvers in 2.7; do \
+       set -e && for pyvers in 2.7 $(PYTHON3S) ; do \
                PYTHONPATH=$(CURDIR)/src:. py.test-$$pyvers || true ; \
        done
 endif