commit 5f1aa38134450964d492709a8d4369584779abf5 Author: eabdullin Date: Mon Sep 25 15:15:33 2023 +0000 import CS python-pefile-2023.2.7-3.el9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..163a155 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/pefile-2023.2.7.tar.gz diff --git a/.python-pefile.metadata b/.python-pefile.metadata new file mode 100644 index 0000000..4b32938 --- /dev/null +++ b/.python-pefile.metadata @@ -0,0 +1 @@ +eb5ebaded23c25a52384ae1833a28618f23ac949 SOURCES/pefile-2023.2.7.tar.gz diff --git a/SOURCES/pefile-tests.sh b/SOURCES/pefile-tests.sh new file mode 100755 index 0000000..acb1f2b --- /dev/null +++ b/SOURCES/pefile-tests.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# config +COMMIT="64524fa8a041" +REMOTE="https://github.com/erocarrera/pefile-tests" + +# clone repo and run tests +TESTDIR="$(mktemp --directory ${TMPDIR-/var/tmp}/test-XXXXXXXX)" +trap 'cd /; rm -rf "$TESTDIR"' EXIT +cd "$TESTDIR" +set -ex +git clone $REMOTE repo +cd repo +git checkout "$COMMIT" +pytest tests/pefile_test.py diff --git a/SPECS/python-pefile.spec b/SPECS/python-pefile.spec new file mode 100644 index 0000000..81f4441 --- /dev/null +++ b/SPECS/python-pefile.spec @@ -0,0 +1,63 @@ +# Created by pyp2rpm-3.3.8 +%global pypi_name pefile +%global pypi_version 2023.2.7 + +Name: python-%{pypi_name} +Version: %{pypi_version} +Release: 3%{?dist} +Summary: Python PE parsing module + +License: MIT +URL: https://github.com/erocarrera/pefile +Source0: %{pypi_name}-%{pypi_version}.tar.gz +Source1: pefile-tests.sh +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) + +%description +pefile is a multi-platform Python module to parse and work with Portable +Executable (PE) files. Most of the information contained in the PE file +headers is accessible, as well as all the sections' details and data. + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +pefile is a multi-platform Python module to parse and work with Portable +Executable (PE) files. Most of the information contained in the PE file +headers is accessible, as well as all the sections' details and data. + +%prep +%autosetup -n %{pypi_name}-%{pypi_version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%py3_build + +%install +%py3_install +mkdir -p %{buildroot}%{_datadir}/%{name} +cp %{SOURCE1} %{buildroot}%{_datadir}/%{name} + +%files -n python3-%{pypi_name} +%license LICENSE +%{python3_sitelib}/pefile.py +%{python3_sitelib}/peutils.py +%{python3_sitelib}/ordlookup +%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/%{pypi_name}-%{pypi_version}-py%{python3_version}.egg-info +%{_datadir}/%{name} + +%changelog +* Thu May 25 2023 Gerd Hoffmann - 2023.2.7-3 +- Add gating configuration. + +* Thu May 25 2023 Gerd Hoffmann - 2023.2.7-2 +- Added test script and configuration. + +* Tue May 23 2023 Gerd Hoffmann - 2023.2.7-1 +- Initial package.