From a0efb901d4cb39c6f13dffd1b3404405f0c0639a2f88aa3f2141103e87a86009 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 30 Jun 2017 11:03:36 +0000 Subject: [PATCH] Accepting request 504766 from home:okurz:matrix-synapse Convert to singlespec OBS-URL: https://build.opensuse.org/request/show/504766 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysaml2?expand=0&rev=13 --- python-pysaml2.changes | 5 +++ python-pysaml2.spec | 72 +++++++++++++++++++++++------------------- 2 files changed, 44 insertions(+), 33 deletions(-) diff --git a/python-pysaml2.changes b/python-pysaml2.changes index 0dc6847..7397a01 100644 --- a/python-pysaml2.changes +++ b/python-pysaml2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 19 08:57:42 UTC 2017 - okurz@suse.com + +- Convert to singlespec + ------------------------------------------------------------------- Tue Nov 22 15:18:26 UTC 2016 - dmueller@suse.com diff --git a/python-pysaml2.spec b/python-pysaml2.spec index 093c096..dd7e15d 100644 --- a/python-pysaml2.spec +++ b/python-pysaml2.spec @@ -1,7 +1,7 @@ # # spec file for package python-pysaml2 # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,35 +16,40 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} + # Test reqs are heavy, thus only have it on demand: %bcond_with tests Name: python-pysaml2 +%global modname pysaml2 Version: 4.4.0 Release: 0 Summary: Python implementation of SAML Version 2 to be used in a WSGI environment License: Apache-2.0 Group: Development/Languages/Python -Url: https://github.com/rohe/pysaml2 -Source: https://pypi.python.org/packages/source/p/pysaml2/pysaml2-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +Url: https://github.com/rohe/%{modname} +Source: https://pypi.io/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros # Test requirements: %if %{with tests} -BuildRequires: python-decorator -BuildRequires: python-future -BuildRequires: python-mako -BuildRequires: python-mongodict -BuildRequires: python-pyOpenSSL -BuildRequires: python-pyasn1 -BuildRequires: python-pycryptodomex -BuildRequires: python-pymongo -BuildRequires: python-pytest -BuildRequires: python-python-dateutil -BuildRequires: python-python-memcached -BuildRequires: python-pytz -BuildRequires: python-repoze.who -BuildRequires: python-requests >= 1.0.0 +BuildRequires: %{python_module decorator} +BuildRequires: %{python_module future} +BuildRequires: %{python_module mako} +BuildRequires: %{python_module mongodict} +BuildRequires: %{python_module pyOpenSSL} +BuildRequires: %{python_module pyasn1} +BuildRequires: %{python_module pycryptodomex} +BuildRequires: %{python_module pymongo} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module python-dateutil} +BuildRequires: %{python_module python-memcached} +BuildRequires: %{python_module pytz} +BuildRequires: %{python_module repoze.who} +BuildRequires: %{python_module requests >= 1.0.0} %endif %if 0%{?suse_release} # NOTE(saschpe): xmlsec has a lot of deps and some issues, thus not require it: @@ -68,37 +73,38 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %endif +%python_subpackages + %description PySAML2 is a pure python implementation of SAML2. It contains all necessary pieces for building a SAML2 service provider or an identity provider. %prep -%setup -q -n pysaml2-%{version} +%setup -q -n %{modname}-%{version} sed -i "s/python-memcached == 1.51/python-memcached/" setup.py +# delete shebang of files not in executable path +find src/ -name '*.py' -print0 | xargs -0 sed -i '1s/#!.*$//' %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%fdupes %{buildroot}%{_prefix} %if %{with tests} %check -python setup.py test +%python_exec setup.py test %endif -%files +%files %{python_files} %defattr(-,root,root,-) %doc README.rst LICENSE.txt -%{_bindir}/make_metadata.py -%{_bindir}/parse_xsd2.py -%{_bindir}/mdexport.py -%{_bindir}/merge_metadata.py -%{python_sitelib}/pysaml2-%{version}-py%{py_ver}.egg-info -#%{python_sitelib}/s2repoze -%{python_sitelib}/saml2 -#%{python_sitelib}/xmldsig -#%{python_sitelib}/xmlenc +%python3_only %{_bindir}/make_metadata.py +%python3_only %{_bindir}/parse_xsd2.py +%python3_only %{_bindir}/mdexport.py +%python3_only %{_bindir}/merge_metadata.py +%{python_sitelib}/* %changelog