2013-10-16 09:09:56 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pysaml2
|
|
|
|
#
|
2022-04-07 14:47:20 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2013-10-16 09:09:56 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-10-10 06:09:04 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-06-12 08:48:53 +00:00
|
|
|
#
|
|
|
|
|
2013-10-16 09:09:56 +00:00
|
|
|
|
2017-06-30 11:03:36 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
%global modname pysaml2
|
2020-03-14 16:01:08 +00:00
|
|
|
%global skip_python2 1
|
2018-12-07 11:16:24 +00:00
|
|
|
Name: python-pysaml2
|
2022-10-07 07:51:47 +00:00
|
|
|
Version: 7.2.1
|
2013-10-16 09:09:56 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Python implementation of SAML Version 2 to be used in a WSGI environment
|
2015-06-12 08:48:53 +00:00
|
|
|
License: Apache-2.0
|
2018-12-07 11:16:24 +00:00
|
|
|
URL: https://github.com/IdentityPython/pysaml2
|
|
|
|
Source: https://github.com/IdentityPython/pysaml2/archive/v%{version}.tar.gz
|
2022-07-28 06:05:00 +00:00
|
|
|
# PATCH-FIX-UPSTREAM closed PR, but provides context:
|
|
|
|
# gh#IdentityPython/pysaml2#843
|
|
|
|
Patch0: pymongo-4-support.patch
|
2018-12-07 11:16:24 +00:00
|
|
|
BuildRequires: %{python_module Paste}
|
2022-11-15 16:16:45 +00:00
|
|
|
BuildRequires: %{python_module cryptography >= 3.1}
|
2020-01-07 11:52:07 +00:00
|
|
|
BuildRequires: %{python_module dbm}
|
2018-12-07 11:16:24 +00:00
|
|
|
BuildRequires: %{python_module defusedxml}
|
2021-01-20 21:32:16 +00:00
|
|
|
BuildRequires: %{python_module importlib-resources}
|
2018-12-07 11:16:24 +00:00
|
|
|
BuildRequires: %{python_module pyOpenSSL}
|
|
|
|
BuildRequires: %{python_module pymongo}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module python-dateutil}
|
|
|
|
BuildRequires: %{python_module pytz}
|
|
|
|
BuildRequires: %{python_module repoze.who}
|
|
|
|
BuildRequires: %{python_module requests >= 1.0.0}
|
|
|
|
BuildRequires: %{python_module responses}
|
2020-01-07 11:52:07 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-12-07 11:16:24 +00:00
|
|
|
BuildRequires: %{python_module six}
|
2022-11-15 16:16:45 +00:00
|
|
|
BuildRequires: %{python_module xmlschema >= 1.2.1}
|
2018-12-07 11:16:24 +00:00
|
|
|
BuildRequires: %{python_module zope.interface}
|
2020-01-07 11:52:07 +00:00
|
|
|
BuildRequires: fdupes
|
2018-12-07 11:16:24 +00:00
|
|
|
# This is needed as xmlsec itself does not pull any backend by default
|
|
|
|
# Will be fixed in future xmlsec releases
|
|
|
|
BuildRequires: libxmlsec1-openssl1
|
2020-01-07 11:52:07 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2021-01-25 15:08:10 +00:00
|
|
|
BuildRequires: update-alternatives
|
2018-12-07 11:16:24 +00:00
|
|
|
BuildRequires: xmlsec1
|
2020-01-07 11:52:07 +00:00
|
|
|
Requires: python-Paste
|
2022-11-15 16:16:45 +00:00
|
|
|
Requires: python-cryptography >= 3.1
|
2020-01-07 11:52:07 +00:00
|
|
|
Requires: python-defusedxml
|
2021-01-25 15:08:10 +00:00
|
|
|
Requires: python-importlib-resources
|
2020-01-07 11:52:07 +00:00
|
|
|
Requires: python-pyOpenSSL
|
|
|
|
Requires: python-python-dateutil
|
|
|
|
Requires: python-pytz
|
|
|
|
Requires: python-repoze.who
|
|
|
|
Requires: python-requests >= 1.0.0
|
|
|
|
Requires: python-six
|
2022-11-15 16:16:45 +00:00
|
|
|
Requires: python-xmlschema >= 1.2.1
|
2020-01-07 11:52:07 +00:00
|
|
|
Requires: python-zope.interface
|
2021-01-25 15:08:10 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-04-26 12:55:15 +00:00
|
|
|
Requires(postun):update-alternatives
|
2020-05-05 18:22:07 +00:00
|
|
|
# We need to have arch build to make ifarch condition below working
|
|
|
|
# BuildArch: noarch
|
2017-06-30 11:03:36 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
2013-10-16 09:09:56 +00:00
|
|
|
%description
|
2016-11-18 10:32:48 +00:00
|
|
|
PySAML2 is a pure python implementation of SAML2.
|
|
|
|
It contains all necessary pieces for building a
|
|
|
|
SAML2 service provider or an identity provider.
|
2013-10-16 09:09:56 +00:00
|
|
|
|
|
|
|
%prep
|
2022-07-28 06:05:00 +00:00
|
|
|
%autosetup -p1 -n %{modname}-%{version}
|
2021-01-06 10:50:59 +00:00
|
|
|
|
2017-06-30 11:03:36 +00:00
|
|
|
# delete shebang of files not in executable path
|
|
|
|
find src/ -name '*.py' -print0 | xargs -0 sed -i '1s/#!.*$//'
|
2018-12-07 11:16:24 +00:00
|
|
|
# remove tests that poll internet
|
|
|
|
rm -f tests/test_30_mdstore*.py
|
2013-10-16 09:09:56 +00:00
|
|
|
|
|
|
|
%build
|
2017-06-30 11:03:36 +00:00
|
|
|
%python_build
|
2013-10-16 09:09:56 +00:00
|
|
|
|
|
|
|
%install
|
2017-06-30 11:03:36 +00:00
|
|
|
%python_install
|
2020-05-05 12:54:25 +00:00
|
|
|
for exec in make_metadata.py parse_xsd2.py mdexport.py merge_metadata.py ; do
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/$exec
|
|
|
|
done
|
2018-12-07 11:16:24 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2013-10-16 09:09:56 +00:00
|
|
|
|
|
|
|
%check
|
2022-04-07 14:47:20 +00:00
|
|
|
# https://github.com/IdentityPython/pysaml2/issues/858
|
|
|
|
sed -i 's:import mock:from unittest import mock:' tests/test_41_response.py
|
|
|
|
sed -i 's:mock.mock:unittest.mock:' tests/test_52_default_sign_alg.py
|
2021-01-04 21:25:57 +00:00
|
|
|
# Excluded tests for i586 gh#IdentityPython/pysaml2#682 and gh#IdentityPython/pysaml2#759
|
2020-05-05 18:14:02 +00:00
|
|
|
%ifarch %{ix86}
|
2021-01-04 21:25:57 +00:00
|
|
|
%pytest -k "not (test_assertion_consumer_service or test_swamid_sp or test_swamid_idp or test_other_response or test_mta or test_unknown_subject or test_filter_ava_registration_authority_1)" tests
|
2020-05-05 18:02:41 +00:00
|
|
|
%else
|
2020-05-05 21:34:33 +00:00
|
|
|
%pytest tests
|
2020-05-05 18:02:41 +00:00
|
|
|
%endif
|
2013-10-16 09:09:56 +00:00
|
|
|
|
2020-05-05 12:54:25 +00:00
|
|
|
%post
|
2020-06-14 08:58:25 +00:00
|
|
|
%python_install_alternative make_metadata.py parse_xsd2.py mdexport.py merge_metadata.py
|
2020-05-05 12:54:25 +00:00
|
|
|
|
|
|
|
%postun
|
2020-06-14 08:58:25 +00:00
|
|
|
%python_uninstall_alternative make_metadata.py parse_xsd2.py mdexport.py merge_metadata.py
|
2020-05-05 12:54:25 +00:00
|
|
|
|
2017-06-30 11:03:36 +00:00
|
|
|
%files %{python_files}
|
2018-12-07 11:16:24 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst CHANGELOG.md
|
2021-01-20 21:32:16 +00:00
|
|
|
%python_alternative %{_bindir}/make_metadata.py
|
|
|
|
%python_alternative %{_bindir}/parse_xsd2.py
|
|
|
|
%python_alternative %{_bindir}/mdexport.py
|
|
|
|
%python_alternative %{_bindir}/merge_metadata.py
|
2017-06-30 11:03:36 +00:00
|
|
|
%{python_sitelib}/*
|
2013-10-16 09:09:56 +00:00
|
|
|
|
|
|
|
%changelog
|