forked from pool/python-xkcdpass
Accepting request 1158105 from devel:languages:python
- Add patch fix-test-assertion-methods.patch, use correct assertion methods. - Switch to autosetup and pyproject macros. OBS-URL: https://build.opensuse.org/request/show/1158105 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-xkcdpass?expand=0&rev=10
This commit is contained in:
13
fix-test-assertion-methods.patch
Normal file
13
fix-test-assertion-methods.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Index: xkcdpass-1.19.8/tests/test_xkcdpass.py
|
||||
===================================================================
|
||||
--- xkcdpass-1.19.8.orig/tests/test_xkcdpass.py
|
||||
+++ xkcdpass-1.19.8/tests/test_xkcdpass.py
|
||||
@@ -58,7 +58,7 @@ class XkcdPasswordTests(unittest.TestCas
|
||||
wordlist, numwords=numwords, random_delimiters=True
|
||||
)
|
||||
# check that the result is the right length
|
||||
- self.assertEquals(len(result), numwords * wordlength + (numwords - 1))
|
||||
+ self.assertEqual(len(result), numwords * wordlength + (numwords - 1))
|
||||
# check we have the right number of delimiters
|
||||
self.assertEqual(
|
||||
len([x for x in result if x in set(xkcd_password.DEFAULT_DELIMITERS)]),
|
||||
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 15 00:00:07 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch fix-test-assertion-methods.patch, use correct assertion
|
||||
methods.
|
||||
- Switch to autosetup and pyproject macros.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 13 10:11:38 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-xkcdpass
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,18 +16,18 @@
|
||||
#
|
||||
|
||||
|
||||
%define skip_python2 1
|
||||
|
||||
Name: python-xkcdpass
|
||||
Version: 1.19.8
|
||||
Release: 0
|
||||
Summary: A flexible and scriptable password generator which generates strong passphrases
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/redacted/XKCD-password-generator
|
||||
Source: https://files.pythonhosted.org/packages/source/x/xkcdpass/xkcdpass-%{version}.tar.gz
|
||||
Patch0: fix-test-assertion-methods.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
@@ -40,15 +40,15 @@ A flexible and scriptable password generator which generates strong passphrases,
|
||||
inspired by XKCD 936 (https://xkcd.com/936/)
|
||||
|
||||
%prep
|
||||
%setup -q -n xkcdpass-%{version}
|
||||
%autosetup -p1 -n xkcdpass-%{version}
|
||||
# Remove the shebang
|
||||
sed -i -e '1d' xkcdpass/xkcd_password.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/xkcdpass
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
@@ -69,6 +69,6 @@ pytest_python311_ignore="not test_entropy_printout_valid_input"
|
||||
%doc README.rst
|
||||
%python_alternative %{_bindir}/xkcdpass
|
||||
%{python_sitelib}/xkcdpass
|
||||
%{python_sitelib}/xkcdpass-%{version}*-info
|
||||
%{python_sitelib}/xkcdpass-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user