b009afb
Name:           python-pykeepass
c090697
Version:        4.0.7.post1
b9b7379
Release:        %autorelease
be96618
Epoch:          1
cb7270b
Summary:        Python library to interact with keepass databases
d79d004
b009afb
# The entire source is GPL-3.0-only, except:
b009afb
#
b009afb
# MIT:
b009afb
#   pykeepass/kdbx_parsing/twofish.py
b009afb
License:        GPL-3.0-only AND MIT
7d6fd48
URL:            https://github.com/libkeepass/pykeepass
b009afb
# The GitHub archive has tests; the PyPI sdist does not.
c090697
%global srcversion %{gsub %{version} \.post -post}
c090697
Source:         %{url}/archive/v%{srcversion}/pykeepass-%{srcversion}.tar.gz
b009afb
31c0282
BuildArch:      noarch
d79d004
 
d79d004
BuildRequires:  python3-devel
d79d004
b009afb
%global common_description %{expand:
b009afb
This library allows you to write entries to a KeePass database.}
b009afb
b009afb
%description %{common_description}
d79d004
b3f2437
b009afb
%package -n     python3-pykeepass
d79d004
Summary:        %{summary}
d79d004
 
b009afb
%description -n python3-pykeepass %{common_description}
d79d004
b3f2437
d79d004
%prep
c090697
%autosetup -n pykeepass-%{srcversion}
b3f2437
b009afb
b009afb
%generate_buildrequires
f8672ee
%pyproject_buildrequires -x test
b3f2437
d79d004
d79d004
%build
b009afb
%pyproject_wheel
d79d004
b3f2437
d79d004
%install
b009afb
%pyproject_install
e540bc9
%pyproject_save_files -l pykeepass
b009afb
b009afb
b009afb
%check
f8672ee
# This is worthwhile even though we run the tests; tests did not catch a
f8672ee
# missing pykeepass.kdbx_parsing package in the 4.0.7 release, but an import
f8672ee
# check would have.
f8672ee
%pyproject_check_import
f8672ee
b009afb
%{python3} -m unittest discover -s tests -v
d79d004
b3f2437
b009afb
%files -n python3-pykeepass -f %{pyproject_files}
b009afb
%doc CHANGELOG.rst
d79d004
%doc README.rst
b3f2437
d79d004
d79d004
%changelog
b9b7379
%autochangelog