Skip to content

Commit

Permalink
Update python-xkcdpass to version 1.19.8 / rev 10 via SR 1158105
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/1158105
by user StevenK + anag+factory
- Add patch fix-test-assertion-methods.patch, use correct assertion
  methods.
- Switch to autosetup and pyproject macros.
  • Loading branch information
StevenK authored and bmwiedemann committed Mar 15, 2024
1 parent a7f5738 commit 2cf8587
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
Binary file modified packages/p/python-xkcdpass/.files
Binary file not shown.
10 changes: 10 additions & 0 deletions packages/p/python-xkcdpass/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,14 @@
- Initial release for build.opensuse.org</comment>
<requestid>1132836</requestid>
</revision>
<revision rev="10" vrev="2">
<srcmd5>dc60dbd1ebabc2322a3c2500ac2a5f1e</srcmd5>
<version>1.19.8</version>
<time>1710531051</time>
<user>anag+factory</user>
<comment>- Add patch fix-test-assertion-methods.patch, use correct assertion
methods.
- Switch to autosetup and pyproject macros.</comment>
<requestid>1158105</requestid>
</revision>
</revisionlist>
13 changes: 13 additions & 0 deletions packages/p/python-xkcdpass/fix-test-assertion-methods.patch
Original file line number Diff line number Diff line change
@@ -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)]),
7 changes: 7 additions & 0 deletions packages/p/python-xkcdpass/python-xkcdpass.changes
Original file line number Diff line number Diff line change
@@ -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>

Expand Down
18 changes: 9 additions & 9 deletions packages/p/python-xkcdpass/python-xkcdpass.spec
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -16,39 +16,39 @@
#


%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
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
%python_subpackages

%description
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}

Expand All @@ -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

0 comments on commit 2cf8587

Please sign in to comment.