#2 Update to 4.0.7 (close RHBZ#2266843)
Merged 4 months ago by music. Opened 4 months ago by music.
rpms/ music/python-pykeepass v4.0.7  into  rawhide

file modified
+1
@@ -8,3 +8,4 @@ 

  /pykeepass-4.0.4.tar.gz

  /pykeepass-4.0.5.tar.gz

  /pykeepass-4.0.6.tar.gz

+ /pykeepass-4.0.7.tar.gz

file added
+23
@@ -0,0 +1,23 @@ 

+ From 5642d22f1debeffa7db6668ac00ea0694ecbef83 Mon Sep 17 00:00:00 2001

+ From: "Benjamin A. Beasley" <code@musicinmybrain.net>

+ Date: Thu, 29 Feb 2024 08:36:40 -0500

+ Subject: [PATCH] Remove shebang line from pykeepass/deprecated.py

+ 

+ The file does not have the executable bit set in its filesystem

+ permissions and is not script-like (no `if __name__ == "__main__"` and

+ no interesting side effects), so a shebang is not useful.

+ ---

+  pykeepass/deprecated.py | 3 ---

+  1 file changed, 3 deletions(-)

+ 

+ diff --git a/pykeepass/deprecated.py b/pykeepass/deprecated.py

+ index 230cfbed..ece59831 100644

+ --- a/pykeepass/deprecated.py

+ +++ b/pykeepass/deprecated.py

+ @@ -1,6 +1,3 @@

+ -#!/usr/bin/env python3

+ -

+ -

+  # ---------- Find functions ---------------

+  # Use find_entries()/find_groups() instead

+  

file added
+23
@@ -0,0 +1,23 @@ 

+ From 4a29e3a263c87d95add20425258be2ba0ad36ed8 Mon Sep 17 00:00:00 2001

+ From: "Benjamin A. Beasley" <code@musicinmybrain.net>

+ Date: Thu, 29 Feb 2024 10:43:05 -0500

+ Subject: [PATCH] Fix missing pykeepass.kdbx_parsing when built with modern

+  tools

+ 

+ ---

+  pyproject.toml | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/pyproject.toml b/pyproject.toml

+ index 6bd7fad..437003c 100644

+ --- a/pyproject.toml

+ +++ b/pyproject.toml

+ @@ -37,7 +37,7 @@ Issues = "https://github.com/libkeepass/pykeepass/issues"

+  Changelog = "https://github.com/libkeepass/pykeepass/blob/master/CHANGELOG.rst"

+  

+  [tool.setuptools]

+ -packages = ["pykeepass"]

+ +packages = ["pykeepass", "pykeepass.kdbx_parsing"]

+  include-package-data = true

+  

+  [build-system]

file modified
+14 -6
@@ -1,5 +1,5 @@ 

  Name:           python-pykeepass

- Version:        4.0.6

+ Version:        4.0.7

  Release:        %autorelease

  Epoch:          1

  Summary:        Python library to interact with keepass databases
@@ -12,6 +12,12 @@ 

  URL:            https://github.com/libkeepass/pykeepass

  # The GitHub archive has tests; the PyPI sdist does not.

  Source:         %{url}/archive/v%{version}/pykeepass-%{version}.tar.gz

+ # Remove shebang line from pykeepass/deprecated.py

+ # https://github.com/libkeepass/pykeepass/pull/377

+ Patch:          %{url}/pull/377.patch

+ # Fix missing pykeepass.kdbx_parsing when built with modern tools

+ # https://github.com/libkeepass/pykeepass/pull/378

+ Patch:          %{url}/pull/378.patch

  

  BuildArch:      noarch

   
@@ -30,14 +36,11 @@ 

  

  

  %prep

- %autosetup -n pykeepass-%{version}

- 

- # Convert exact-version pins, which we cannot respect, to lower bounds.

- sed -r -i 's/==/>=/' requirements.txt

+ %autosetup -n pykeepass-%{version} -p1

  

  

  %generate_buildrequires

- %pyproject_buildrequires

+ %pyproject_buildrequires -x test

  

  

  %build
@@ -50,6 +53,11 @@ 

  

  

  %check

+ # This is worthwhile even though we run the tests; tests did not catch a

+ # missing pykeepass.kdbx_parsing package in the 4.0.7 release, but an import

+ # check would have.

+ %pyproject_check_import

+ 

  %{python3} -m unittest discover -s tests -v

  

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (pykeepass-4.0.6.tar.gz) = 43f31c1b07dd28afe13fcd58f9e34419338219a46dbaf7c018ba747f1ed1ca4b97d96559e390665bac549f54ac525ebdc075e49abbcd049dec4bd367c393da25

+ SHA512 (pykeepass-4.0.7.tar.gz) = 51d2ade1cc7d3f0c705d39d0ec8a7087995ee6ed9ea573bb87ee8783792709a707230352e572ed0e420cbc8122ae741f4f3c40f5ef8949c53afcb0bc1da2a0fe

Based on discussion in https://src.fedoraproject.org/rpms/python-pykeepass/pull-request/1, this would be for Rawhide only.

An impact check with secrets using a local mock build in Rawhide shows that meson is having a hard time finding pykeepass after this update,

Message: Looking for dependencies
Program python3 (pykeepass, pyotp, validators, zxcvbn) found: NO modules: pyotp, validators, zxcvbn

meson.build:30:20: ERROR: python3 is missing modules: pykeepass

A full log can be found at /builddir/build/BUILD/secrets-8.0/redhat-linux-build/meson-logs/meson-log.txt

That should be resolved before merging this PR.

rebased onto b26fb14

4 months ago

I found the problem. Upstream made a mistake porting to pyproject.toml, and pykeepass/kdbx_parsing is not included when building a modern way, like by using https://pypi.org/project/build/ or pyproject-rpm-macros.

I’ll send a PR upstream to fix it.

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/6e1127352b8e4d949ed7e8b9e267fb47

2 new commits added

  • Update to 4.0.7 (close RHBZ#2266843)
  • Remove useless shebang from pykeepass/deprecated.py
4 months ago

Fixed the missing pykeepass.kdbx_parsing, and secrets now builds with this release. Merging and building for F41/Rawhide (only).

Pull-Request has been merged by music

4 months ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/13eed0fb7e0144628175d6ec66dc8b9a