Удаление python2

mhiretskiy
parent 72174bba59
commit 15eb40b43f

@ -1 +0,0 @@
DIST PyQt5-5.14.2.tar.gz 3246557 BLAKE2B 0dd57da76dede97349c1af1d97cebad430dd5ae03c99b71de2e1ef1c41c1503820b0c0b1af8ddb507ffa5d6f466f7d3012db2cf625dad949dc4c962fb9e8a6a3 SHA512 56d9b2970ff50f2af0bfd889ad1226bf64087a6210cc545c5a0188352d1651343fcda9d53f04b041273f61bf31baf43af4a1854c1b580d50c28cff82f59c24ec

@ -1,208 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
inherit multibuild python2 qmake-utils
DESCRIPTION="Python bindings for the Qt framework"
HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/intro"
MY_PN=PyQt5
MY_P=${MY_PN}-${PV/_pre/.dev}
if [[ ${PV} == *_pre* ]]; then
SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
else
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
fi
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~ppc ~ppc64 x86"
RESTRICT="test"
# TODO: QtNfc, QtRemoteObjects
IUSE="bluetooth dbus debug declarative designer examples gles2-only gui help location
multimedia network networkauth opengl positioning printsupport sensors serialport
sql +ssl svg testlib webchannel webkit websockets widgets x11extras xmlpatterns"
# The requirements below were extracted from configure.py
# and from the output of 'grep -r "%Import " "${S}"/sip'
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
bluetooth? ( gui )
declarative? ( gui network )
designer? ( widgets )
help? ( gui widgets )
location? ( positioning )
multimedia? ( gui network )
networkauth? ( network )
opengl? ( gui widgets )
positioning? ( gui )
printsupport? ( gui widgets )
sensors? ( gui )
serialport? ( gui )
sql? ( widgets )
svg? ( gui widgets )
testlib? ( widgets )
webchannel? ( network )
webkit? ( gui network printsupport widgets )
websockets? ( network )
widgets? ( gui )
xmlpatterns? ( network )
"
# Minimal supported version of Qt.
QT_PV="5.12:5"
RDEPEND="
!dev-python/PyQt5[python_targets_python2_7]
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/enum34[${PYTHON_USEDEP}]
' -2)
>=dev-python/PyQt5-sip-python2-4.19.20:=
>=dev-qt/qtcore-${QT_PV}
>=dev-qt/qtxml-${QT_PV}
bluetooth? ( >=dev-qt/qtbluetooth-${QT_PV} )
dbus? (
dev-python/dbus-python2[python_targets_python2_7]
>=dev-qt/qtdbus-${QT_PV}
)
declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] )
designer? ( >=dev-qt/designer-${QT_PV} )
gui? ( >=dev-qt/qtgui-${QT_PV}[gles2-only=] )
help? ( >=dev-qt/qthelp-${QT_PV} )
location? ( >=dev-qt/qtlocation-${QT_PV} )
multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[widgets?] )
network? ( >=dev-qt/qtnetwork-${QT_PV}[ssl=] )
networkauth? ( >=dev-qt/qtnetworkauth-${QT_PV} )
opengl? ( >=dev-qt/qtopengl-${QT_PV} )
positioning? ( >=dev-qt/qtpositioning-${QT_PV} )
printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} )
sensors? ( >=dev-qt/qtsensors-${QT_PV} )
serialport? ( >=dev-qt/qtserialport-${QT_PV} )
sql? ( >=dev-qt/qtsql-${QT_PV} )
svg? ( >=dev-qt/qtsvg-${QT_PV} )
testlib? ( >=dev-qt/qttest-${QT_PV} )
webchannel? ( >=dev-qt/qtwebchannel-${QT_PV} )
webkit? ( dev-qt/qtwebkit:5[printsupport] )
websockets? ( >=dev-qt/qtwebsockets-${QT_PV} )
widgets? ( >=dev-qt/qtwidgets-${QT_PV} )
x11extras? ( >=dev-qt/qtx11extras-${QT_PV} )
xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
"
DEPEND="${RDEPEND}
>=dev-python/sip-python2-4.19.20
dbus? ( virtual/pkgconfig )
"
S=${WORKDIR}/${MY_P}
pyqt_use_enable() {
use "$1" || return
if [[ $# -eq 1 ]]; then
echo --enable=Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}
else
shift
echo ${@/#/--enable=}
fi
}
src_configure() {
configuration() {
local myconf=(
"${PYTHON}"
"${S}"/configure.py
$(usex debug '--debug --qml-debug --trace' '')
--verbose
--confirm-license
--qmake="$(qt5_get_bindir)"/qmake
--bindir="${EPREFIX}/usr/bin"
--qsci-api
--enable=QtCore
--enable=QtXml
--sip=${EPREFIX}/usr/bin/sip2.7
$(pyqt_use_enable bluetooth)
$(pyqt_use_enable dbus QtDBus)
$(usex dbus '' --no-python-dbus)
$(pyqt_use_enable declarative QtQml QtQuick $(usex widgets QtQuickWidgets ''))
$(usex declarative '' --no-qml-plugin)
$(pyqt_use_enable designer)
$(usex designer '' --no-designer-plugin)
$(usex gles2-only '--disable-feature=PyQt_Desktop_OpenGL' '')
$(pyqt_use_enable gui)
$(pyqt_use_enable gui $(use gles2-only && echo _QOpenGLFunctions_ES2 || echo _QOpenGLFunctions_{2_0,2_1,4_1_Core}))
$(pyqt_use_enable help)
$(pyqt_use_enable location)
$(pyqt_use_enable multimedia QtMultimedia $(usex widgets QtMultimediaWidgets ''))
$(pyqt_use_enable network)
$(pyqt_use_enable networkauth QtNetworkAuth)
$(pyqt_use_enable opengl QtOpenGL)
$(pyqt_use_enable positioning)
$(pyqt_use_enable printsupport QtPrintSupport)
$(pyqt_use_enable sensors)
$(pyqt_use_enable serialport QtSerialPort)
$(pyqt_use_enable sql)
$(usex ssl '' '--disable-feature=PyQt_SSL')
$(pyqt_use_enable svg)
$(pyqt_use_enable testlib QtTest)
$(pyqt_use_enable webchannel QtWebChannel)
$(pyqt_use_enable webkit QtWebKit QtWebKitWidgets)
$(pyqt_use_enable websockets QtWebSockets)
$(pyqt_use_enable widgets)
$(pyqt_use_enable x11extras QtX11Extras)
$(pyqt_use_enable xmlpatterns QtXmlPatterns)
)
echo "${myconf[@]}"
"${myconf[@]}" || die
# Fix parallel install failure
if python_is_python3; then
sed -i -e '/INSTALLS += distinfo/i distinfo.depends = install_subtargets install_pep484_stubs install_qscintilla_api' \
${MY_PN}.pro || die
else
sed -i -e '/INSTALLS += distinfo/i distinfo.depends = install_subtargets install_qscintilla_api' \
${MY_PN}.pro || die
fi
# Run eqmake to respect toolchain and build flags
eqmake5 -recursive ${MY_PN}.pro
}
python_foreach_impl run_in_build_dir configuration
}
src_compile() {
python_foreach_impl run_in_build_dir default
}
src_install() {
installation() {
local tmp_root=${D}/${MY_PN}_tmp_root
emake INSTALL_ROOT="${tmp_root}" install
local bin_dir=${tmp_root}${EPREFIX}/usr/bin
local exe
for exe in pylupdate5 pyrcc5 pyuic5; do
python_doexe "${bin_dir}/${exe}"
rm "${bin_dir}/${exe}" || die
done
local uic_dir=${tmp_root}$(python_get_sitedir)/${MY_PN}/uic
if python_is_python3; then
rm -r "${uic_dir}"/port_v2 || die
else
rm -r "${uic_dir}"/port_v3 || die
fi
multibuild_merge_root "${tmp_root}" "${D}"
python_optimize
}
python_foreach_impl run_in_build_dir installation
rm -r ${D}/usr/share
rm -r ${D}/usr/bin
rm -r ${D}/usr/lib/python-exec
rm -r ${D}/usr/lib*/qt5
}

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>qt@gentoo.org</email>
<name>Gentoo Qt Project</name>
</maintainer>
<use>
<flag name="bluetooth">Build bindings for the QtBluetooth module</flag>
<flag name="dbus">Build bindings for the QtDBus module</flag>
<flag name="declarative">Build bindings for the QtQml/QtQuick modules and enable the qmlscene plugin</flag>
<flag name="designer">Build bindings for the QtDesigner module and enable the designer plugin</flag>
<flag name="gui">Build bindings for the QtGui module</flag>
<flag name="help">Build bindings for the QtHelp module</flag>
<flag name="location">Build bindings for the QtLocation module</flag>
<flag name="multimedia">Build bindings for the QtMultimedia module</flag>
<flag name="network">Build bindings for the QtNetwork module</flag>
<flag name="networkauth">Build bindings for the QtNetworkAuth module</flag>
<flag name="opengl">Build bindings for the QtOpenGL module</flag>
<flag name="positioning">Build bindings for the QtPositioning module</flag>
<flag name="printsupport">Build bindings for the QtPrintSupport module</flag>
<flag name="sensors">Build bindings for the QtSensors module</flag>
<flag name="serialport">Build bindings for the QtSerialPort module</flag>
<flag name="sql">Build bindings for the QtSql module</flag>
<flag name="svg">Build bindings for the QtSvg module</flag>
<flag name="testlib">Build bindings for the QtTest module</flag>
<flag name="webchannel">Build bindings for the QtWebChannel module</flag>
<flag name="webkit">Build bindings for the QtWebKit module</flag>
<flag name="websockets">Build bindings for the QtWebSockets module</flag>
<flag name="widgets">Build bindings for the QtWidgets module</flag>
<flag name="x11extras">Build bindings for the QtX11Extras module</flag>
<flag name="xmlpatterns">Build bindings for the QtXmlPatterns module</flag>
</use>
<upstream>
<maintainer status="active">
<email>phil@riverbankcomputing.com</email>
<name>Phil Thompson</name>
</maintainer>
<doc>https://www.riverbankcomputing.com/static/Docs/PyQt5/</doc>
<bugs-to>mailto:pyqt@riverbankcomputing.com</bugs-to>
<remote-id type="pypi">PyQt5</remote-id>
</upstream>
</pkgmetadata>

@ -1 +0,0 @@
DIST sip-4.19.22.tar.gz 1050805 BLAKE2B 7382fdf74c5bb8b55bcedae74acdcb7b81ef06a64d129a9e6f11a5eb293900e37df513f1c4290f2299f49a5bd97e2a6b3c6bc32ddbf2eaf848bd5e5c5dc25edc SHA512 4d366e589945e589f69a3caf979076ef37e319ac0efdd8ec3cee4869da89e112832462215ca2e235036bacfade7efc4d530aa93e7492c283dc1b2503e08feea5

@ -1,92 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
inherit python2 toolchain-funcs
DESCRIPTION="Private sip module for PyQt5"
HOMEPAGE="https://www.riverbankcomputing.com/software/sip/intro"
MY_PN=sip
MY_P=${MY_PN}-${PV/_pre/.dev}
SRC_URI="ftp://ftp.calculate-linux.org/calculate/source/${MY_PN}/${MY_P}.tar.gz
http://mirror.yandex.ru/calculate/source/${MY_PN}/${MY_P}.tar.gz"
# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h
SLOT="0/12"
LICENSE="|| ( GPL-2 GPL-3 SIP )"
KEYWORDS="amd64 arm arm64 ~ppc ~ppc64 x86"
IUSE=""
RESTRICT="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="${PYTHON_DEPS}
!dev-python/PyQt5-sip[python_targets_python2_7]
"
RDEPEND="${DEPEND}
!<dev-python/PyQt5-5.12.2
"
S=${WORKDIR}/${MY_P}
src_prepare() {
# Sub-slot sanity check
local sub_slot=${SLOT#*/}
local sip_api_major_nr=$(sed -nre 's:^#define SIP_API_MAJOR_NR\s+([0-9]+):\1:p' siplib/sip.h || die)
if [[ ${sub_slot} != ${sip_api_major_nr} ]]; then
eerror
eerror "Ebuild sub-slot (${sub_slot}) does not match SIP_API_MAJOR_NR (${sip_api_major_nr})"
eerror "Please update SLOT variable as follows:"
eerror " SLOT=\"${SLOT%%/*}/${sip_api_major_nr}\""
eerror
die "sub-slot sanity check failed"
fi
default
}
src_configure() {
configuration() {
if ! python_is_python3; then
local CFLAGS="${CFLAGS} -fno-strict-aliasing"
fi
local myconf=(
"${PYTHON}"
"${S}"/configure.py
--sip-module PyQt5.sip
--sysroot="${ESYSROOT}/usr"
--no-tools
AR="$(tc-getAR) cqs"
CC="$(tc-getCC)"
CFLAGS="${CFLAGS}"
CFLAGS_RELEASE=
CXX="$(tc-getCXX)"
CXXFLAGS="${CXXFLAGS}"
CXXFLAGS_RELEASE=
LINK="$(tc-getCXX)"
LINK_SHLIB="$(tc-getCXX)"
LFLAGS="${LDFLAGS}"
LFLAGS_RELEASE=
RANLIB=
STRIP=
)
echo "${myconf[@]}"
"${myconf[@]}" || die
}
python_foreach_impl run_in_build_dir configuration
}
src_compile() {
python_foreach_impl run_in_build_dir default
}
src_install() {
installation() {
emake DESTDIR="${D}" install
}
python_foreach_impl run_in_build_dir installation
}

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<upstream>
<maintainer status="active">
<email>phil@riverbankcomputing.com</email>
<name>Phil Thompson</name>
</maintainer>
<changelog>https://www.riverbankcomputing.com/hg/sip/raw-file/tip/NEWS</changelog>
<doc>https://www.riverbankcomputing.com/static/Docs/sip/</doc>
<bugs-to>mailto:pyqt@riverbankcomputing.com</bugs-to>
<remote-id type="pypi">PyQt5-sip</remote-id>
</upstream>
</pkgmetadata>

@ -1 +0,0 @@
DIST certifi-shim-10001.tar.gz 4061 BLAKE2B 183c573b958921877b14e38e9e26842e8a4f1c1617979a30b65ef1e2bbf001e5ff0aab830e4399906a7d21fb3c71ac12b1e757e4d283aae16cced8e7de7c2a1d SHA512 93beea61e579b2b414bd37c63eba49365e0a1a62304e0c7ac920bedaf5d72cb095a4a46b2240b3c2e6ee31e5b91cd520ae8348b6a8033212d11bbca31db6750c

@ -1,41 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=no
PYTHON_COMPAT=( python2_7 )
inherit distutils2
MY_P=certifi-shim-${PV}
DESCRIPTION="Thin replacement for certifi using system certificate store"
HOMEPAGE="
https://github.com/mgorny/certifi-shim
https://pypi.org/project/certifi"
SRC_URI="
https://github.com/mgorny/certifi-shim/archive/v${PV}.tar.gz
-> ${MY_P}.tar.gz"
S=${WORKDIR}/${MY_P}
LICENSE="CC0-1.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
RESTRICT="test"
RDEPEND="
!dev-python/certifi[python_targets_python2_7]
app-misc/ca-certificates"
distutils_enable_tests unittest
src_prepare() {
sed -i -e "s^/etc^${EPREFIX}/etc^" certifi/core.py || die
distutils2_src_prepare
}
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">certifi</remote-id>
</upstream>
</pkgmetadata>

@ -1 +0,0 @@
DIST cffi-1.14.0.tar.gz 463065 BLAKE2B 4d1e8a92241db801848ef8bd05ea15a31c7f61ea426ce4da184aff00df786348d2c76de9dc48898c814478aed9750b665868df24ad39435062cd7e1c84163e52 SHA512 4c5451eeede1d48a8f4b40e25b845ad1863b8bf3bd39624e6c693c2800d89a13efedc4c43b37e317a035613bffc2e3fd5f7e583c46cb283cb5cb930356f86253

@ -1,49 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
# DO NOT ADD pypy to PYTHON_COMPAT
# pypy bundles a modified version of cffi. Use python_gen_cond_dep instead.
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2 toolchain-funcs
MY_PN=cffi
MY_P=$MY_PN-$PV
DESCRIPTION="Foreign Function Interface for Python calling C code"
HOMEPAGE="https://cffi.readthedocs.io/ https://pypi.org/project/cffi/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0/${PV}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="test"
RESTRICT="test"
DEPEND="dev-libs/libffi:="
RDEPEND="${DEPEND}
!dev-python/cffi[python_targets_python2_7]
dev-python/pycparser-python2[${PYTHON_USEDEP}]"
BDEPEND="${RDEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]
virtual/pkgconfig"
distutils_enable_sphinx doc/source
PATCHES=(
"${FILESDIR}"/cffi-0.14.0-g-line.patch
)
S="${WORKDIR}/${MY_PN}-${PV}"
src_configure() {
tc-export PKG_CONFIG
}
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1,250 +0,0 @@
From 19ff1036043ae40ff3d8a2e1a6a793219e1ec378 Mon Sep 17 00:00:00 2001
From: Armin Rigo <arigo@tunes.org>
Date: Tue, 26 May 2020 15:51:56 +0200
Subject: [PATCH] Issue #454
Try harder to avoid #line directives confuse the rest of pre-parsing
---
cffi/cparser.py | 37 ++++++++++++++++++++++++---
testing/cffi0/test_parsing.py | 48 ++++++++++++++++++++++++++++++++++-
2 files changed, 81 insertions(+), 4 deletions(-)
diff --git a/cffi/cparser.py b/cffi/cparser.py
index d7069a73..d9784655 100644
--- a/cffi/cparser.py
+++ b/cffi/cparser.py
@@ -29,6 +29,7 @@ _r_comment = re.compile(r"/\*.*?\*/|//([^\n\\]|\\.)*?$",
_r_define = re.compile(r"^\s*#\s*define\s+([A-Za-z_][A-Za-z_0-9]*)"
r"\b((?:[^\n\\]|\\.)*?)$",
re.DOTALL | re.MULTILINE)
+_r_line_directive = re.compile(r"^[ \t]*#[ \t]*line\b.*$", re.MULTILINE)
_r_partial_enum = re.compile(r"=\s*\.\.\.\s*[,}]|\.\.\.\s*\}")
_r_enum_dotdotdot = re.compile(r"__dotdotdot\d+__$")
_r_partial_array = re.compile(r"\[\s*\.\.\.\s*\]")
@@ -163,10 +164,37 @@ def _warn_for_non_extern_non_static_global_variable(decl):
"with C it should have a storage class specifier "
"(usually 'extern')" % (decl.name,))
+def _remove_line_directives(csource):
+ # _r_line_directive matches whole lines, without the final \n, if they
+ # start with '#line' with some spacing allowed. This function stores
+ # them away and replaces them with exactly the string '#line@N', where
+ # N is the index in the list 'line_directives'.
+ line_directives = []
+ def replace(m):
+ i = len(line_directives)
+ line_directives.append(m.group())
+ return '#line@%d' % i
+ csource = _r_line_directive.sub(replace, csource)
+ return csource, line_directives
+
+def _put_back_line_directives(csource, line_directives):
+ def replace(m):
+ s = m.group()
+ if not s.startswith('#line@'):
+ raise AssertionError("unexpected #line directive "
+ "(should have been processed and removed")
+ return line_directives[int(s[6:])]
+ return _r_line_directive.sub(replace, csource)
+
def _preprocess(csource):
+ # First, remove the lines of the form '#line N "filename"' because
+ # the "filename" part could confuse the rest
+ csource, line_directives = _remove_line_directives(csource)
# Remove comments. NOTE: this only work because the cdef() section
- # should not contain any string literal!
- csource = _r_comment.sub(' ', csource)
+ # should not contain any string literals (except in line directives)!
+ def replace_keeping_newlines(m):
+ return ' ' + m.group().count('\n') * '\n'
+ csource = _r_comment.sub(replace_keeping_newlines, csource)
# Remove the "#define FOO x" lines
macros = {}
for match in _r_define.finditer(csource):
@@ -219,7 +247,10 @@ def _preprocess(csource):
csource = _r_float_dotdotdot.sub(' __dotdotdotfloat__ ', csource)
# Replace all remaining "..." with the same name, "__dotdotdot__",
# which is declared with a typedef for the purpose of C parsing.
- return csource.replace('...', ' __dotdotdot__ '), macros
+ csource = csource.replace('...', ' __dotdotdot__ ')
+ # Finally, put back the line directives
+ csource = _put_back_line_directives(csource, line_directives)
+ return csource, macros
def _common_type_names(csource):
# Look in the source for what looks like usages of types from the
diff --git a/testing/cffi0/test_parsing.py b/testing/cffi0/test_parsing.py
index 3fc3783a..5f2d7ec4 100644
--- a/testing/cffi0/test_parsing.py
+++ b/testing/cffi0/test_parsing.py
@@ -174,7 +174,7 @@ def test_remove_line_continuation_comments():
double // blah \\
more comments
x(void);
- double // blah\\\\
+ double // blah // blah\\\\
y(void);
double // blah\\ \
etc
@@ -185,6 +185,52 @@ def test_remove_line_continuation_comments():
m.y
m.z
+def test_dont_remove_comment_in_line_directives():
+ ffi = FFI(backend=FakeBackend())
+ e = py.test.raises(CDefError, ffi.cdef, """
+ \t # \t line \t 8 \t "baz.c" \t
+
+ some syntax error here
+ """)
+ assert str(e.value) == "parse error\nbaz.c:9:14: before: syntax"
+ #
+ e = py.test.raises(CDefError, ffi.cdef, """
+ #line 7 "foo//bar.c"
+
+ some syntax error here
+ """)
+ assert str(e.value) == "parse error\nfoo//bar.c:8:14: before: syntax"
+
+def test_multiple_line_directives():
+ ffi = FFI(backend=FakeBackend())
+ e = py.test.raises(CDefError, ffi.cdef,
+ """ #line 5 "foo.c"
+ extern int xx;
+ #line 6 "bar.c"
+ extern int yy;
+ #line 7 "baz.c"
+ some syntax error here
+ #line 8 "yadda.c"
+ extern int zz;
+ """)
+ assert str(e.value) == "parse error\nbaz.c:7:14: before: syntax"
+
+def test_commented_line_directive():
+ ffi = FFI(backend=FakeBackend())
+ e = py.test.raises(CDefError, ffi.cdef, """
+ /*
+ #line 5 "foo.c"
+ */
+ void xx(void);
+
+ #line 6 "bar.c"
+ /*
+ #line 35 "foo.c"
+ */
+ some syntax error
+ """)
+ assert str(e.value) == "parse error\nbar.c:9:14: before: syntax"
+
def test_line_continuation_in_defines():
ffi = FFI(backend=FakeBackend())
ffi.cdef("""
--
2.26.2
From 31249d786c833d4960bbbf4e0d7f7bcaecf92d1f Mon Sep 17 00:00:00 2001
From: Armin Rigo <arigo@tunes.org>
Date: Fri, 29 May 2020 10:27:40 +0200
Subject: [PATCH] #454
Second try with '# NUMBER' instead of '#line NUMBER', as gcc seems to output
---
cffi/cparser.py | 8 +++----
testing/cffi0/test_parsing.py | 41 +++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/cffi/cparser.py b/cffi/cparser.py
index d9784655..74830e91 100644
--- a/cffi/cparser.py
+++ b/cffi/cparser.py
@@ -29,7 +29,7 @@ _r_comment = re.compile(r"/\*.*?\*/|//([^\n\\]|\\.)*?$",
_r_define = re.compile(r"^\s*#\s*define\s+([A-Za-z_][A-Za-z_0-9]*)"
r"\b((?:[^\n\\]|\\.)*?)$",
re.DOTALL | re.MULTILINE)
-_r_line_directive = re.compile(r"^[ \t]*#[ \t]*line\b.*$", re.MULTILINE)
+_r_line_directive = re.compile(r"^[ \t]*#[ \t]*(?:line|\d+)\b.*$", re.MULTILINE)
_r_partial_enum = re.compile(r"=\s*\.\.\.\s*[,}]|\.\.\.\s*\}")
_r_enum_dotdotdot = re.compile(r"__dotdotdot\d+__$")
_r_partial_array = re.compile(r"\[\s*\.\.\.\s*\]")
@@ -166,9 +166,9 @@ def _warn_for_non_extern_non_static_global_variable(decl):
def _remove_line_directives(csource):
# _r_line_directive matches whole lines, without the final \n, if they
- # start with '#line' with some spacing allowed. This function stores
- # them away and replaces them with exactly the string '#line@N', where
- # N is the index in the list 'line_directives'.
+ # start with '#line' with some spacing allowed, or '#NUMBER'. This
+ # function stores them away and replaces them with exactly the string
+ # '#line@N', where N is the index in the list 'line_directives'.
line_directives = []
def replace(m):
i = len(line_directives)
diff --git a/testing/cffi0/test_parsing.py b/testing/cffi0/test_parsing.py
index 5f2d7ec4..a5e45874 100644
--- a/testing/cffi0/test_parsing.py
+++ b/testing/cffi0/test_parsing.py
@@ -199,6 +199,21 @@ def test_dont_remove_comment_in_line_directives():
some syntax error here
""")
+ #
+ assert str(e.value) == "parse error\nfoo//bar.c:8:14: before: syntax"
+ ffi = FFI(backend=FakeBackend())
+ e = py.test.raises(CDefError, ffi.cdef, """
+ \t # \t 8 \t "baz.c" \t
+
+ some syntax error here
+ """)
+ assert str(e.value) == "parse error\nbaz.c:9:14: before: syntax"
+ #
+ e = py.test.raises(CDefError, ffi.cdef, """
+ # 7 "foo//bar.c"
+
+ some syntax error here
+ """)
assert str(e.value) == "parse error\nfoo//bar.c:8:14: before: syntax"
def test_multiple_line_directives():
@@ -214,6 +229,18 @@ def test_multiple_line_directives():
extern int zz;
""")
assert str(e.value) == "parse error\nbaz.c:7:14: before: syntax"
+ #
+ e = py.test.raises(CDefError, ffi.cdef,
+ """ # 5 "foo.c"
+ extern int xx;
+ # 6 "bar.c"
+ extern int yy;
+ # 7 "baz.c"
+ some syntax error here
+ # 8 "yadda.c"
+ extern int zz;
+ """)
+ assert str(e.value) == "parse error\nbaz.c:7:14: before: syntax"
def test_commented_line_directive():
ffi = FFI(backend=FakeBackend())
@@ -229,6 +256,20 @@ def test_commented_line_directive():
*/
some syntax error
""")
+ #
+ assert str(e.value) == "parse error\nbar.c:9:14: before: syntax"
+ e = py.test.raises(CDefError, ffi.cdef, """
+ /*
+ # 5 "foo.c"
+ */
+ void xx(void);
+
+ # 6 "bar.c"
+ /*
+ # 35 "foo.c"
+ */
+ some syntax error
+ """)
assert str(e.value) == "parse error\nbar.c:9:14: before: syntax"
def test_line_continuation_in_defines():
--
2.26.2

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<upstream>
<remote-id type="pypi">cffi</remote-id>
</upstream>
</pkgmetadata>

@ -1,2 +0,0 @@
DIST cryptography-2.9.tar.gz 517211 BLAKE2B 3889812dadce01f09c509f5bcdf26405fd1cd2de7064cdbf0f68338894cf65dfe0c6a607867db614b35ad11da4546af2371cf59836dbbbd3037db84241cf71ec SHA512 7db2846b901e42ddc4caa9851235e5a0894ef702d4c4692eb60fcae17bc4e7833782a8001679ea41b78f9273d7d68a4b85810248590e12ca33cfade3208e2849
DIST cryptography_vectors-2.9.tar.gz 35140661 BLAKE2B 870245659f6a64566f823116d8b4ba017981eb41148e9dcde9cac372eb6703a7b4580040b487cd8773160d5bd989fa9d5bb1788ac550b28e76bde8c9f6cd56c7 SHA512 025ed48855f182b926e3eeb5dca1033eb7f43c419bd6ea71accfed38b4d9ef4cbbf5af60bc28a39e3d6723de2d4091bd226e30c0e572a2e0d43a95a12c1bb7a2

@ -1,55 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2 flag-o-matic
MY_PN=cryptography
MY_P=$MY_PN-$PV
VEC_P=cryptography_vectors-${PV}
DESCRIPTION="Library providing cryptographic recipes and primitives"
HOMEPAGE="https://github.com/pyca/cryptography/ https://pypi.org/project/cryptography/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz
test? ( mirror://pypi/c/cryptography_vectors/${VEC_P}.tar.gz )"
LICENSE="|| ( Apache-2.0 BSD )"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="libressl idna test"
RESTRICT="test"
# the openssl 1.0.2l-r1 needs to be updated again :(
# It'd theb be able to go into the || section again
#=dev-libs/openssl-1.0.2l-r1:0
# the following is the original section, disallowing bindist entirely
#!libressl? ( >=dev-libs/openssl-1.0.2:0=[-bindist(-)] )
RDEPEND="
!dev-python/cryptography[python_targets_python2_7]
!libressl? ( >=dev-libs/openssl-1.0.2o-r6:0= )
libressl? ( >=dev-libs/libressl-2.8:0= )
idna? ( >=dev-python/idna-2.1[${PYTHON_USEDEP}] )
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>=dev-python/six-python2-1.4.1[${PYTHON_USEDEP}]
dev-python/enum34[${PYTHON_USEDEP}]
dev-python/ipaddress[${PYTHON_USEDEP}]
>=dev-python/cffi-python2-1.8:=[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_PN}-${PV}"
DOCS=( AUTHORS.rst CONTRIBUTING.rst README.rst )
python_configure_all() {
append-cflags $(test-flags-CC -pthread)
}
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<use>
<flag name="idna">enable support for the old, deprecated IDNA specification (RFC 3490)</flag>
</use>
<upstream>
<remote-id type="pypi">cryptography</remote-id>
<remote-id type="github">pyca/cryptography</remote-id>
</upstream>
</pkgmetadata>

@ -1 +0,0 @@
DIST cython-0.29.21.gh.tar.gz 2088511 BLAKE2B 7a4ddabb65a519d3c71454ac8417438a3a9c46b47489c18e7c7e82ffcb5d5f2f0c5246d0b364f8317d374c53f0c83844c73c7d2ef6b9f75f10707aaf2931ce41 SHA512 2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679

@ -1,79 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2 toolchain-funcs elisp-common
MY_PN=cython
MY_P=$MY_PN-$PV
DESCRIPTION="A Python to C compiler"
HOMEPAGE="https://cython.org https://pypi.org/project/Cython/
https://github.com/cython/cython"
SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${MY_P}.gh.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
IUSE="emacs"
RESTRICT="test"
RDEPEND="
!dev-python/cython[python_targets_python2_7]
emacs? ( >=app-editors/emacs-23.1:* )
"
BDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
${RDEPEND}"
PATCHES=(
"${FILESDIR}/cython-0.29.14-sphinx-update.patch"
)
S="${WORKDIR}/${MY_PN}-${PV}"
SITEFILE=50cython-gentoo.el
python_compile() {
# Python gets confused when it is in sys.path before build.
local -x PYTHONPATH=
distutils2_python_compile
}
python_compile_all() {
use emacs && elisp-compile Tools/cython-mode.el
}
python_test() {
tc-export CC
# https://github.com/cython/cython/issues/1911
local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
"${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
|| die "Tests fail with ${EPYTHON}"
}
python_install_all() {
local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
distutils2_python_install_all
if use emacs; then
elisp-install ${PN} Tools/cython-mode.*
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
rm -r ${D}/usr/share
rm -r ${D}/usr/bin
}
pkg_postinst() {
use emacs && elisp-site-regen
}
pkg_postrm() {
use emacs && elisp-site-regen
}

@ -1,11 +0,0 @@
;;; site-lisp configuration for cython-mode
(add-to-list 'load-path "@SITELISP@")
(autoload 'cython-mode "cython-mode" "Major mode for editing Cython files" t)
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.pxi\\'" . cython-mode))

@ -1,13 +0,0 @@
diff --git a/docs/conf.py b/docs/conf.py
index 10662e28c..a84e0b928 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -41,7 +41,7 @@ highlight_language = 'cython'
extensions = [
'ipython_console_highlighting',
'cython_highlighting',
- 'sphinx.ext.pngmath',
+ 'sphinx.ext.imgmath',
'sphinx.ext.todo',
'sphinx.ext.intersphinx',
'sphinx.ext.autodoc'

@ -1,29 +0,0 @@
Needed to prevent a loop while calling cythonize on macOS - or any platform
defaulting to the 'spawn' method, as Python 3.8 does on Darwin.
https://github.com/cython/cython/pull/3263
From 15ae78bb74a856836dd64828326f4f0812d36520 Mon Sep 17 00:00:00 2001
From: Marcel Bargull <marcel.bargull@udo.edu>
Date: Fri, 6 Dec 2019 18:21:19 +0100
Subject: [PATCH] Disable parallel cythonization for "spawn" start method.
---
Cython/Build/Dependencies.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
index 593e00a6ef..f9b9c15bc5 100644
--- a/Cython/Build/Dependencies.py
+++ b/Cython/Build/Dependencies.py
@@ -1073,6 +1073,11 @@ def copy_to_build_dir(filepath, root=os.getcwd()):
if N <= 1:
nthreads = 0
+ if nthreads:
+ import multiprocessing
+ if multiprocessing.get_start_method() == 'spawn':
+ print('Disabling parallel cythonization for "spawn" process start method.')
+ nthreads = 0
if nthreads:
import multiprocessing
pool = multiprocessing.Pool(

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<longdescription lang="en">
Cython is a language that makes writing C extensions for the Python
language as easy as Python itself. It's based on Pyrex, but supports
more cutting edge functionality and optimizations.
</longdescription>
<upstream>
<remote-id type="pypi">Cython</remote-id>
<remote-id type="github">cython/cython</remote-id>
</upstream>
</pkgmetadata>

@ -1 +0,0 @@
DIST dbus-python-1.2.16.tar.gz 576701 BLAKE2B 58d9f9ea092cd3a6b872c084a6159baf03f1aab615282e161a0e3da1d01ff5f4940862e693d21907b0c146d285b9067386759a1306ae2e6907f5e2ff4ef9944d SHA512 e76c00c5fd3fe6884e4c24f258987fd3b80d21bd4e0f96aa8fda152078a860b62321324f6efcbfe7226d5ab2521a14b5bda7cf2468d2cae5f376c124a71aa05c

@ -1,76 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit autotools python2
MY_PN=dbus-python
MY_P=$MY_PN-$PV
DESCRIPTION="Python bindings for the D-Bus messagebus"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/DBusBindings https://dbus.freedesktop.org/doc/dbus-python/"
SRC_URI="https://dbus.freedesktop.org/releases/${MY_PN}/${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
IUSE="examples"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="test"
RDEPEND="${PYTHON_DEPS}
!dev-python/dbus-python[python_targets_python2_7]
>=sys-apps/dbus-1.8:=
>=dev-libs/glib-2.40
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
virtual/pkgconfig
"
S="${WORKDIR}/${MY_PN}-${PV}"
src_prepare() {
default
# Update py-compile, bug 529502.
eautoreconf
python_copy_sources
}
src_configure() {
local SPHINX_IMPL=${EPYTHON}
configuring() {
local myconf=(
--disable-documentation
)
[[ ${EPYTHON} == ${SPHINX_IMPL} ]] &&
myconf+=( --enable-documentation )
econf "${myconf[@]}"
}
python_foreach_impl run_in_build_dir configuring
}
src_compile() {
python_foreach_impl run_in_build_dir default
}
src_test() {
unset DBUS_SESSION_BUS_ADDRESS
python_foreach_impl run_in_build_dir default
}
src_install() {
python_foreach_impl run_in_build_dir default
find "${D}" -name '*.la' -type f -delete || die
rm -r ${D}/usr/share
rm -r ${D}/usr/include
rm -r ${D}/usr/lib*/pkgconfig
}

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
</pkgmetadata>

@ -1 +0,0 @@
DIST enum34-1.1.6.tar.gz 40048 BLAKE2B 3960e78f27f3ebf70e9aac5c4ced87d974cc61e5d9afe5d787188e3e877eece18153036035187e4d7ad63bf2a54c1c393f0f46f5ef7bcc9b67658b4ea441bb7b SHA512 51652525adc37bd1af1d81933f965dba9c508838d9f759c80ca1392991515a29c2c0263264a4e175b37a6ba11dca68c354774e448b19ef1bdba96be5474d93ec

@ -1,30 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
DESCRIPTION="Python 3.4 Enum backported"
HOMEPAGE="https://pypi.org/project/enum34/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc"
DEPEND="dev-python/setuptools-python2[${PYTHON_USEDEP}]"
python_test() {
"${PYTHON}" enum/test.py || die "Tests failed under ${EPYTHON}"
}
python_install_all() {
use doc && local DOCS=( enum/doc/. enum/README )
distutils2_python_install_all
}

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<upstream>
<remote-id type="pypi">enum34</remote-id>
<remote-id type="cpe">cpe:/a:python:enum34</remote-id>
</upstream>
</pkgmetadata>

@ -1 +0,0 @@
DIST faulthandler-3.0.tar.gz 55577 BLAKE2B 8c4157393eb912d3f0e42ab6b942390a0ba2c068559ab8b66e6e3d961a2f7750f9cab000429feba46c0f9cc0a81ac2c8570d092ead1dcec8ea4e76e555cd1a8b SHA512 9e31682338e572e77e22a510637877c3e27440bc451854a898c5e58238d28a1bbf824cb2b44d1f1f11d8a4f491ddc299982a3d452eebec38bc2a03a824bac392

@ -1,33 +0,0 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_PN=faulthandler
MY_P=$MY_PN-$PV
DESCRIPTION="functions to dump Python tracebacks explicitly (on fault, user signal, timeout)"
HOMEPAGE="https://github.com/haypo/faulthandler https://pypi.org/project/faulthandler/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="amd64 ppc ppc64 x86"
IUSE=""
RESTRICT="test"
DEPEND="dev-python/setuptools-python2[${PYTHON_USEDEP}]"
RDEPEND="
!dev-python/${MY_PN}[python_targets_python2_7]
"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<herd>maintainer-wanted</herd>
</maintainer>
<upstream>
<remote-id type="github">haypo/faulthandler</remote-id>
<remote-id type="pypi">faulthandler</remote-id>
</upstream>
</pkgmetadata>

@ -1 +0,0 @@
DIST ipaddress-1.0.23.tar.gz 32958 BLAKE2B 96f8f3065aaa082c67c5468598e78bf928653588333f8f96c47aafea30c6aa5e3abf419f98e6388b9791a8f7e679f7fb31f36bb1d6a274a19b0e8ea434a8cbc1 SHA512 340e2a8698df1868038f55889671442eba17f06ec3f493759d8d0a9bf406eefbe1f67c14ca616f52e5bf2280942dcece7e89fb19de0923bee1ee20e60f48896e

@ -1,31 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
DESCRIPTION="IPv4/IPv6 manipulation library, backport of the ipaddress module"
HOMEPAGE="https://github.com/phihag/ipaddress"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SLOT="0"
LICENSE="PSF-2"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE=""
BDEPEND="dev-python/setuptools-python2[${PYTHON_USEDEP}]"
python_prepare_all() {
sed -i 's:unittest.main():unittest.main(verbosity=2):' \
test_ipaddress.py || die
distutils2_python_prepare_all
}
python_test() {
"${PYTHON}" test_ipaddress.py || die
}

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>prometheanfire@gentoo.org</email>
<name>Matthew Thode</name>
</maintainer>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">ipaddress</remote-id>
<remote-id type="github">phihag/ipaddress</remote-id>
</upstream>
</pkgmetadata>

@ -1 +0,0 @@
DIST lxml-4.5.2.tar.gz 943480 BLAKE2B 11130d2507ff0d61637d7fef2f4b28c5fbbbfe8864504c8f3a231899be4db14e6be65edc6e780719686605663b0c5f76f161beb509dc58d16ee3a9158a7db59c SHA512 146dcb4414b7f0815c5930048d9dc89711bf0a3ee091c89f4475265cdd6f1690a20f82ec24a282a43cff8854f9b960f0cd4430cff79a7506d39ac1baf7770695

@ -1,434 +0,0 @@
From 1804702b5e3c85c1a16014d62365a29d0a6d0c75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Thu, 30 Jan 2020 06:15:27 +0100
Subject: [PATCH] Skip tests failing on PyPy
---
src/lxml/tests/test_elementtree.py | 3 +-
src/lxml/tests/test_errors.py | 3 +-
src/lxml/tests/test_http_io.py | 3 +-
src/lxml/tests/test_nsclasses.py | 3 +-
src/lxml/tests/test_objectify.py | 41 +++++++++++++++++++++++++--
src/lxml/tests/test_xpathevaluator.py | 7 +++--
src/lxml/tests/test_xslt.py | 7 +++--
7 files changed, 56 insertions(+), 11 deletions(-)
diff --git a/src/lxml/tests/test_elementtree.py b/src/lxml/tests/test_elementtree.py
index 78d8964d..f3f28044 100644
--- a/src/lxml/tests/test_elementtree.py
+++ b/src/lxml/tests/test_elementtree.py
@@ -26,7 +26,7 @@ from .common_imports import (
BytesIO, etree, HelperTestCase,
ElementTree, cElementTree, ET_VERSION, CET_VERSION,
filter_by_version, fileInTestDir, canonicalize, tmpfile,
- _str, _bytes, unicode, next, IS_PYTHON2
+ _str, _bytes, unicode, next, IS_PYTHON2, IS_PYPY
)
if cElementTree is not None and (CET_VERSION <= (1,0,7) or sys.version_info[0] >= 3):
@@ -2956,6 +2956,7 @@ class _ETreeTestCaseBase(HelperTestCase):
self.assertEqual('TEST', root2[0].get('{%s}a' % ns_href))
required_versions_ET['test_register_namespace'] = (1,3)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_register_namespace(self):
# ET 1.3+
Element = self.etree.Element
diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py
index c0aee744..33111429 100644
--- a/src/lxml/tests/test_errors.py
+++ b/src/lxml/tests/test_errors.py
@@ -11,7 +11,7 @@ import unittest
import sys, gc, os.path
from lxml import etree
-from .common_imports import HelperTestCase
+from .common_imports import HelperTestCase, IS_PYPY
class ErrorTestCase(HelperTestCase):
@@ -25,6 +25,7 @@ class ErrorTestCase(HelperTestCase):
def test_empty_parse(self):
self.assertRaises(etree.XMLSyntaxError, etree.fromstring, '')
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_element_cyclic_gc_none(self):
# test if cyclic reference can crash etree
Element = self.etree.Element
diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
index f9eff39a..edf2bd81 100644
--- a/src/lxml/tests/test_http_io.py
+++ b/src/lxml/tests/test_http_io.py
@@ -11,10 +11,11 @@ import textwrap
import sys
import gzip
-from .common_imports import etree, HelperTestCase, BytesIO, _bytes
+from .common_imports import etree, HelperTestCase, BytesIO, _bytes, IS_PYPY
from .dummy_http_server import webserver, HTTPRequestCollector
+@unittest.skipIf(IS_PYPY, "broken on pypy")
class HttpIOTestCase(HelperTestCase):
etree = etree
diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
index a0aa608d..5aa5dc48 100644
--- a/src/lxml/tests/test_nsclasses.py
+++ b/src/lxml/tests/test_nsclasses.py
@@ -9,7 +9,7 @@ from __future__ import absolute_import
import unittest
-from .common_imports import etree, HelperTestCase, _bytes, make_doctest
+from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY
class ETreeNamespaceClassesTestCase(HelperTestCase):
@@ -46,6 +46,7 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
self.Namespace('ns02').clear()
self.Namespace('ns03').clear()
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_ns_classes(self):
bluff_dict = {'bluff' : self.bluff_class}
maeh_dict = {'maeh' : self.maeh_class}
diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
index a12ae7e1..83ba4ced 100644
--- a/src/lxml/tests/test_objectify.py
+++ b/src/lxml/tests/test_objectify.py
@@ -9,7 +9,8 @@ from __future__ import absolute_import
import unittest, operator
from .common_imports import (
- etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO
+ etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO,
+ IS_PYPY
)
from lxml import objectify
@@ -213,11 +214,13 @@ class ObjectifyTestCase(HelperTestCase):
expected.update(DEFAULT_NSMAP)
self.assertEqual(root.value.nsmap, expected)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_date_element_efactory_text(self):
# ObjectifiedDataElement can also be used as E-Factory
value = objectify.ObjectifiedDataElement('test', 'toast')
self.assertEqual(value.text, 'testtoast')
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_date_element_efactory_tail(self):
# ObjectifiedDataElement can also be used as E-Factory
value = objectify.ObjectifiedElement(objectify.ObjectifiedDataElement(), 'test', 'toast')
@@ -374,6 +377,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertEqual("4", getattr(root.c1, "{}c2").text)
self.assertEqual("0", getattr(root.c1, "c2").text)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_setattr(self):
for val in [
2, 2**32, 1.2, "Won't get fooled again",
@@ -809,6 +813,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertEqual(3, len(root.findall(".//b")))
self.assertEqual(2, len(root.findall("b")))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_build_tree(self):
root = self.Element('root')
root.a = 5
@@ -838,6 +843,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertEqual(value, None)
self.assertEqual(value.get(XML_SCHEMA_NIL_ATTR), "true")
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_bool(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -871,6 +877,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertTrue(isinstance(value, objectify.BoolElement))
self.assertEqual(value, False)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -878,6 +885,7 @@ class ObjectifyTestCase(HelperTestCase):
root.s = "test"
self.assertTrue(isinstance(root.s, objectify.StringElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_intliteral(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -885,6 +893,7 @@ class ObjectifyTestCase(HelperTestCase):
root.s = "3"
self.assertTrue(isinstance(root.s, objectify.StringElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_floatliteral(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -892,6 +901,7 @@ class ObjectifyTestCase(HelperTestCase):
root.s = "3.72"
self.assertTrue(isinstance(root.s, objectify.StringElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_mul(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -904,6 +914,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertRaises(TypeError, operator.mul, root.s, "honk")
self.assertRaises(TypeError, operator.mul, "honk", root.s)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_add(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -914,6 +925,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertEqual("test" + s, root.s + s)
self.assertEqual(s + "test", s + root.s)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_mod(self):
s = "%d %f %s %r"
el = objectify.DataElement(s)
@@ -979,6 +991,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertTrue(isinstance(value, objectify.StringElement))
self.assertEqual(value, "3.20")
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_ustr(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -986,6 +999,7 @@ class ObjectifyTestCase(HelperTestCase):
root.s = _str("test")
self.assertTrue(isinstance(root.s, objectify.StringElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_ustr_intliteral(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -993,6 +1007,7 @@ class ObjectifyTestCase(HelperTestCase):
root.s = _str("3")
self.assertTrue(isinstance(root.s, objectify.StringElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_ustr_floatliteral(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -1000,6 +1015,7 @@ class ObjectifyTestCase(HelperTestCase):
root.s = _str("3.72")
self.assertTrue(isinstance(root.s, objectify.StringElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_ustr_mul(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -1012,6 +1028,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertRaises(TypeError, operator.mul, root.s, _str("honk"))
self.assertRaises(TypeError, operator.mul, _str("honk"), root.s)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_ustr_add(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -1037,6 +1054,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertTrue(isinstance(value, objectify.StringElement))
self.assertEqual(value, _str("3.20"))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_int(self):
Element = self.Element
root = Element("{objectified}root")
@@ -1053,6 +1071,7 @@ class ObjectifyTestCase(HelperTestCase):
value = objectify.DataElement(123)
self.assertEqual(hash(value), hash(123))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_float(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -1069,6 +1088,7 @@ class ObjectifyTestCase(HelperTestCase):
value = objectify.DataElement(5.5)
self.assertEqual(hash(value), hash(5.5))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_float_precision(self):
# test not losing precision by shortened float str() value
# repr(2.305064300557): '2.305064300557'
@@ -1088,6 +1108,7 @@ class ObjectifyTestCase(HelperTestCase):
s = "2.305064300557"
self.assertEqual(objectify.FloatElement(s), float(s))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_float_precision_consistency(self):
# test consistent FloatElement values for the different instantiation
# possibilities
@@ -1169,6 +1190,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertEqual(value.text, None)
self.assertEqual(value.pyval, None)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_unregistered(self):
Element = self.Element
SubElement = self.etree.SubElement
@@ -1331,6 +1353,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertEqual(["why", "try"],
strs)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_cmp(self):
XML = self.XML
root = XML(_bytes('<root><b>test</b><b>taste</b><b></b><b/></root>'))
@@ -1358,6 +1381,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertEqual(root.b, "")
self.assertEqual("", root.b)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_int_cmp(self):
XML = self.XML
root = XML(_bytes('<root><b>5</b><b>6</b></root>'))
@@ -1380,6 +1404,7 @@ class ObjectifyTestCase(HelperTestCase):
# float + long share the NumberElement implementation with int
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_bool_cmp(self):
XML = self.XML
root = XML(_bytes('<root><b>false</b><b>true</b></root>'))
@@ -2049,6 +2074,7 @@ class ObjectifyTestCase(HelperTestCase):
before = [objectify.getRegisteredTypes()[0].name],
after = [objectify.getRegisteredTypes()[1].name])
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_registered_type_stringify(self):
from datetime import datetime
def parse_date(value):
@@ -2519,46 +2545,55 @@ class ObjectifyTestCase(HelperTestCase):
# E-Factory tests, need to use sub-elements as root element is always
# type-looked-up as ObjectifiedElement (no annotations)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_int(self):
E = objectify.E
root = E.root(E.val(23))
self.assertTrue(isinstance(root.val, objectify.IntElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_float(self):
E = objectify.E
root = E.root(E.val(233.23))
self.assertTrue(isinstance(root.val, objectify.FloatElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_str(self):
E = objectify.E
root = E.root(E.val("what?"))
self.assertTrue(isinstance(root.val, objectify.StringElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_unicode(self):
E = objectify.E
root = E.root(E.val(_str("blöödy häll", encoding="ISO-8859-1")))
self.assertTrue(isinstance(root.val, objectify.StringElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_bool(self):
E = objectify.E
root = E.root(E.val(True))
self.assertTrue(isinstance(root.val, objectify.BoolElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_none(self):
E = objectify.E
root = E.root(E.val(None))
self.assertTrue(isinstance(root.val, objectify.NoneElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_value_concatenation(self):
E = objectify.E
root = E.root(E.val(1, "foo", 2.0, "bar ", True, None))
self.assertTrue(isinstance(root.val, objectify.StringElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_attrib(self):
E = objectify.E
root = E.root(foo="bar")
self.assertEqual(root.get("foo"), "bar")
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_nested(self):
E = objectify.E
DataElement = objectify.DataElement
@@ -2573,6 +2608,7 @@ class ObjectifyTestCase(HelperTestCase):
self.assertTrue(isinstance(root.value[0], objectify.IntElement))
self.assertTrue(isinstance(root.value[1], objectify.FloatElement))
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_subtype(self):
class Attribute(objectify.ObjectifiedDataElement):
def __init__(self):
@@ -2674,7 +2710,8 @@ def test_suite():
suite = unittest.TestSuite()
suite.addTests([unittest.makeSuite(ObjectifyTestCase)])
suite.addTests(doctest.DocTestSuite(objectify))
- suite.addTests([make_doctest('../../../doc/objectify.txt')])
+ if not IS_PYPY:
+ suite.addTests([make_doctest('../../../doc/objectify.txt')])
return suite
if __name__ == '__main__':
diff --git a/src/lxml/tests/test_xpathevaluator.py b/src/lxml/tests/test_xpathevaluator.py
index 13ee97ec..6d162c6d 100644
--- a/src/lxml/tests/test_xpathevaluator.py
+++ b/src/lxml/tests/test_xpathevaluator.py
@@ -8,7 +8,7 @@ from __future__ import absolute_import
import unittest, sys
-from .common_imports import etree, HelperTestCase, _bytes, BytesIO, doctest, make_doctest
+from .common_imports import etree, HelperTestCase, _bytes, BytesIO, doctest, make_doctest, IS_PYPY
class ETreeXPathTestCase(HelperTestCase):
@@ -740,8 +740,9 @@ def test_suite():
suite.addTests([unittest.makeSuite(ETreeXPathExsltTestCase)])
suite.addTests([unittest.makeSuite(ETreeETXPathClassTestCase)])
suite.addTests([doctest.DocTestSuite()])
- suite.addTests(
- [make_doctest('../../../doc/xpathxslt.txt')])
+ if not IS_PYPY:
+ suite.addTests(
+ [make_doctest('../../../doc/xpathxslt.txt')])
return suite
if __name__ == '__main__':
diff --git a/src/lxml/tests/test_xslt.py b/src/lxml/tests/test_xslt.py
index cde23357..41f8d78b 100644
--- a/src/lxml/tests/test_xslt.py
+++ b/src/lxml/tests/test_xslt.py
@@ -17,6 +17,8 @@ from textwrap import dedent
from tempfile import NamedTemporaryFile, mkdtemp
is_python3 = sys.version_info[0] >= 3
+is_pypy = (getattr(sys, 'implementation', None) == 'pypy' or
+ getattr(sys, 'pypy_version_info', None) is not None)
try:
unicode
@@ -2085,8 +2087,9 @@ def test_suite():
suite.addTests([unittest.makeSuite(Py3XSLTTestCase)])
suite.addTests(
[make_doctest('../../../doc/extensions.txt')])
- suite.addTests(
- [make_doctest('../../../doc/xpathxslt.txt')])
+ if not is_pypy:
+ suite.addTests(
+ [make_doctest('../../../doc/xpathxslt.txt')])
return suite
if __name__ == '__main__':
--
2.25.0

@ -1,69 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2 optfeature toolchain-funcs
MY_PN=lxml
MY_P=$MY_PN-$PV
DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
HOMEPAGE="https://lxml.de/ https://pypi.org/project/lxml/ https://github.com/lxml/lxml"
SRC_URI="https://github.com/lxml/lxml/archive/${MY_P}.tar.gz"
S=${WORKDIR}/lxml-${MY_P}
LICENSE="BSD ElementTree GPL-2 PSF-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="+threads"
RESTRICT="test"
# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
RDEPEND="
!dev-python/lxml[python_targets_python2_7]
>=dev-libs/libxml2-2.9.5
>=dev-libs/libxslt-1.1.28"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
dev-python/cython-python2[${PYTHON_USEDEP}]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
DISTUTILS_IN_SOURCE_BUILD=1
PATCHES=(
"${FILESDIR}"/${MY_PN}-4.5.0-tests-pypy.patch
)
python_prepare_all() {
# avoid replacing PYTHONPATH in tests.
sed -i -e '/sys\.path/d' test.py || die
# don't use some random SDK on Darwin
sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \
setupinfo.py || die
distutils2_python_prepare_all
}
python_compile() {
if ! python_is_python3; then
local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
fi
tc-export PKG_CONFIG
distutils2_python_compile
}
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}
pkg_postinst() {
optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup
optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
}

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<upstream>
<remote-id type="pypi">lxml</remote-id>
</upstream>
</pkgmetadata>

@ -1 +0,0 @@
DIST M2Crypto-0.36.0.tar.gz 1127584 BLAKE2B 5cdbbb11ff67d4ddffb2853a72383f3c7f1e1aa53ab84166aeda4fbea1b0d7f506761bb07bf8cb5b36f94bdbeb2ea2b46e0693da8355f81b4bf5c4c1c1cc18b1 SHA512 5b7d6d10c943ff0e09e0e9748d5578e7e0f7659a73de4ba49481152bca05871aef2bfbb869e1636a7cebcf2dd8b9f67fb0d299a833d1d4ebd538031c35d7bca1

@ -1,222 +0,0 @@
From fa56170c7adf5f124a48cf1074390adfc697272c Mon Sep 17 00:00:00 2001
From: Stefan Strogin <stefan.strogin@gmail.com>
Date: Wed, 9 Jan 2019 10:15:08 +0200
Subject: [PATCH] Fix compilation with LibreSSL
---
SWIG/_bio.i | 8 +++++---
SWIG/_evp.i | 2 +-
SWIG/_lib.i | 2 +-
SWIG/_lib11_compat.i | 5 ++++-
SWIG/_m2crypto_wrap.c | 11 ++++++++---
SWIG/_ssl.i | 4 ++--
SWIG/_threads.i | 10 +++++-----
7 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/SWIG/_bio.i b/SWIG/_bio.i
index e85a275..8eada82 100644
--- a/SWIG/_bio.i
+++ b/SWIG/_bio.i
@@ -293,7 +293,7 @@ int bio_should_write(BIO* a) {
}
/* Macros for things not defined before 1.1.0 */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
static BIO_METHOD *
BIO_meth_new( int type, const char *name )
{
@@ -325,11 +325,13 @@ BIO_meth_free( BIO_METHOD *meth )
#define BIO_set_shutdown(b, x) (b)->shutdown = x
#define BIO_get_shutdown(b) (b)->shutdown
#define BIO_set_init(b, x) b->init = x
-#define BIO_get_init(b) (b)->init
#define BIO_set_data(b, x) b->ptr = x
#define BIO_clear_flags(b, x) b->flags &= ~(x)
#define BIO_get_data(b) b->ptr
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#define BIO_get_init(b) (b)->init
+#endif
/* implment custom BIO_s_pyfd */
@@ -515,7 +517,7 @@ static long pyfd_ctrl(BIO *b, int cmd, long num, void *ptr) {
}
void pyfd_init(void) {
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if (!defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL)
methods_fdp = BIO_meth_new(
BIO_get_new_index()|BIO_TYPE_DESCRIPTOR|BIO_TYPE_SOURCE_SINK,
"python file descriptor");
diff --git a/SWIG/_evp.i b/SWIG/_evp.i
index d04e806..6fa9b38 100644
--- a/SWIG/_evp.i
+++ b/SWIG/_evp.i
@@ -19,7 +19,7 @@ Copyright (c) 2009-2010 Heikki Toivonen. All rights reserved.
#include <openssl/rsa.h>
#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
HMAC_CTX *HMAC_CTX_new(void) {
HMAC_CTX *ret = PyMem_Malloc(sizeof(HMAC_CTX));
diff --git a/SWIG/_lib.i b/SWIG/_lib.i
index c84b800..807d5f6 100644
--- a/SWIG/_lib.i
+++ b/SWIG/_lib.i
@@ -512,7 +512,7 @@ int passphrase_callback(char *buf, int num, int v, void *arg) {
%inline %{
void lib_init() {
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
SSLeay_add_all_algorithms();
ERR_load_ERR_strings();
#endif
diff --git a/SWIG/_lib11_compat.i b/SWIG/_lib11_compat.i
index 1ec42dd..4234004 100644
--- a/SWIG/_lib11_compat.i
+++ b/SWIG/_lib11_compat.i
@@ -8,7 +8,7 @@
*/
%{
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#include <string.h>
#include <openssl/engine.h>
@@ -24,6 +24,9 @@ static void *CRYPTO_zalloc(size_t num, const char *file, int line)
return ret;
}
+#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+
#include <openssl/bn.h>
#ifndef BN_F_BN_GENCB_NEW
diff --git a/SWIG/_m2crypto_wrap.c b/SWIG/_m2crypto_wrap.c
index 0f07702..f168822 100644
--- a/SWIG/_m2crypto_wrap.c
+++ b/SWIG/_m2crypto_wrap.c
@@ -3838,7 +3838,7 @@ void threading_cleanup(void) {
#include <ceval.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#include <string.h>
#include <openssl/engine.h>
@@ -3854,6 +3854,9 @@ static void *CRYPTO_zalloc(size_t num, const char *file, int line)
return ret;
}
+#endif
+#ifdef OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
+
#include <openssl/bn.h>
#ifndef BN_F_BN_GENCB_NEW
@@ -5315,7 +5318,7 @@ int bio_should_write(BIO* a) {
}
/* Macros for things not defined before 1.1.0 */
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
static BIO_METHOD *
BIO_meth_new( int type, const char *name )
{
@@ -5347,11 +5350,13 @@ BIO_meth_free( BIO_METHOD *meth )
#define BIO_set_shutdown(b, x) (b)->shutdown = x
#define BIO_get_shutdown(b) (b)->shutdown
#define BIO_set_init(b, x) b->init = x
-#define BIO_get_init(b) (b)->init
#define BIO_set_data(b, x) b->ptr = x
#define BIO_clear_flags(b, x) b->flags &= ~(x)
#define BIO_get_data(b) b->ptr
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#define BIO_get_init(b) (b)->init
+#endif
/* implment custom BIO_s_pyfd */
diff --git a/SWIG/_ssl.i b/SWIG/_ssl.i
index 7257656..40b0582 100644
--- a/SWIG/_ssl.i
+++ b/SWIG/_ssl.i
@@ -27,7 +27,7 @@ typedef unsigned __int64 uint64_t;
#endif
%}
-#if OPENSSL_VERSION_NUMBER >= 0x10100005L
+#if (!defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100005L) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL)
%include <openssl/safestack.h>
#endif
@@ -261,7 +261,7 @@ void ssl_init(PyObject *ssl_err, PyObject *ssl_timeout_err) {
}
const SSL_METHOD *tlsv1_method(void) {
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if (!defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL)
PyErr_WarnEx(PyExc_DeprecationWarning,
"Function TLSv1_method has been deprecated.", 1);
#endif
diff --git a/SWIG/_threads.i b/SWIG/_threads.i
index 69adb9f..fd2285a 100644
--- a/SWIG/_threads.i
+++ b/SWIG/_threads.i
@@ -5,7 +5,7 @@
#include <pythread.h>
#include <openssl/crypto.h>
-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(THREADING) && (OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL))
#define CRYPTO_num_locks() (CRYPTO_NUM_LOCKS)
static PyThread_type_lock lock_cs[CRYPTO_num_locks()];
static long lock_count[CRYPTO_num_locks()];
@@ -13,7 +13,7 @@ static int thread_mode = 0;
#endif
void threading_locking_callback(int mode, int type, const char *file, int line) {
-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(THREADING) && (OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL))
if (mode & CRYPTO_LOCK) {
PyThread_acquire_lock(lock_cs[type], WAIT_LOCK);
lock_count[type]++;
@@ -25,7 +25,7 @@ void threading_locking_callback(int mode, int type, const char *file, int line)
}
unsigned long threading_id_callback(void) {
-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(THREADING) && (OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL))
return (unsigned long)PyThread_get_thread_ident();
#else
return (unsigned long)0;
@@ -35,7 +35,7 @@ unsigned long threading_id_callback(void) {
%inline %{
void threading_init(void) {
-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(THREADING) && (OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL))
int i;
if (!thread_mode) {
for (i=0; i<CRYPTO_num_locks(); i++) {
@@ -50,7 +50,7 @@ void threading_init(void) {
}
void threading_cleanup(void) {
-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(THREADING) && (OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL))
int i;
if (thread_mode) {
CRYPTO_set_locking_callback(NULL);
--
2.20.1

@ -1,74 +0,0 @@
# Copyright 2018-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2 toolchain-funcs
MY_PN="M2Crypto"
DESCRIPTION="A Python crypto and SSL toolkit"
HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="libressl"
RESTRICT="test"
RDEPEND="
!dev-python/m2crypto[python_targets_python2_7]
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )
dev-python/typing-python2
"
DEPEND="${RDEPEND}"
BDEPEND="
>=dev-lang/swig-2.0.9
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
S="${WORKDIR}/${MY_PN}-${PV}"
PATCHES=(
"${FILESDIR}/m2crypto-libressl-0.31.0.patch"
)
swig_define() {
local x
for x; do
if tc-cpp-is-true "defined(${x})"; then
SWIG_FEATURES+=" -D${x}"
fi
done
}
src_prepare() {
# TODO
sed -e 's:test_server_simple_timeouts:_&:' \
-i tests/test_ssl.py || die
distutils2_src_prepare
}
python_compile() {
# setup.py looks at platform.machine() to determine swig options.
# For exotic ABIs, we need to give swig a hint.
local -x SWIG_FEATURES=
# https://bugs.gentoo.org/617946
swig_define __ILP32__
# https://bugs.gentoo.org/674112
swig_define __ARM_PCS_VFP
distutils2_python_compile --openssl="${ESYSROOT}"/usr
}
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<upstream>
<remote-id type="pypi">M2Crypto</remote-id>
<remote-id type="gitlab">m2crypto/m2crypto</remote-id>
</upstream>
</pkgmetadata>

@ -1,4 +0,0 @@
DIST numpy-1.16.6.zip 5143340 BLAKE2B 2c31473551aaf00e7d3175ce37463ce0f14ff3e77bdeb71c9f85ede634880e014d4a941b1f1c1bb107f1b01217d6a68cc71d188b7ae3edf833a6fd6a9a746acb SHA512 c219841cc804c194a38b8e046b83265b8b7a35be8f33d68561ef17b085465dd11bd1e84fe1baea809af0efb09a9b13283f13728d125fcdd2221c30ec23fd0a50
DIST numpy-html-1.16.6.zip 12190671 BLAKE2B c24586a40bb05fdb2f2f092778e01f7c60b17d2c695d0fb8577e988778ad80b711edf7e067a20c699946344a50febc152ab586f4653b80bcbeb489650dafbd1b SHA512 ad25e7b91b992af78a6748f12d6fcbe153d96cb8667d5dc4a6b6b2a6105e24a11c32cbf63dd3314ed4aa9b65a55ec5b3a51cd7763af5dfdd133510ddd6e4ed16
DIST numpy-ref-1.16.6.pdf 5183393 BLAKE2B e92a8a7a32ab45d2fdfd6760e62d8d9b5b3f89e202a29e18ef1b6ce49ec56bbfea0e48e0c47b4c35cad02783fa1db33726a0f4fed4a50b0d8ed84babced8b79e SHA512 66dbb684f4140874d19826b479c781e16e7992a7cec46137f785f9a8fa071911966fbb3932cbcdcd040bbb5fbefac8c96d511ef623a57fc268aac9331aae8d22
DIST numpy-user-1.16.6.pdf 621980 BLAKE2B ec735ff7057935d3a7f33f291792b74618f5dc10ee091c434f49c77e58f683821af9cce46286564ac9b8cb0111498f9d1b657d0c343e0a4313c3f895982dca8b SHA512 ff03719c91707a39b4bc388558838f72d4412f34dd0b07f2a0b2cf8fedac6811e8789985013cf1f23c7a650f115655f71e9cadc51ef4e7ae6e49d7552752409a

@ -1,76 +0,0 @@
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index 65d7de316..a85640d30 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -364,29 +364,7 @@ def get_info(name, notfound_action=0):
1 - display warning message
2 - raise error
"""
- cl = {'atlas': atlas_info, # use lapack_opt or blas_opt instead
- 'atlas_threads': atlas_threads_info, # ditto
- 'atlas_blas': atlas_blas_info,
- 'atlas_blas_threads': atlas_blas_threads_info,
- 'lapack_atlas': lapack_atlas_info, # use lapack_opt instead
- 'lapack_atlas_threads': lapack_atlas_threads_info, # ditto
- 'atlas_3_10': atlas_3_10_info, # use lapack_opt or blas_opt instead
- 'atlas_3_10_threads': atlas_3_10_threads_info, # ditto
- 'atlas_3_10_blas': atlas_3_10_blas_info,
- 'atlas_3_10_blas_threads': atlas_3_10_blas_threads_info,
- 'lapack_atlas_3_10': lapack_atlas_3_10_info, # use lapack_opt instead
- 'lapack_atlas_3_10_threads': lapack_atlas_3_10_threads_info, # ditto
- 'mkl': mkl_info,
- # openblas which may or may not have embedded lapack
- 'openblas': openblas_info, # use blas_opt instead
- # openblas with embedded lapack
- 'openblas_lapack': openblas_lapack_info, # use blas_opt instead
- 'openblas_clapack': openblas_clapack_info, # use blas_opt instead
- 'blis': blis_info, # use blas_opt instead
- 'lapack_mkl': lapack_mkl_info, # use lapack_opt instead
- 'blas_mkl': blas_mkl_info, # use blas_opt instead
- 'accelerate': accelerate_info, # use blas_opt instead
- 'x11': x11_info,
+ cl = {'x11': x11_info,
'fft_opt': fft_opt_info,
'fftw': fftw_info,
'fftw2': fftw2_info,
@@ -731,10 +709,7 @@ class system_info(object):
return [b for b in [a.strip() for a in libs.split(',')] if b]
def get_libraries(self, key='libraries'):
- if hasattr(self, '_lib_names'):
- return self.get_libs(key, default=self._lib_names)
- else:
- return self.get_libs(key, '')
+ return self.get_libs(key, '')
def library_extensions(self):
c = customized_ccompiler()
@@ -1685,7 +1660,7 @@ class blas_info(system_info):
lib = self.has_cblas(info)
if lib is not None:
info['language'] = 'c'
- info['libraries'] = [lib]
+ info['libraries'] = lib
info['define_macros'] = [('HAVE_CBLAS', None)]
self.set_info(**info)
@@ -1717,16 +1692,16 @@ class blas_info(system_info):
# check for cblas lib, and if not present check for blas lib.
try:
c.link_executable(obj, os.path.join(tmpdir, "a.out"),
- libraries=["cblas"],
+ libraries=info["libraries"],
library_dirs=info['library_dirs'],
extra_postargs=info.get('extra_link_args', []))
- res = "cblas"
+ res = info["libraries"]
except distutils.ccompiler.LinkError:
c.link_executable(obj, os.path.join(tmpdir, "a.out"),
libraries=["blas"],
library_dirs=info['library_dirs'],
extra_postargs=info.get('extra_link_args', []))
- res = "blas"
+ res = ["blas"]
except distutils.ccompiler.CompileError:
res = None
finally:

@ -1,23 +0,0 @@
From b8e741c66f71071c3406e592e1537570731bcb35 Mon Sep 17 00:00:00 2001
From: mattip <matti.picus@gmail.com>
Date: Sun, 26 May 2019 08:55:53 +0300
Subject: [PATCH] BUG: setup.py install --skip-build fails
---
numpy/distutils/command/install_clib.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/numpy/distutils/command/install_clib.py b/numpy/distutils/command/install_clib.py
index 662aa00bda9..6a73f7e3308 100644
--- a/numpy/distutils/command/install_clib.py
+++ b/numpy/distutils/command/install_clib.py
@@ -19,6 +19,9 @@ def finalize_options(self):
def run (self):
build_clib_cmd = get_cmd("build_clib")
+ if not build_clib_cmd.build_clib:
+ # can happen if the user specified `--skip-build`
+ build_clib_cmd.finalize_options()
build_dir = build_clib_cmd.build_clib
# We need the compiler to get the library name -> filename association

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>sci@gentoo.org</email>
<name>Gentoo Science Project</name>
</maintainer>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
</pkgmetadata>

@ -1,155 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
FORTRAN_NEEDED=lapack
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2 flag-o-matic fortran-2 multiprocessing toolchain-funcs
MY_PN="numpy"
DOC_PV="1.16.6"
DESCRIPTION="Fast array and numerical python library"
HOMEPAGE="https://www.numpy.org"
SRC_URI="
mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.zip
doc? (
https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-html.zip -> numpy-html-${DOC_PV}.zip
https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-ref.pdf -> numpy-ref-${DOC_PV}.pdf
https://numpy.org/doc/$(ver_cut 1-2 ${DOC_PV})/numpy-user.pdf -> numpy-user-${DOC_PV}.pdf
)"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="doc lapack"
RESTRICT="test"
RDEPEND="
!<dev-python/numpy-1.17
lapack? (
virtual/cblas
virtual/lapack
)
"
DEPEND="${RDEPEND}"
BDEPEND="
app-arch/unzip
dev-python/setuptools-python2
lapack? ( virtual/pkgconfig )
"
S="${WORKDIR}/${MY_PN}-${PV}"
PATCHES=(
"${FILESDIR}"/${MY_PN}-1.15.4-no-hardcode-blas.patch
"${FILESDIR}"/numpy-1.16.5-setup.py-install-skip-build-fails.patch
)
src_unpack() {
default
if use doc; then
unzip -qo "${DISTDIR}"/numpy-html-${DOC_PV}.zip -d html || die
fi
}
pc_incdir() {
$(tc-getPKG_CONFIG) --cflags-only-I $@ | \
sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
}
pc_libdir() {
$(tc-getPKG_CONFIG) --libs-only-L $@ | \
sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
}
pc_libs() {
$(tc-getPKG_CONFIG) --libs-only-l $@ | \
sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
-e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
| tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
}
python_prepare_all() {
if use lapack; then
append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
local incdir="${EPREFIX}"/usr/include
local libdir="${EPREFIX}"/usr/$(get_libdir)
cat >> site.cfg <<-EOF || die
[blas]
include_dirs = $(pc_incdir cblas):${incdir}
library_dirs = $(pc_libdir cblas blas):${libdir}
blas_libs = $(pc_libs cblas blas)
[lapack]
library_dirs = $(pc_libdir lapack):${libdir}
lapack_libs = $(pc_libs lapack)
EOF
else
export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
fi
export CC="$(tc-getCC) ${CFLAGS}"
append-flags -fno-strict-aliasing
# See progress in http://projects.scipy.org/scipy/numpy/ticket/573
# with the subtle difference that we don't want to break Darwin where
# -shared is not a valid linker argument
if [[ ${CHOST} != *-darwin* ]]; then
append-ldflags -shared
fi
# only one fortran to link with:
# linking with cblas and lapack library will force
# autodetecting and linking to all available fortran compilers
append-fflags -fPIC
if use lapack; then
NUMPY_FCONFIG="config_fc --noopt --noarch"
# workaround bug 335908
[[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
fi
# don't version f2py, we will handle it.
sed -i -e '/f2py_exe/s: + os\.path.*$::' numpy/f2py/setup.py || die
# disable fuzzed tests
find numpy/*/tests -name '*.py' -exec sed -i \
-e 's:def \(.*_fuzz\):def _\1:' {} + || die
# very memory- and disk-hungry
sed -i -e 's:test_large_zip:_&:' numpy/lib/tests/test_io.py || die
distutils2_python_prepare_all
}
python_compile() {
export MAKEOPTS=-j1 #660754
local python_makeopts_jobs=""
python_is_python3 || python_makeopts_jobs="-j $(makeopts_jobs)"
distutils2_python_compile \
${python_makeopts_jobs} \
${NUMPY_FCONFIG}
}
python_install() {
# https://github.com/numpy/numpy/issues/16005
local mydistutilsargs=( build_src )
distutils2_python_install ${NUMPY_FCONFIG}
python_optimize
}
python_install_all() {
local DOCS=( THANKS.txt )
if use doc; then
local HTML_DOCS=( "${WORKDIR}"/html/. )
DOCS+=( "${DISTDIR}"/${MY_PN}-{user,ref}-${DOC_PV}.pdf )
fi
distutils2_python_install_all
}

@ -1 +0,0 @@
DIST pexpect-4.8.0.tar.gz 157037 BLAKE2B 742642bd6b9ec3f6cdfad054d4fd22db56b4a55b746d675c27a8cdf824ea749ec4589e296dffa08778195f3ccd20feb56bc0fd5212984396ea5aa0555c41ca96 SHA512 7447ae2d1e13be422c894a8fd51c5aaa788e37ea7f0c798c88b77afd401fb3631400a637077ccbb83c2e3876b0d0c5e1dbd5fdc9d3739d785b4d5ad7c0192580

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">pexpect</remote-id>
<remote-id type="github">pexpect/pexpect</remote-id>
</upstream>
</pkgmetadata>

@ -1,41 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_PN=pexpect
MY_P=$MY_PN-$PV
DESCRIPTION="Python module for spawning child apps and responding to expected patterns"
HOMEPAGE="https://pexpect.readthedocs.io/ https://pypi.org/project/pexpect/ https://github.com/pexpect/pexpect/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="examples"
RESTRICT="test"
RDEPEND="
!dev-python/pexpect[python_targets_python2_7]
>=dev-python/ptyprocess-python2-0.5[${PYTHON_USEDEP}]"
DEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install() {
distutils2_python_install
rm "${D}$(python_get_sitedir)/pexpect/_async.py" || die
}
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST ply-3.11.tar.gz 159130 BLAKE2B 58c50b9dad445ad83a64aaa8174ed4602b36f5c8df33a7d62590a92388c4a21c9800599c1d4e4db6f02630e8dee4c8482611e26498e4aa8ccdb2cf3453ae1db4 SHA512 37e39a4f930874933223be58a3da7f259e155b75135f1edd47069b3b40e5e96af883ebf1c8a1bbd32f914a9e92cfc12e29fec05cf61b518f46c1d37421b20008

@ -1,24 +0,0 @@
From f50768b0b2176998675e728d84ac05f0eef19614 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Sun, 17 May 2015 12:14:16 -0400
Subject: [PATCH] Catch/ignore IOError when opening picklefile for reading in
yacc.yacc()
Should resolve #66.
---
ply/yacc.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ply/yacc.py b/ply/yacc.py
index eb02cc2..2835c90 100644
--- a/ply/yacc.py
+++ b/ply/yacc.py
@@ -3265,6 +3265,8 @@ def yacc(method='LALR', debug=yaccdebug, module=None, tabmodule=tab_module, star
errorlog.warning(str(e))
except ImportError:
pass
+ except IOError:
+ pass
if debuglog is None:
if debug:

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<longdescription>
PLY is a Python-only implementation of the popular compiler construction
tools lex and yacc. The implementation borrows ideas from a number of
previous efforts; most notably John Aycock's SPARK toolkit. However,
the overall flavor of the implementation is more closely modeled after
the C version of lex and yacc. The other significant feature of PLY is
that it provides extensive input validation and error reporting--much
more so than other Python parsing tools.
</longdescription>
<longdescription lang="ja">
PLYはLexとYaccの有名なコンパイラ・コンストラクション・ツールのPython言語実装です
。この実装は以前の試みから幾つものアイディアを借りています。そのほとんどがJohn AycockのSPARKツールキットからです。しかしながら、実装の全体像はC言語によるLexとYaccにより近いモデルです。PLYの他の重要点は幅広い入力バリデーションとエラー報告を提供する点です。 -- その二点は他のPython言語パーサーより優れています。
</longdescription>
<upstream>
<remote-id type="pypi">ply</remote-id>
</upstream>
</pkgmetadata>

@ -1,34 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_PN=ply
MY_P=$MY_PN-$PV
DESCRIPTION="Python Lex-Yacc library"
HOMEPAGE="http://www.dabeaz.com/ply/ https://pypi.org/project/ply/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0/$PV"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
RESTRICT="test"
PATCHES=( "${FILESDIR}/3.6-picklefile-IOError.patch" )
RDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
!dev-python/ply[python_targets_python2_7]
"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST ptyprocess-0.6.0.tar.gz 70115 BLAKE2B 02499e560c4df2f852d0951a9acfcb88a2bfe659592ead0304bb6a240e831fb093dd40a457714a8a91d1af70b5364b7af91d2c14c956d8a84d3eeec3eb2a9edf SHA512 b34b6bca977f09d1443b210e338e1300e12d6ef35857f9543b3a116ef3b500ad4844357a7a283321756f886af41bddb1f02b27bf200ef1e82a96fd9e431bed86

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<upstream>
<remote-id type="pypi">ptyprocess</remote-id>
<remote-id type="github">pexpect/ptyprocess</remote-id>
</upstream>
</pkgmetadata>

@ -1,32 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_SETUPTOOLS=no
PYTHON_COMPAT=( python2_7 )
inherit distutils2
MY_PN=ptyprocess
MY_P=$MY_PN-$PV
DESCRIPTION="Run a subprocess in a pseudo terminal"
HOMEPAGE="https://github.com/pexpect/ptyprocess"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="ISC"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
RESTRICT="test"
RDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
!dev-python/ptyprocess[python_targets_python2_7]
"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST smbpasswd-1.0.2.tgz 13503 BLAKE2B b7c1409c7e28a70f43608d54b527096c990e02786eb30b1a99ff5a869acbf160c241ebdf8e725d32cf37210c8e7e3166f9cb7582336851c6f31257717de9b9b5 SHA512 2136e14343037bdd014765c28b9e152c8edc774ce7cf531b0784148db42e88e3abc402389e9b58b2ed938681f42715783504f4854ffe269b02419f13979a7d6c

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
</pkgmetadata>

@ -1,25 +0,0 @@
# Copyright 1999-2020 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_P="${PN#py-}-${PV}"
DESCRIPTION="Module capable of generating both LANMAN and NT password hashes, for e.g. Samba"
HOMEPAGE="https://barryp.org/software/py-smbpasswd/"
SRC_URI="https://barryp.org/static/media/software/download/${PN}/${PV}/${MY_P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ia64 ppc sparc x86"
DEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
S="${WORKDIR}/${MY_P}"

@ -1 +0,0 @@
DIST pyasn1-modules-0.2.8.tar.gz 242864 BLAKE2B 22b6cc27d45d19d8e7f5b12c8aeff1fa379bd567fda6b1dc0fafd00c0f4367d32f21cd48cf3cba140f2f11ba7d258140e8014c8420300451ab1acff475d28da7 SHA512 fdfcaa065deffdd732deaa1fa30dec2fc4a90ffe15bd12de40636ce0212f447611096d2f4e652ed786b5c47544439e6a93721fabe121f3320f13965692a1ca5b

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">pyasn1-modules</remote-id>
<remote-id type="sourceforge">pyasn1</remote-id>
</upstream>
</pkgmetadata>

@ -1,36 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_PN=pyasn1-modules
MY_P=$MY_PN-$PV
DESCRIPTION="pyasn1 modules"
HOMEPAGE="http://snmplabs.com/pyasn1/ https://github.com/etingof/pyasn1-modules/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
RDEPEND="
!dev-python/pyasn1-modules[python_targets_python2_7]
>=dev-python/pyasn1-python2-0.4.6"
DEPEND="${RDEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
RESTRICT="test"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST pyasn1-0.4.8.tar.gz 146820 BLAKE2B 5c00b47c2014e599d1aa2e14c3004b3688786c7afd160c85709d5a0f324166abb1d29ebbd9f3e13100166e7176710e4dc6e1b8fcf80db5f5bdaa202912f8a023 SHA512 e64e70b325c8067f87ace7c0673149e82fe564aa4b0fa146d29b43cb588ecd6e81b1b82803b8cfa7a17d3d0489b6d88b4af5afb3aa0052bf92e8a1769fe8f7b0

@ -1,13 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">pyasn1</remote-id>
<remote-id type="sourceforge">pyasn1</remote-id>
<remote-id type="github">etingof/pyasn1</remote-id>
</upstream>
</pkgmetadata>

@ -1,33 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_PN=pyasn1
MY_P=$MY_PN-$PV
DESCRIPTION="ASN.1 library for Python"
HOMEPAGE="http://snmplabs.com/pyasn1/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
RESTRICT="test"
S="${WORKDIR}/${MY_PN}-${PV}"
RDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
!dev-python/pyasn1[python_targets_python2_7]
"
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST pycairo-1.18.2.tar.gz 200462 BLAKE2B 1f755dc90fe3ee50aa68273a0816752312f144831ff857709e1a4695a58646ffe6be518733480ed37231c213a11d4e5aaf8dfd1cfa68104873bc7d4192435b89 SHA512 279ea80413ba55d493d51455685da09afa1f5c45e2930c3fca3e417a8afe6645a0d8131201f79482de59e5ec56cfef62eac65ed88fe88866bfcc06503dcc59e0

@ -1,26 +0,0 @@
From 3ecf0a4060d6de3b92a77a393ece663455cf6add Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Sun, 10 May 2020 11:22:40 +0200
Subject: [PATCH] tests: Fix syntax issue with Python 3.9
https://bugs.python.org/issue40246
I haven't actually tested with 3.9 yet, so this is just what I found
with grep.
---
tests/test_enums.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_enums.py b/tests/test_enums.py
index 4bc2e3d..02756d0 100644
--- a/tests/test_enums.py
+++ b/tests/test_enums.py
@@ -79,7 +79,7 @@ def get_prefix(t):
# special case..
if name == "PathDataType":
name = "Path"
- return"_".join([s.upper() for s in re.findall('[A-Z][^A-Z]*', name)])
+ return "_".join([s.upper() for s in re.findall('[A-Z][^A-Z]*', name)])
for t in types_:
for name in dir(t):

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
</pkgmetadata>

@ -1,46 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_PN=pycairo
MY_P=$MY_PN-$PV
DESCRIPTION="Python bindings for the cairo library"
HOMEPAGE="https://www.cairographics.org/pycairo/ https://github.com/pygobject/pycairo"
SRC_URI="https://github.com/pygobject/${MY_PN}/releases/download/v${PV}/${MY_P}.tar.gz"
LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE=""
RESTRICT="test"
RDEPEND="
!dev-python/${MY_PN}[python_targets_python2_7]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>=x11-libs/cairo-1.13.1[svg]
"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_PN}-${PV}"
distutils_enable_sphinx docs \
dev-python/sphinx_rtd_theme
distutils_enable_tests setup.py
python_install() {
distutils2_python_install \
install_pkgconfig --pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
}
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
rm -r ${D}/usr/lib*/pkgconfig
rm -r ${D}/usr/include
}

@ -1 +0,0 @@
DIST pycparser-2.20.tar.gz 161330 BLAKE2B 9a114e4b73e6c3c495bd78c393957146ec425eb5b15d72266cbf424f15e8d2e2e6402ef36d60a9dff41b393aab80fe1356befd25549517f398e129836a76b037 SHA512 ff0853c9f981b43b4f2e879350715c07b02cf9dab223d4980d8fe0a3138c98041b5f848a9355ae4f1cb45e7f137c03a88843008e18d77af9250e0d9c55f5ca1b

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<upstream>
<remote-id type="pypi">pycparser</remote-id>
<remote-id type="github">eliben/pycparser</remote-id>
</upstream>
</pkgmetadata>

@ -1,56 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_PN=pycparser
MY_P=$MY_PN-$PV
DESCRIPTION="C parser and AST generator written in Python"
HOMEPAGE="https://github.com/eliben/pycparser"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
RESTRICT="test"
S="${WORKDIR}/${MY_PN}-${PV}"
RDEPEND="
!dev-python/${MY_PN}[python_targets_python2_7]
dev-python/ply-python2:=[${PYTHON_USEDEP}]"
BDEPEND="${RDEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]"
python_prepare_all() {
# remove the original files to guarantee their regen
rm pycparser/{c_ast,lextab,yacctab}.py || die
# kill sys.path manipulations to force the tests to use built files
sed -i -e '/sys\.path/d' tests/*.py || die
distutils2_python_prepare_all
}
python_compile() {
distutils2_python_compile
# note: tables built by py3.5+ are incompatible with older versions
# because of 100 group limit of 're' module -- just generate them
# separately optimized for each target instead
pushd "${BUILD_DIR}"/lib/pycparser > /dev/null || die
"${PYTHON}" _build_tables.py || die
popd > /dev/null || die
}
python_install() {
distutils2_python_install
# setup.py generates {c_ast,lextab,yacctab}.py with bytecode disabled.
python_optimize
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST pyinotify-0.9.6.tar.gz 60998 BLAKE2B 7fb55cfe5b2c02682b5842d95859a58f218ab591a4eee689b707e804c6fe8cde4cc1fb3dfbf54a044ff743deefa0ee5551bc6e27ca4dda1c608218a6c24597b2 SHA512 b52de43293b06b32236e90b7c33fac061f3095cd7d4aecec89a099d56020db1a85440ab9dcc8b521238c001fc49a1f37d1b16d621bc1acab4d7273aebcaadbc5

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
</pkgmetadata>

@ -1,38 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_PN=pyinotify
MY_P=$MY_PN-$PV
DESCRIPTION="Python module used for monitoring filesystems events"
HOMEPAGE="
http://trac.dbzteam.org/pyinotify
https://pypi.org/project/pyinotify/
https://github.com/seb-m/pyinotify/"
SRC_URI="http://seb.dbzteam.org/pub/pyinotify/releases/${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux"
RESTRICT="test"
RDEPEND="
!dev-python/${MY_PN}[python_targets_python2_7]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1,10 +0,0 @@
# ChangeLog for dev-python/pymilter
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
*pymilter-0.9.3 (20 May 2010)
20 May 2010; Mike Hiretsky (mhiretskiy) <mh@calculate.ru>
+pymilter-0.9.3.ebuild:
Bump version.

@ -1 +0,0 @@
DIST pymilter-0.9.3.tar.gz 96362 BLAKE2B fbe5805277434e0bdaf875f9761c36bd460f6304d53d82843ae9245723b2c6c58bd14bfd117c4404650ac9dcb84190a2e400632b112655c0c14f73156dc25a68 SHA512 e43d28ffe6bf73aea8ad712e7aa9b2f5c75e322fab30c3a4da441323c32263c384e2f1205fc440ba8b119c52b83e6aba0c9d8fd5291cb57a20d07c904442955f

@ -1,37 +0,0 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
MY_PN=pymilter
MY_P=$MY_PN-$PV
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
SRC_URI="http://downloads.sourceforge.net/project/${MY_PN}/${MY_PN}/${MY_P}/${MY_P}.tar.gz"
DESCRIPTION="The package of Python milters that wraps the C libmilter library."
HOMEPAGE="http://spidey2.bmsi.com/pymilter/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""
DEPEND="
!dev-python/pymilter[python_targets_python2_7]
mail-filter/libmilter"
RDEPEND="${DEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
RESTRICT="test"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST PyOpenGL-3.1.0.tar.gz 1172688 BLAKE2B 9865a10e8b5d2756192077b4b079658c680b9f47bdaccb33285fb1942bc678b29f6a69359a1486ec023b1a73d714a7e0209b2f57776fe8b5e4a5e2d0803dba4f SHA512 f748017ab3734c7672c3fdbedcea80df297a91a78b111533e260feb0868ebb02935666c041f77db03841ee8f90057d9c53c53b00b097aae4cf67a52c7fc9c2eb

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<upstream>
<remote-id type="pypi">PyOpenGL</remote-id>
<remote-id type="sourceforge">pyopengl</remote-id>
</upstream>
</pkgmetadata>

@ -1,34 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
ORIG_PN=pyopengl
MY_PN="PyOpenGL"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Python OpenGL bindings"
HOMEPAGE="http://pyopengl.sourceforge.net/ https://pypi.org/project/PyOpenGL/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
# mirror://sourceforge/pyopengl/${MY_P}.tar.gz" # broken mirror for this release
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
RESTRICT="test"
IUSE=""
RDEPEND="
!dev-python/${ORIG_PN}[python_targets_python2_7]
media-libs/freeglut
virtual/opengl
x11-libs/libXi
x11-libs/libXmu"
DEPEND="${RDEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]"
S="${WORKDIR}/${MY_P}"

@ -1 +0,0 @@
DIST pyOpenSSL-19.1.0.tar.gz 160510 BLAKE2B e6e39f860221a2696aa3fa32ac89ed48e34b18e4accc366a86264d943a15a1b00ba1a0d8349550d1775d25836aa5d214e1e3fe4ec0a9c0f6d5ab00cd9fede633 SHA512 4acd96f287d72eb11bd812697d28cd6eb6a96a4653248b65f967187830a6b17cc1254775a18a3405469f3d45abdae6f02d165f2f35f035f3174c2826fba82916

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<upstream>
<remote-id type="pypi">pyOpenSSL</remote-id>
<remote-id type="launchpad">pyopenssl</remote-id>
<remote-id type="sourceforge">pyopenssl</remote-id>
<remote-id type="cpe">cpe:/a:pyopenssl:pyopenssl</remote-id>
</upstream>
</pkgmetadata>

@ -1,48 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2 flag-o-matic
MY_PN=pyOpenSSL
MY_P=${MY_PN}-${PV}
DESCRIPTION="Python interface to the OpenSSL library"
HOMEPAGE="
https://www.pyopenssl.org/
https://pypi.org/project/pyOpenSSL/
https://github.com/pyca/pyopenssl
"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
S=${WORKDIR}/${MY_P}
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
RESTRICT="test"
RDEPEND="
!dev-python/pyopenssl[python_targets_python2_7]
>=dev-python/six-python2-1.5.2[${PYTHON_USEDEP}]
dev-python/setuptools-python2[${PYTHON_USEDEP}]
dev-python/cryptography-python2"
DEPEND="${RDEPEND}"
distutils_enable_sphinx doc \
dev-python/sphinx_rtd_theme
python_prepare_all() {
# Requires network access
sed -i -e 's/test_set_default_verify_paths/_&/' tests/test_ssl.py || die
distutils2_python_prepare_all
}
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST python-ldap-3.2.0.tar.gz 367645 BLAKE2B 5109f4a13644d53fff7506ad2417da6dbfd5d1c5d31cc63932338ee0bc7327b00878804764366523fc0610191126c1a1367e15fddbad481880f73d29d96d3322 SHA512 ef2833739fd57ad26d97ae5dba3bca8a47e770ff3f113d06a5bed0841f8fcbbe6cd102e75c753dfff48f5f6041f46a91c6166f3bb9ca44ef9bd643c0666c6b23

@ -1,74 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_PN=python-ldap
MY_P=$MY_PN-$PV
DESCRIPTION="Various LDAP-related Python modules"
HOMEPAGE="https://www.python-ldap.org/en/latest/
https://pypi.org/project/python-ldap/
https://github.com/python-ldap/python-ldap"
if [[ ${PV} == *9999* ]]; then
EGIT_REPO_URI="https://github.com/python-ldap/python-ldap.git"
inherit git-r3
else
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86 ~x86-solaris"
fi
LICENSE="PSF-2"
SLOT="0"
IUSE="examples sasl ssl"
# We do not need OpenSSL, it is never directly used:
# https://github.com/python-ldap/python-ldap/issues/224
RDEPEND="
!dev-python/pyldap
!dev-python/python-ldap[python_targets_python2_7]
>=dev-python/pyasn1-python2-0.3.7[${PYTHON_USEDEP}]
>=dev-python/pyasn1-modules-python2-0.1.5[${PYTHON_USEDEP}]
>net-nds/openldap-2.4.11:=[sasl?,ssl?]
"
# We do not link against cyrus-sasl but we use some
# of its headers during the build.
BDEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>net-nds/openldap-2.4.11:=[sasl?,ssl?]
sasl? ( >=dev-libs/cyrus-sasl-2.1 )
"
S="${WORKDIR}/${MY_PN}-${PV}"
RESTRICT="test"
python_prepare_all() {
# The live ebuild won't compile if setuptools_scm < 1.16.2 is installed
# https://github.com/pypa/setuptools_scm/issues/228
if [[ ${PV} == *9999* ]]; then
rm -r .git || die
fi
if ! use sasl; then
sed -i 's/HAVE_SASL//g' setup.cfg || die
fi
if ! use ssl; then
sed -i 's/HAVE_TLS//g' setup.cfg || die
fi
distutils2_python_prepare_all
}
python_install() {
distutils2_python_install
python_optimize
}
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST pytz-2020.1.tar.gz 311771 BLAKE2B 2d7dd9987fd912dd2a62b5c4ab1667a13f3704ff407796c00fd76b6f3ac4dfcffba9f58740f9456ddfade6c2ef6deacc754f57f5e434b97da36b36fca3024d0f SHA512 4f652ab400bac0bd83ed305be7540094e674029a0cbde7da280adfd911b8c0a44023799b7c61971a5a61a1d6e3992c5b621e5e95bbfe962f310d5f26d4fda3ce

@ -1,12 +0,0 @@
--- a/pytz/__init__.py
+++ b/pytz/__init__.py
@@ -91,8 +91,7 @@
if zoneinfo_dir is not None:
filename = os.path.join(zoneinfo_dir, *name_parts)
else:
- filename = os.path.join(os.path.dirname(__file__),
- 'zoneinfo', *name_parts)
+ filename = os.path.join('/usr/share/zoneinfo', *name_parts)
if not os.path.exists(filename):
# http://bugs.launchpad.net/bugs/383171 - we avoid using this
# unless absolutely necessary to help when a broken version of

@ -1,18 +0,0 @@
--- a/setup.py
+++ b/setup.py
@@ -15,15 +15,8 @@
memail = 'stuart@stuartbishop.net'
packages = ['pytz']
resources = ['zone.tab', 'locales/pytz.pot']
-for dirpath, dirnames, filenames in os.walk(os.path.join('pytz', 'zoneinfo')):
- # remove the 'pytz' part of the path
- basepath = dirpath.split(os.path.sep, 1)[1]
- resources.extend([os.path.join(basepath, filename)
- for filename in filenames])
package_data = {'pytz': resources}
-assert len(resources) > 10, 'zoneinfo files not found!'
-
setup(
name='pytz',
version=pytz.VERSION,

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<herd>maintainer-wanted</herd>
</maintainer>
<longdescription lang="en">
pytz brings the Olson tz database into Python. This library allows
accurate and cross platform timezone calculations using Python 2.3
or higher. It also solves the issue of ambiguous times at the end of
daylight savings, which you can read more about in the Python
Library Reference (datetime.tzinfo).
Amost all (over 540) of the Olson timezones are supported.
</longdescription>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">pytz</remote-id>
</upstream>
</pkgmetadata>

@ -1,46 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2
MY_PN=pytz
MY_P=$MY_PN-$PV
DESCRIPTION="World timezone definitions for Python"
HOMEPAGE="https://pythonhosted.org/pytz/ https://pypi.org/project/pytz/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
IUSE=""
RDEPEND="
!dev-python/pytz[python_targets_python2_7]
|| ( >=sys-libs/timezone-data-2017a sys-libs/glibc[vanilla] )"
DEPEND="${RDEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]
app-arch/unzip"
PATCHES=(
# Use timezone-data zoneinfo.
"${FILESDIR}"/2018.4-zoneinfo.patch
# ...and do not install a copy of it.
"${FILESDIR}"/${PN}-2018.4-zoneinfo-noinstall.patch
)
RESTRICT="test"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST pyxattr-0.6.0.tar.gz 31057 BLAKE2B cf6e99c499dbcc74305970413803e5cf59508e7ee1bf247afe42e576c2dfaf118a374ad6f8721b9d9c482f8be0c222d26b82997dc1ccc79248d5f52b2064ed8d SHA512 c56bf57729b5f8c8e3e19e29fd903b7365c6644abe3dcebf57ffc2f97a1e92d0e22cdc0a967c5abee3a74ba61a2a379e31a1734f45449095bdb7895b8357a9bb

@ -1,53 +0,0 @@
From cc0bc63b291ee1a831f07c81946149dbe8c8146d Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Wed, 10 Jan 2018 11:45:35 +0100
Subject: [PATCH] xattr.c: There is no more attr/xattr.h with >=attr-2.4.48
See also:
http://git.savannah.nongnu.org/cgit/attr.git/commit/?id=7921157890d07858d092f4003ca4c6bae9fd2c38
---
xattr.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/xattr.c b/xattr.c
index 111cec1..c82ee32 100644
--- a/xattr.c
+++ b/xattr.c
@@ -23,10 +23,8 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__linux__)
#include <sys/xattr.h>
-#elif defined(__linux__)
-#include <attr/xattr.h>
#endif
#include <stdio.h>
@@ -642,11 +640,7 @@ get_all(PyObject *self, PyObject *args, PyObject *keywds)
/* Now retrieve the attribute value */
nval = _generic_get(_get_obj, &tgt, s, &buf_val, &nalloc, &io_errno);
if (nval == -1) {
- if (
-#ifdef ENODATA
- io_errno == ENODATA ||
-#endif
- io_errno == ENOATTR) {
+ if (io_errno == ENODATA) {
PyErr_Clear();
continue;
} else {
@@ -1173,8 +1167,7 @@ static char __xattr_doc__[] = \
" a :exc:`EnvironmentError`; under\n"
" Linux, the following ``errno`` values are used:\n"
"\n"
- " - ``ENOATTR`` and ``ENODATA`` mean that the attribute name is\n"
- " invalid\n"
+ " - ``ENODATA`` means that the attribute name is\n invalid\n"
" - ``ENOTSUP`` and ``EOPNOTSUPP`` mean that the filesystem does not\n"
" support extended attributes, or that the namespace is invalid\n"
" - ``E2BIG`` mean that the attribute value is too big\n"
--
2.16.0.rc1

@ -1,42 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2 eutils
DESCRIPTION="Python interface to xattr"
HOMEPAGE="https://pyxattr.k1024.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
https://pyxattr.k1024.org/downloads/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="2.7"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
RESTRICT="test"
RDEPEND="sys-apps/attr
!dev-python/pyxattr:0[python_targets_python2_7]"
DEPEND="${RDEPEND}
dev-python/setuptools-python2[${PYTHON_USEDEP}]
"
PATCHES=(
"${FILESDIR}/${PN}-0.6.0-xattr_header.patch"
)
python_prepare_all() {
sed -i -e 's:, "-Werror"::' setup.py || die
# Bug 548486
sed -e "s:html_theme = 'default':html_theme = 'classic':" \
-i doc/conf.py || die
distutils2_python_prepare_all
}
python_install_all() {
distutils2_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST PyXML-0.8.4.tar.gz 734954 BLAKE2B e052bfd298f7e2016d7077330401d077788e22721b55d7b996f53abdc48b1717472a9d47d5567f7c0d6d53c2ca4933a77743e8248e56128f58b089eac64d0811 SHA512 68d9802a58b8ce90d668d2ba659136dc5377e224fdb837284fdcaf640f28b3bb400bf485d602689905d56121b9ffaa7f7758b4a2f262d1321c8b9890952c8a1e

@ -1,28 +0,0 @@
diff -rupN PyXML-0.8.4-old/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py PyXML-0.8.4/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py
--- PyXML-0.8.4-old/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py 2008-12-15 16:54:36.000000000 +0900
+++ PyXML-0.8.4/xml/xpath/ParsedAbbreviatedAbsoluteLocationPath.py 2008-12-15 16:57:02.000000000 +0900
@@ -24,8 +24,8 @@ class ParsedAbbreviatedAbsoluteLocationP
self._rel = rel
nt = ParsedNodeTest.ParsedNodeTest('node', '')
ppl = ParsedPredicateList.ParsedPredicateList([])
- as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
- self._step = ParsedStep.ParsedStep(as, nt, ppl)
+ as_ = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
+ self._step = ParsedStep.ParsedStep(as_, nt, ppl)
return
def evaluate(self, context):
diff -rupN PyXML-0.8.4-old/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py PyXML-0.8.4/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py
--- PyXML-0.8.4-old/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py 2008-12-15 16:54:36.000000000 +0900
+++ PyXML-0.8.4/xml/xpath/ParsedAbbreviatedRelativeLocationPath.py 2008-12-15 16:58:58.000000000 +0900
@@ -28,8 +28,8 @@ class ParsedAbbreviatedRelativeLocationP
self._right = right
nt = ParsedNodeTest.ParsedNodeTest('node','')
ppl = ParsedPredicateList.ParsedPredicateList([])
- as = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
- self._middle = ParsedStep.ParsedStep(as, nt, ppl)
+ as_ = ParsedAxisSpecifier.ParsedAxisSpecifier('descendant-or-self')
+ self._middle = ParsedStep.ParsedStep(as_, nt, ppl)
def evaluate(self, context):
res = []

@ -1,77 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
DISTUTILS_USE_SETUPTOOLS=manual
inherit distutils2 eutils
MY_P=${P/pyxml/PyXML}
DESCRIPTION="A collection of libraries to process XML with Python"
HOMEPAGE="http://pyxml.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
LICENSE="BSD CNRI MIT PSF-2 public-domain"
# Other licenses:
# BeOpen Python Open Source License Agreement Version 1
# Zope Public License (ZPL) Version 1.0
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc examples"
DEPEND="
dev-python/setuptools-python2[${PYTHON_USEDEP}]
>=dev-libs/expat-1.95.6"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_P}"
python_prepare_all() {
local PATCHES=(
"${FILESDIR}/${P}-python-2.6.patch"
)
distutils2_python_prepare_all
}
python_compile() {
# use the already-installed shared copy of libexpat
distutils2_python_compile --with-libexpat="${EPREFIX}/usr"
}
python_test() {
# Delete internal copy of old version of unittest module.
local BROKENTESTS=(
test_filter
test_howto
test_minidom
test_xmlbuilder
unittest
test_expatreader
)
for test_file in ${BROKENTESTS[@]}; do
test_file="test/${test_file}.py"
einfo "Removing dubious test \"${test_file}\""
rm ${test_file} || die "can't remove ${test_file}"
eend $?
done
cd test || die
"${PYTHON}" regrtest.py || die "Tests fail with ${EPYTHON}"
}
python_install_all() {
local DOCS=( ANNOUNCE CREDITS doc/*.txt )
distutils2_python_install_all
doman doc/man/*
if use doc; then
dohtml -A api,web -r doc/*
dodoc doc/*.tex
fi
use examples && dodoc -r demo
}

@ -1 +0,0 @@
DIST setuptools-46.4.0.zip 865912 BLAKE2B 452d36132f5648c79c7e1616a93ff6a39ab2f64b2864ee397b4f57e7f72c47d418ff274f5decd35b0591b09800ad2a7cbd71c283550bd0e60a4d85744a57d4ec SHA512 31e58fd1d682089a45d23aa07c3c2c4c952ca016fa4c3416b2cba979d8b57369f80baef98ce857912e506e87d6cb456497a1ce1c75a0cdf1ee25d4e753b58726

@ -1,86 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
# Set to 'manual' to avoid triggering install QA check
DISTUTILS_USE_SETUPTOOLS=manual
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="xml(+)"
inherit distutils2
MY_PN=setuptools
MY_P=$MY_PN-$PV
DESCRIPTION="Collection of extensions to Distutils"
HOMEPAGE="https://github.com/pypa/setuptools https://pypi.org/project/setuptools/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
RESTRICT="test"
RDEPEND="
!dev-python/${MY_PN}[python_targets_python2_7]
"
BDEPEND="
app-arch/unzip
"
# installing plugins apparently breaks stuff at runtime, so let's pull
# it early
PDEPEND="
dev-python/certifi-python2
"
S="${WORKDIR}/${MY_PN}-${PV}"
# Force in-source build because build system modifies sources.
DISTUTILS_IN_SOURCE_BUILD=1
DOCS=( {CHANGES,README}.rst docs/{easy_install.txt,pkg_resources.txt,setuptools.txt} )
python_prepare_all() {
# silence the py2 warning that is awfully verbose and breaks some
# packages by adding unexpected output
# (also, we know!)
sed -i -e '/py2_warn/d' pkg_resources/__init__.py || die
# disable tests requiring a network connection
rm setuptools/tests/test_packageindex.py || die
# don't run integration tests
rm setuptools/tests/test_integration.py || die
# xpass-es for me on py3
sed -e '/xfail.*710/s:(:(six.PY2, :' \
-i setuptools/tests/test_archive_util.py || die
# avoid pointless dep on flake8
sed -i -e 's:--flake8::' pytest.ini || die
distutils2_python_prepare_all
}
python_test() {
if ! python_is_python3; then
einfo "Tests are skipped on py2 to untangle deps"
return
fi
distutils_install_for_testing
# test_easy_install raises a SandboxViolation due to ${HOME}/.pydistutils.cfg
# It tries to sandbox the test in a tempdir
HOME="${PWD}" pytest -vv ${PN} || die "Tests failed under ${EPYTHON}"
}
python_install() {
export DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT=1
distutils2_python_install
}
python_install_all() {
rm -r ${D}/usr/share/doc
rm -r ${D}/usr/bin
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save