Added Python3 support.

This commit is contained in:
Thomas Goirand
2015-04-24 09:17:49 +02:00
parent 8662ccc27c
commit 3309e3a1df
9 changed files with 155 additions and 19 deletions

6
debian/changelog vendored
View 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)

57
debian/control vendored
View 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.

14
debian/python-pysaml2.postinst vendored Normal file
View File

@@ -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

14
debian/python-pysaml2.postrm vendored Normal file
View File

@@ -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

14
debian/python-pysaml2.prerm vendored Normal file
View File

@@ -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

14
debian/python3-pysaml2.postinst vendored Normal file
View File

@@ -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

14
debian/python3-pysaml2.postrm vendored Normal file
View File

@@ -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

14
debian/python3-pysaml2.prerm vendored Normal file
View File

@@ -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

27
debian/rules vendored
View File

@@ -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