14
0

- Update to 4.6.5:

* Many many changes everywhere, see CHANGELOG.md for details
- Use github tarball to include license/tests

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysaml2?expand=0&rev=23
This commit is contained in:
Tomáš Chvátal
2018-12-07 11:16:24 +00:00
committed by Git OBS Bridge
parent 8b74a89d19
commit eeac59abc3
4 changed files with 42 additions and 39 deletions

View File

@@ -17,42 +17,20 @@
%{?!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.5.0
Name: python-pysaml2
Version: 4.6.5
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/%{modname}
Source: https://pypi.io/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz
URL: https://github.com/IdentityPython/pysaml2
Source: https://github.com/IdentityPython/pysaml2/archive/v%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# Test requirements:
%if %{with tests}
BuildRequires: %{python_module cryptography}
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 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
Requires: python-Paste
Requires: python-cryptography
Requires: python-decorator
Requires: python-cryptography >= 1.4
Requires: python-defusedxml
Requires: python-future
Requires: python-pyOpenSSL
@@ -62,9 +40,28 @@ Requires: python-repoze.who
Requires: python-requests >= 1.0.0
Requires: python-six
Requires: python-zope.interface
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: %{python_module Paste}
BuildRequires: %{python_module cryptography >= 1.4}
BuildRequires: %{python_module defusedxml}
BuildRequires: %{python_module future}
BuildRequires: %{python_module mock}
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}
BuildRequires: %{python_module six}
BuildRequires: %{python_module zope.interface}
# This is needed as xmlsec itself does not pull any backend by default
# Will be fixed in future xmlsec releases
BuildRequires: libxmlsec1-openssl1
BuildRequires: python2-gdbm
BuildRequires: python3-dbm
BuildRequires: xmlsec1
%python_subpackages
%description
@@ -74,25 +71,24 @@ SAML2 service provider or an identity provider.
%prep
%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/#!.*$//'
# remove tests that poll internet
rm -f tests/test_30_mdstore*.py
%build
%python_build
%install
%python_install
%fdupes %{buildroot}%{_prefix}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
%python_exec setup.py test
%endif
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix}
%files %{python_files}
%license LICENSE.txt
%doc README.rst
%license LICENSE
%doc README.rst CHANGELOG.md
%python3_only %{_bindir}/make_metadata.py
%python3_only %{_bindir}/parse_xsd2.py
%python3_only %{_bindir}/mdexport.py