2012-10-01 10:26:48 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-pefile
|
|
|
|
#
|
2024-01-03 11:08:52 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2012-10-01 10:26:48 +02:00
|
|
|
#
|
|
|
|
# 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.
|
2015-08-15 13:34:27 +02:00
|
|
|
|
2018-12-04 14:46:06 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-10-01 10:26:48 +02:00
|
|
|
#
|
|
|
|
|
2015-08-15 13:34:27 +02:00
|
|
|
|
2023-06-11 13:36:39 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2012-10-01 10:26:48 +02:00
|
|
|
Name: python-pefile
|
2023-03-26 21:56:27 +02:00
|
|
|
Version: 2023.2.7
|
2012-10-01 10:26:48 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: A python module to work with PE (pertable executable) files
|
2015-08-15 13:34:27 +02:00
|
|
|
License: BSD-3-Clause
|
2017-11-06 19:24:13 +01:00
|
|
|
Group: Development/Languages/Python
|
2022-06-07 01:01:38 +02:00
|
|
|
URL: https://github.com/erocarrera/pefile
|
2017-11-06 19:24:13 +01:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pefile/pefile-%{version}.tar.gz
|
2023-10-07 23:14:46 +02:00
|
|
|
BuildRequires: %{python_module pip}
|
2024-01-03 11:08:52 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-10-07 23:14:46 +02:00
|
|
|
BuildRequires: %{python_module wheel}
|
2017-11-06 19:24:13 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
2012-10-01 10:26:48 +02:00
|
|
|
|
|
|
|
%description
|
2017-11-06 19:24:13 +01:00
|
|
|
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.
|
2012-10-01 10:26:48 +02:00
|
|
|
|
|
|
|
%prep
|
2023-10-07 23:14:46 +02:00
|
|
|
%autosetup -p1 -n pefile-%{version}
|
2017-11-06 19:24:13 +01:00
|
|
|
sed -i -e '/^#!\//, 1d' pefile.py
|
2012-10-01 10:26:48 +02:00
|
|
|
|
|
|
|
%build
|
2023-10-07 23:14:46 +02:00
|
|
|
%pyproject_wheel
|
2012-10-01 10:26:48 +02:00
|
|
|
|
|
|
|
%install
|
2023-10-07 23:14:46 +02:00
|
|
|
%pyproject_install
|
2017-11-06 19:24:13 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
2019-04-25 09:36:31 +02:00
|
|
|
# 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
|
2018-11-21 09:04:37 +01:00
|
|
|
# %%check
|
|
|
|
# %%python_exec setup.py test
|
2012-10-01 10:26:48 +02:00
|
|
|
|
2017-11-06 19:24:13 +01:00
|
|
|
%files %{python_files}
|
2018-11-21 09:04:37 +01:00
|
|
|
%doc README
|
|
|
|
%license LICENSE
|
2023-10-07 23:14:46 +02:00
|
|
|
%pycache_only %{python_sitelib}/__pycache__/pe*.pyc
|
|
|
|
%{python_sitelib}/ordlookup
|
|
|
|
%{python_sitelib}/pefile.py
|
|
|
|
%{python_sitelib}/peutils.py
|
|
|
|
%{python_sitelib}/pefile-%{version}*-info
|
2012-10-01 10:26:48 +02:00
|
|
|
|
|
|
|
%changelog
|