# # spec file for package python-pefile # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?sle15_python_module_pythons} Name: python-pefile Version: 2023.2.7 Release: 4.9 Summary: A python module to work with PE (pertable executable) files License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/erocarrera/pefile Source: https://files.pythonhosted.org/packages/source/p/pefile/pefile-%{version}.tar.gz BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch %python_subpackages %description Portable Executable reader module. All the PE file basic structures are available with their default names as attributes of the instance returned. Processed elements such as the import table are made available with lowercase names, to differentiate them from the upper case basic structure names. pefile has been tested against many edge cases such as corrupted and malformed PEs as well as malware, which often attempts to abuse the format way beyond its standard use. To the best of my knowledge most of the abuse is handled gracefully. %prep %autosetup -p1 -n pefile-%{version} sed -i -e '/^#!\//, 1d' pefile.py %build %pyproject_wheel %install %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} # Tests not in sdist and have good reason to at time of writing: # https://github.com/erocarrera/pefile/issues/82#issuecomment-192018385 # https://github.com/erocarrera/pefile/issues/171 # %%check # %%python_exec setup.py test %files %{python_files} %doc README %license LICENSE %pycache_only %{python_sitelib}/__pycache__/pe*.pyc %{python_sitelib}/ordlookup %{python_sitelib}/pefile.py %{python_sitelib}/peutils.py %{python_sitelib}/pefile-%{version}*-info %changelog * Wed Jan 3 2024 Dirk Müller - require setuptools * Sat Oct 7 2023 Matej Cepl - Clean up the SPEC file * Sat Jun 10 2023 ecsos - Add %%{?sle15_python_module_pythons} * Sun Mar 26 2023 Dirk Müller - update to 2023.2.7: * accept dot in valid charset for name * Remove future from dependencies * Add machine types * Incorporate PEP 238 and PEP 3120 * Generate GUID fields of CV_INFO_PDB70 readable by Python * Dynamic relocations support * Add Export Hash Method * Loosen export symbol validation * Mon Jun 6 2022 Greg Freemyer - update to version 2022.5.30 * Merged pull request #344 from elicn/faster-reloc: Speed up relocation process * Merged pull request #175 from tdube/patch-1: Fix catch-all exception clause in parse_resources_directory * Turn data into a bytearray to avoid copying data around (from elicn) * Merged pull request #343 from mat-gas/master: various performances improvements (30-50%% in certain workflows, 15-25%% in average) * Merged pull request #340 from dinateper/feature/PEfile_context_manager: Update PE to allow with statements * Removed legacy Python 2 code * Miscellaneous other fixes. - add %%define skip_python2 1 * Wed Apr 24 2019 pgajdos@suse.com - version update to 2019.4.18 * speed up parsing of files with many ordinals or exports * other merged PRs and issues fixed since the last release * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Fri Nov 16 2018 Todd R - Update to version 2018.8.8 * Fixed tests * Fixed bug accessing warnings attribute from the PE object * Fix is_driver()'s behavior under Python 3. * Fix a bug attempting to handle an invalid string * Modified version information to handle multiple version information that may exist within a single file. * Prevent division by zero when pe.trim() returns no data * Thu Oct 19 2017 toddrme2178@gmail.com - Implement single-spec version - Update to version 2017.9.3 * No changelog - Drop unneeded force_version.patch * Thu May 14 2015 Greg.Freemyer@gmail.com - upgrade to v1.2.10-139 * Merged path from ThreatGrid's Wesley Brown. Thanks! Summary: changed memory mapping usage, revamped to use bytearrays rather than list, complete rewrite of the checksum generation algorithm to be much more memory efficient, less susceptible to PE bomb attacks * Corrected some doctrings * Added WIndow 8 support * Added more subsystem types * Added Mandiant's ordlookup to resolve the names for some symbols * Better handling of the Rich Header - updated license to BSD-3-Clause - moved UserDB.txt to /usr/share/python-pefile * This is a PE file signature database. * It is available to callers of python-pefile, but the caller must explicitely point the USERDB variable at it. - Add force-version.patch because upstream depends on SCR checkout mechanism * Tue Nov 20 2012 saschpe@suse.de - Cleanup excessive macro usage - Fix SLE_11_SP2 build (not noarch there) - No need for dos2unix, sed is enough * Fri Sep 21 2012 Greg.Freemyer@gmail.com - initial package - v1.2.10-121 - call dos2unix on a couple text files that have dos line endings