2011-11-29 09:22:09 +00:00
#
2021-08-06 14:02:19 +00:00
# spec file
2011-11-29 09:22:09 +00:00
#
2021-01-28 10:55:56 +00:00
# Copyright (c) 2021 SUSE LLC
2011-11-29 09:22:09 +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.
2011-12-12 09:04:35 +00:00
2018-12-04 13:45:21 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2011-11-29 09:22:09 +00:00
#
2012-03-08 11:34:01 +00:00
2021-01-28 13:48:00 +00:00
%define skip_python2 1
2021-01-28 10:55:56 +00:00
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
2017-05-16 13:54:59 +00:00
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
2021-01-28 10:55:56 +00:00
Name : python-passlib%{psuffix}
2020-11-21 14:52:27 +00:00
Version : 1.7.4
2011-11-29 09:22:09 +00:00
Release : 0
2018-12-19 16:58:17 +00:00
Summary : Password hashing framework supporting over 20 schemes
2011-11-29 09:26:51 +00:00
License : BSD-3-Clause
2011-11-29 09:22:09 +00:00
Group : Development/Languages/Python
2020-11-21 14:52:27 +00:00
URL : https://foss.heptapod.net/python-libs/passlib
2017-01-23 20:59:47 +00:00
Source : https://files.pythonhosted.org/packages/source/p/passlib/passlib-%{version} .tar.gz
2021-01-28 10:55:56 +00:00
BuildRequires : %{python_module setuptools}
BuildRequires : fdupes
BuildRequires : python-rpm-macros
%if %{with test}
2020-10-07 06:32:47 +00:00
BuildRequires : %{python_module argon2_cffi}
BuildRequires : %{python_module bcrypt}
BuildRequires : %{python_module cryptography}
2020-06-09 06:47:01 +00:00
BuildRequires : %{python_module pytest}
2021-01-28 13:48:00 +00:00
%if 0%{?suse_version} >= 1550 || 0%{?is_opensuse}
2021-01-28 10:55:56 +00:00
BuildRequires : %{python_module Django}
2020-10-07 06:32:47 +00:00
BuildRequires : %{python_module scrypt}
2021-01-28 10:55:56 +00:00
%endif
2020-11-21 14:52:27 +00:00
BuildRequires : apache2-utils
2021-01-28 10:55:56 +00:00
%endif
2020-10-07 06:32:47 +00:00
Recommends: python-argon2_cffi
Recommends: python-bcrypt
Recommends: python-cryptography
Recommends: python-scrypt
2011-11-29 09:22:09 +00:00
BuildArch : noarch
2017-05-16 13:54:59 +00:00
%python_subpackages
2011-11-29 09:22:09 +00:00
%description
2018-12-19 16:58:17 +00:00
Passlib is a password hashing library for Python 2 & 3. It provides
implementations of over 20 password hashing algorithms, as well as a
framework for managing existing password hashes. It can verify hashes
found in %{_sysconfdir} /shadow, and provide password hashing for
applications.
2011-11-29 09:22:09 +00:00
%prep
%setup -q -n passlib-%{version}
%build
2017-05-16 13:54:59 +00:00
%python_build
2011-11-29 09:22:09 +00:00
%install
2021-01-28 10:55:56 +00:00
%if !%{with test}
2017-05-16 13:54:59 +00:00
%python_install
2019-03-02 15:20:43 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}
2021-01-28 10:55:56 +00:00
%endif
2011-11-29 09:22:09 +00:00
2017-05-16 13:54:59 +00:00
%check
2021-01-28 10:55:56 +00:00
%if %{with test}
2021-08-06 14:02:19 +00:00
# https://foss.heptapod.net/python-libs/passlib/-/issues/135 for the
# skipped tests.
%pytest -rs -k 'not (test_available_schemes or test_available_schemes or test_default_algorithm or test_empty_hash_value or test_empty_password or test_extension_config or test_invalid_hash_values or test_none_hash_value or test_unusable_flag or test_00_patch_control or test_01_overwrite_detection or test_12_config_presets or test_13_config_defaults or test_21_category_setting)'
2021-01-28 10:55:56 +00:00
%endif
2017-05-16 13:54:59 +00:00
2021-01-28 10:55:56 +00:00
%if !%{with test}
2017-05-16 13:54:59 +00:00
%files %{python_files}
2018-12-04 17:17:53 +00:00
%license LICENSE
%doc README
2017-05-16 13:54:59 +00:00
%{python_sitelib} /passlib
%{python_sitelib} /passlib-%{version} -py%{python_version} .egg-info
2021-01-28 10:55:56 +00:00
%endif
2011-11-29 09:22:09 +00:00
2011-11-29 09:26:51 +00:00
%changelog