summaryrefslogtreecommitdiff
path: root/dev-python/pefile
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-12-27 14:10:06 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-12-27 14:10:06 +0000
commit4429be000a778f363162554d59d903a725283d7d (patch)
tree16a6de16cbef2e9dcb36233f2e0c825f3ff60493 /dev-python/pefile
parent2d9c9c77c273a982d69ad4caefcc1a3783844056 (diff)
gentoo auto-resync : 27:12:2022 - 14:10:05
Diffstat (limited to 'dev-python/pefile')
-rw-r--r--dev-python/pefile/Manifest4
-rw-r--r--dev-python/pefile/files/pefile-2022.5.30-remove-future.patch115
-rw-r--r--dev-python/pefile/pefile-2022.5.30-r1.ebuild30
-rw-r--r--dev-python/pefile/pefile-9999.ebuild5
4 files changed, 149 insertions, 5 deletions
diff --git a/dev-python/pefile/Manifest b/dev-python/pefile/Manifest
index 1fcaea382ce9..c4e880c7686a 100644
--- a/dev-python/pefile/Manifest
+++ b/dev-python/pefile/Manifest
@@ -1,4 +1,6 @@
+AUX pefile-2022.5.30-remove-future.patch 2980 BLAKE2B 7cd8d7e744d488cc8720ba6da84ccee4f481b58e4e0cd7f5810b873ee74a0b57fc2e578a4444dfdfc1948b16c75af94e1ccbf57baa4efbe1c244326bfc8d12bf SHA512 cc04fff8f25b008c2b966b6072548b90948881c59eeecb20fb6b285e72e56f42768f1853ef839a6a697c43d33d867e42c835ec1a007b6c3b2846dc973d9d109b
DIST pefile-2022.5.30.tar.gz 72899 BLAKE2B 11752fe849c91749c5272ee9157513db0690fa47a51e274d24093f47c21096e877b364e1dba9cf08d9369abb7e9133743fe98d524079559b9aa9159ece76af74 SHA512 b584472387f7f0161449d2dc0035867da8983eb2c89b488952f38a3e836d23241d46f49a1c9cde13dde4253ef3f212971df48747ea2fec6b91c4db2b7618956d
+EBUILD pefile-2022.5.30-r1.ebuild 846 BLAKE2B 1ef1f58a99a33dd810b71ce4c576113a1e0d06de89746c551a5ced04e26f4e12b1f885d2683c997d40e722d5c31a07e26e62736c85614843ed1432524be71a9d SHA512 cd00fb08cb829a8ff8cd53a2d01baf21fae63e4868420688a7c6e18d7aa57a258fbbce2df6025b0a8a6db52583893a85033e5f241fbe1fca4d443b51c77a989f
EBUILD pefile-2022.5.30.ebuild 854 BLAKE2B 5cd9a7883ec44aeb31661aa40daa8745ea847193234eca069bcadf7055bd48c9ca7b750f4e49760ffff11a3ac796c58a54acfeb46bf8a5362361c7a569f49463 SHA512 5878dca54ea278a53784ec261c29151312e0059e241789ba35db4837778bc9ecb16a6e37928c87680f9043c5cc628224a7c724de2853234b6a9235717a8040e9
-EBUILD pefile-9999.ebuild 856 BLAKE2B f8204fde291e54d945b1302c7a7c17a89a8b7a991124c7475aece43b64b3963cda90efbd0944b672bf7876474e1b282bf138d431445843b5ecbf195484ff3358 SHA512 27492df698e28b6be1845423210e3f87fec8bd7d097baf448cb3018c7fa89f437f817e6b51134b33cd68023c0c3fc1f168a16dd910e4ce8c21ccc2c0ec9120b7
+EBUILD pefile-9999.ebuild 793 BLAKE2B b803c4a7300c380a11a6a2dfc50f680796b49a2fcfb8fcaa66c29352a3a39569f39bb5d7ba6e57413371bd8d9f661b240f9cd4a29585e7708437e534ca0d34a4 SHA512 4b6ca97fb231e75d5b726fca407b4e912f0b871d3d6863b1dbdee4fc382b31a3bfdadd7e1e05a846596a7f301d170a1add4a98ea4687e9a43ee4c4ca94b9d9fc
MISC metadata.xml 766 BLAKE2B 8cd0206bb0cc7de9a76159851092c27b5e7c6d8294a136de2dd74e51da9062f6daa67c2421c173b6125758a9f350b84b03e2a85fa2029beb50032aa034f08c3a SHA512 7c3e9d6d89108b17a722c805353a9c457ccb5a5233bfca7145f82a37ab0337405c84a1e806d9fba77dbee779dd06cb18f7272399277d377aa84dcafc470156bf
diff --git a/dev-python/pefile/files/pefile-2022.5.30-remove-future.patch b/dev-python/pefile/files/pefile-2022.5.30-remove-future.patch
new file mode 100644
index 000000000000..7f7cc5d29d48
--- /dev/null
+++ b/dev-python/pefile/files/pefile-2022.5.30-remove-future.patch
@@ -0,0 +1,115 @@
+Bug: https://bugs.gentoo.org/888279
+
+From 36bf63f1185b8407ff9b4ce8c1c8e8620d8ae30f Mon Sep 17 00:00:00 2001
+From: Letu Ren <fantasquex@gmail.com>
+Date: Sun, 26 Jun 2022 22:54:27 +0800
+Subject: [PATCH] Remove future from dependencies
+
+Fix: #348
+---
+ ordlookup/__init__.py | 15 ++-------------
+ peutils.py | 7 -------
+ setup.py | 19 ++++---------------
+ tests/pefile_test.py | 3 ---
+ 4 files changed, 6 insertions(+), 38 deletions(-)
+
+diff --git a/ordlookup/__init__.py b/ordlookup/__init__.py
+index c69aee0..8841d74 100644
+--- a/ordlookup/__init__.py
++++ b/ordlookup/__init__.py
+@@ -1,5 +1,3 @@
+-from __future__ import absolute_import
+-import sys
+ from . import ws2_32
+ from . import oleaut32
+
+@@ -15,18 +13,9 @@
+ b"oleaut32.dll": oleaut32.ord_names,
+ }
+
+-PY3 = sys.version_info > (3,)
+
+-if PY3:
+-
+- def formatOrdString(ord_val):
+- return "ord{}".format(ord_val).encode()
+-
+-
+-else:
+-
+- def formatOrdString(ord_val):
+- return b"ord%d" % ord_val
++def formatOrdString(ord_val):
++ return "ord{}".format(ord_val).encode()
+
+
+ def ordLookup(libname, ord_val, make_name=False):
+diff --git a/peutils.py b/peutils.py
+index 34b98f5..4d4b2bd 100644
+--- a/peutils.py
++++ b/peutils.py
+@@ -6,13 +6,6 @@
+
+ All rights reserved.
+ """
+-from __future__ import division
+-from future import standard_library
+-
+-standard_library.install_aliases()
+-from builtins import range
+-from builtins import object
+-
+ import os
+ import re
+ import string
+diff --git a/setup.py b/setup.py
+index c8ab89f..206db6f 100755
+--- a/setup.py
++++ b/setup.py
+@@ -5,8 +5,6 @@
+ import re
+ import sys
+
+-if sys.version_info.major == 3:
+- from io import open
+
+ try:
+ from setuptools import setup, Command
+@@ -25,12 +23,8 @@ def _read_doc():
+ Parse docstring from file 'pefile.py' and avoid importing
+ this module directly.
+ """
+- if sys.version_info.major == 2:
+- with open('pefile.py', 'r') as f:
+- tree = ast.parse(f.read())
+- else:
+- with open('pefile.py', 'r', encoding='utf-8') as f:
+- tree = ast.parse(f.read())
++ with open('pefile.py', 'r', encoding='utf-8') as f:
++ tree = ast.parse(f.read())
+ return ast.get_docstring(tree)
+
+
+@@ -42,12 +36,8 @@ def _read_attr(attr_name):
+ __version__, __author__, __contact__,
+ """
+ regex = attr_name + r"\s+=\s+['\"](.+)['\"]"
+- if sys.version_info.major == 2:
+- with open('pefile.py', 'r') as f:
+- match = re.search(regex, f.read())
+- else:
+- with open('pefile.py', 'r', encoding='utf-8') as f:
+- match = re.search(regex, f.read())
++ with open('pefile.py', 'r', encoding='utf-8') as f:
++ match = re.search(regex, f.read())
+ # Second item in the group is the value of attribute.
+ return match.group(1)
+
+@@ -89,7 +79,6 @@ def run(self):
+ python_requires=">=3.6.0",
+ packages = ['ordlookup'],
+ install_requires=[
+- 'future',
+ ],
+ license="MIT",
+ )
diff --git a/dev-python/pefile/pefile-2022.5.30-r1.ebuild b/dev-python/pefile/pefile-2022.5.30-r1.ebuild
new file mode 100644
index 000000000000..cc72cfce3ddc
--- /dev/null
+++ b/dev-python/pefile/pefile-2022.5.30-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+DESCRIPTION="Module to read and work with Portable Executable (PE) files"
+HOMEPAGE="https://github.com/erocarrera/pefile"
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/erocarrera/pefile.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/erocarrera/pefile/releases/download/v${PV}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+
+PATCHES=(
+ "${FILESDIR}/${P}-remove-future.patch"
+)
+
+# Unfortunately there is nothing we can test here. Upstream doesn't ship a test
+# suite inside the release files. The test fixtures in the source repo is
+# encrypted so that only their CI pipeline is able to run the tests.
diff --git a/dev-python/pefile/pefile-9999.ebuild b/dev-python/pefile/pefile-9999.ebuild
index e80b72dea457..9d87a3d62621 100644
--- a/dev-python/pefile/pefile-9999.ebuild
+++ b/dev-python/pefile/pefile-9999.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit distutils-r1
DESCRIPTION="Module to read and work with Portable Executable (PE) files"
@@ -21,9 +21,6 @@ fi
LICENSE="MIT"
SLOT="0"
-RDEPEND="${PYTHON_DEPS}
- dev-python/future[${PYTHON_USEDEP}]"
-
# Unfortunately there is nothing we can test here. Upstream doesn't ship a test
# suite inside the release files. The test fixtures in the source repo is
# encrypted so that only their CI pipeline is able to run the tests.