From 3ae8695f86758a318e9329d49f7ec3edf97a4f73 Mon Sep 17 00:00:00 2001 From: rdobuilder Date: Feb 20 2024 16:32:48 +0000 Subject: Initial build for 0.5.0 This initial import is diverging from Fedora. First import in Fedora was 0.5.1 which require a version of Cython newer that the one in CentOS 9 [1] Howerver, the improvements included in 0.5.1 are not required for CentOS 9 so 0.5.0 should be good enough. [1] https://github.com/jborean93/pykrb5/commit/289feae547d0d18c69244fdad58389d127d7d6b7 [2] https://github.com/jborean93/pykrb5/blob/main/CHANGELOG.md#051---2023-08-29 Related-to: https://review.rdoproject.org/r/q/I12d8bb52f40795be9dafc0cbc79ebeacfe3c0d25 --- diff --git a/.python-krb5.metadata b/.python-krb5.metadata new file mode 100644 index 0000000..01c0c1f --- /dev/null +++ b/.python-krb5.metadata @@ -0,0 +1 @@ +5f7f4fb4e419eba6a40316586051e43603e82d16 SOURCES/krb5-0.5.0.tar.gz diff --git a/SOURCES/.gitignore b/SOURCES/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/SOURCES/.gitignore diff --git a/SOURCES/0001-Exclude-header-files-from-package-data.patch b/SOURCES/0001-Exclude-header-files-from-package-data.patch new file mode 100644 index 0000000..d8c9c95 --- /dev/null +++ b/SOURCES/0001-Exclude-header-files-from-package-data.patch @@ -0,0 +1,29 @@ +From b01b117f74288c202f73b55bcde7036dedb824aa Mon Sep 17 00:00:00 2001 +From: Carl George +Date: Wed, 13 Sep 2023 11:19:05 -0500 +Subject: [PATCH] Exclude header files from package data + +While working on packaging this library for Fedora, we noticed that +python_krb5.h is installed in the site-packages directory. I think it +should be excluded, similar to how *.pxd and *.pyx files are. + +https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2238652 +--- + setup.cfg | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.cfg b/setup.cfg +index f14bece..d35ee07 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -42,6 +42,7 @@ krb5 = + krb5 = + *.pxd + *.pyx ++ *.h + + [egg_info] + tag_build = +-- +2.41.0 + diff --git a/SPECS/python-krb5.spec b/SPECS/python-krb5.spec new file mode 100644 index 0000000..4b63b03 --- /dev/null +++ b/SPECS/python-krb5.spec @@ -0,0 +1,66 @@ +Name: python-krb5 +Version: 0.5.0 +Release: 1%{dist} +Summary: Kerberos API bindings for Python +License: MIT +URL: https://github.com/jborean93/pykrb5 +Source: %{pypi_source krb5} +# https://github.com/jborean93/pykrb5/pull/32 +Patch: 0001-Exclude-header-files-from-package-data.patch + +BuildRequires: gcc +BuildRequires: krb5-devel +# for /usr/sbin/kdb5_util in tests +BuildRequires: krb5-server +# for /usr/bin/kinit in tests +BuildRequires: krb5-workstation + +%global _description %{expand: +This library provides Python functions that wraps the Kerberos 5 C API. Due to +the complex nature of this API it is highly recommended to use something like +python-gssapi which exposes the Kerberos authentication details through GSSAPI.} + + +%description %_description + + +%package -n python3-krb5 +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: python3-pytest +#BuildRequires: python3-k5test + + +%description -n python3-krb5 %_description + + +%prep +%autosetup -p 1 -n krb5-%{version} + +sed -i 's/Cython >= 0.29.29, < 3.0.0/Cython/g' pyproject.toml + +%generate_buildrequires +%pyproject_buildrequires + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files krb5 + + +%check +# We are missing python-k5test BRs required for testing +#%%pytest --verbose + + +%files -n python3-krb5 -f %{pyproject_files} +%doc README.md + + +%changelog +* Tue Feb 20 2024 Alfredo Moralejo - 0.5.0-1 +- Initial package