diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2e9f10 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/python-pyaes-*.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index d409129..0000000 --- a/dead.package +++ /dev/null @@ -1,3 +0,0 @@ -Retired: Fails to install - -See https://pagure.io/releng/issue/11685 diff --git a/python-pyaes-0001-Use-relative-imports-during-tests.patch b/python-pyaes-0001-Use-relative-imports-during-tests.patch new file mode 100644 index 0000000..bb32d56 --- /dev/null +++ b/python-pyaes-0001-Use-relative-imports-during-tests.patch @@ -0,0 +1,54 @@ +From: Peter Lemenkov +Date: Fri, 31 Mar 2017 17:49:01 +0300 +Subject: [PATCH] Use relative imports during tests + +Sometimes you're testing package not from ~/Projects/pyaes or something, +but from ~/Projects/python-pyaes. Let's allow people to rename a +project's top-level directory. + +Also let's allow run tests from ./tests/ as well. + +Signed-off-by: Peter Lemenkov + +diff --git a/tests/test-aes.py b/tests/test-aes.py +index afa59aa..35d0a4f 100644 +--- a/tests/test-aes.py ++++ b/tests/test-aes.py +@@ -22,7 +22,8 @@ + + + import sys +-sys.path.append('../pyaes') ++sys.path.append('./') ++sys.path.append('../') + + from pyaes import * + +diff --git a/tests/test-blockfeeder.py b/tests/test-blockfeeder.py +index 41bd487..9781253 100644 +--- a/tests/test-blockfeeder.py ++++ b/tests/test-blockfeeder.py +@@ -22,7 +22,8 @@ + + + import sys +-sys.path.append('../pyaes') ++sys.path.append('./') ++sys.path.append('../') + + import os + import random +diff --git a/tests/test-util.py b/tests/test-util.py +index db30918..3b1ae7e 100644 +--- a/tests/test-util.py ++++ b/tests/test-util.py +@@ -22,7 +22,8 @@ + + + import sys +-sys.path.append('../pyaes') ++sys.path.append('./') ++sys.path.append('../') + + from pyaes.util import append_PKCS7_padding, strip_PKCS7_padding + diff --git a/python-pyaes.spec b/python-pyaes.spec new file mode 100644 index 0000000..814d234 --- /dev/null +++ b/python-pyaes.spec @@ -0,0 +1,124 @@ +%global srcname pyaes + + +Name: python-%{srcname} +Version: 1.6.1 +Release: 13%{?dist} +Summary: Pure-Python implementation of AES block-cipher and common modes of operation +License: MIT +URL: https://github.com/ricmoo/%{srcname} +Source0: https://github.com/ricmoo/%{srcname}/archive/v%{version}/%{name}-%{version}.tar.gz +Patch1: python-pyaes-0001-Use-relative-imports-during-tests.patch +BuildArch: noarch + + +%description +A pure-Python implementation of the AES block cipher algorithm and the common +modes of operation (CBC, CFB, CTR, ECB and OFB). + + +%package -n python3-%{srcname} +Summary: %{summary} +BuildRequires: python3-crypto +BuildRequires: python3-devel +%{?python_provide:%python_provide python3-%{srcname}} + + +%description -n python3-%{srcname} +A pure-Python implementation of the AES block cipher algorithm and the common +modes of operation (CBC, CFB, CTR, ECB and OFB). + + +%prep +%autosetup -p1 -n %{srcname}-%{version} + + +%build +%py3_build + + +%install +%py3_install + + +%check +%{__python3} tests/test-aes.py +%{__python3} tests/test-blockfeeder.py +%{__python3} tests/test-util.py + + +%files -n python3-%{srcname} +%license LICENSE.txt +%doc README.md +%{python3_sitelib}/* + + +%changelog +* Fri Jul 21 2023 Fedora Release Engineering - 1.6.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 1.6.1-12 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 1.6.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 1.6.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 1.6.1-9 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 1.6.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 1.6.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 1.6.1-6 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.6.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.6.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 1.6.1-3 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Nov 13 2019 Peter Lemenkov - 1.6.1-1 +- Ver. 1.6.1 + +* Thu Oct 03 2019 Miro Hrončok - 1.6.0-10 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 1.6.0-9 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.6.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.6.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Sep 20 2018 Peter Lemenkov - 1.6.0-6 +- Remove python2 subpackage + +* Sat Jul 14 2018 Fedora Release Engineering - 1.6.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.6.0-4 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 1.6.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Mar 31 2017 Peter Lemenkov - 1.6.0-1 +- Initial build diff --git a/sources b/sources new file mode 100644 index 0000000..d0445bf --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (python-pyaes-1.6.1.tar.gz) = 3374d98b9e87c40fd19faeed63866f38f6515bcdb1215a910f7149106413e2f36a838ff0ae842b91406e5f682bbfba8b02bd1768b5beed8b3a6cf7c63e6f0e2b