Использование отельных python2 пакетов для calculate-utils

mhiretskiy
parent c25137112d
commit 536e9549db

@ -64,7 +64,10 @@ RDEPEND="
>=dev-qt/qtxml-${QT_PV}
bluetooth? ( >=dev-qt/qtbluetooth-${QT_PV} )
dbus? (
dev-python/dbus-python[${PYTHON_USEDEP}]
python_targets_python2_7? (
dev-python/dbus-python2[python_targets_python2_7]
)
dev-python/dbus-python[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
>=dev-qt/qtdbus-${QT_PV}
)
declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] )

@ -64,7 +64,10 @@ RDEPEND="
>=dev-qt/qtxml-${QT_PV}
bluetooth? ( >=dev-qt/qtbluetooth-${QT_PV} )
dbus? (
dev-python/dbus-python[${PYTHON_USEDEP}]
python_targets_python2_7? (
dev-python/dbus-python2[python_targets_python2_7]
)
dev-python/dbus-python[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
>=dev-qt/qtdbus-${QT_PV}
)
declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] )

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

@ -0,0 +1,48 @@
# 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.
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1 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[${PYTHON_USEDEP}]"
BDEPEND="${RDEPEND}
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() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

@ -0,0 +1,250 @@
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

@ -0,0 +1,11 @@
<?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>

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

@ -0,0 +1,59 @@
# 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(+)"
inherit distutils-r1 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[${PYTHON_USEDEP}]
>=dev-python/six-1.4.1[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
dev-python/enum34[${PYTHON_USEDEP}]
dev-python/ipaddress[${PYTHON_USEDEP}]
' -2)
$(python_gen_cond_dep '
>=dev-python/cffi-1.8:=[${PYTHON_USEDEP}]
' 'python*')
"
DEPEND="${RDEPEND}
>=dev-python/setuptools-1.0[${PYTHON_USEDEP}]"
S="${WORKDIR}/${MY_PN}-${PV}"
DOCS=( AUTHORS.rst CONTRIBUTING.rst README.rst )
python_configure_all() {
append-cflags $(test-flags-CC -pthread)
}
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

@ -0,0 +1,14 @@
<?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>

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

@ -0,0 +1,76 @@
# 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(+)"
inherit autotools python-r1
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="
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
}
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

@ -0,0 +1,11 @@
<?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>

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

@ -0,0 +1,222 @@
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

@ -0,0 +1,75 @@
# 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(+)"
inherit distutils-r1 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= )
$(python_gen_cond_dep '
dev-python/typing[${PYTHON_USEDEP}]
' -2)
"
DEPEND="${RDEPEND}"
BDEPEND="
>=dev-lang/swig-2.0.9
dev-python/setuptools[${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
distutils-r1_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
distutils-r1_python_compile --openssl="${ESYSROOT}"/usr
}
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

@ -0,0 +1,12 @@
<?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>

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

@ -0,0 +1,12 @@
<?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>

@ -0,0 +1,38 @@
# 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(+)"
inherit distutils-r1
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/pexecpt[python_targets_python2_7]
>=dev-python/ptyprocess-python2-0.5[${PYTHON_USEDEP}]"
DEPEND=""
S="${WORKDIR}/${MY_PN}-${PV}"
python_install() {
distutils-r1_python_install
rm "${D}$(python_get_sitedir)/pexpect/_async.py" || die
}
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

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

@ -0,0 +1,11 @@
<?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>

@ -0,0 +1,31 @@
# 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 distutils-r1
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/ptyprocess[python_targets_python2_7]
"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

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

@ -0,0 +1,12 @@
<?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>

@ -0,0 +1,31 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1
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-python2-0.4.6"
DEPEND="${RDEPEND}"
RESTRICT="test"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

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

@ -0,0 +1,13 @@
<?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>

@ -0,0 +1,27 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1
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}"
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

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

@ -6,10 +6,12 @@ EAPI=5
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="threads(+)"
MY_PN=pymilter
MY_P=$MY_PN-$PV
inherit distutils-r1
SRC_URI="http://downloads.sourceforge.net/project/${PN}/${PN}/${P}/${P}.tar.gz"
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/"
@ -17,6 +19,14 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""
DEPEND="mail-filter/libmilter
>=dev-lang/python-2.5.2"
DEPEND="mail-filter/libmilter"
RDEPEND="${DEPEND}"
RESTRICT="test"
S="${WORKDIR}/${MY_PN}-${PV}"
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

@ -1 +0,0 @@
DIST pymilter-0.9.3.tar.gz 96362 SHA256 fd1e424a25fc40e9908c6ae6b03dae4381e21bd600c80180dd4cc712499cd3c1 SHA512 e43d28ffe6bf73aea8ad712e7aa9b2f5c75e322fab30c3a4da441323c32263c384e2f1205fc440ba8b119c52b83e6aba0c9d8fd5291cb57a20d07c904442955f WHIRLPOOL 6127b01b9cb3d27d02dfd48e40aaf127dd3b307183fae84458b9b3e88524f715ff4b95b5a885abc97ad3782cf9e39133de89ca4d3532c2f0f46c5f0f3e93fe09

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

@ -0,0 +1,13 @@
<?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>

@ -0,0 +1,46 @@
# 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(+)"
inherit distutils-r1 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-1.5.2[${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
distutils-r1_python_prepare_all
}
python_install_all() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

@ -2,10 +2,13 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( pypy3 python{2_7,3_{6,7,8}} )
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1
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/
@ -14,7 +17,7 @@ if [[ ${PV} == *9999* ]]; then
EGIT_REPO_URI="https://github.com/python-ldap/python-ldap.git"
inherit git-r3
else
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
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
@ -26,8 +29,9 @@ IUSE="examples sasl ssl"
# https://github.com/python-ldap/python-ldap/issues/224
RDEPEND="
!dev-python/pyldap
>=dev-python/pyasn1-0.3.7[${PYTHON_USEDEP}]
>=dev-python/pyasn1-modules-0.1.5[${PYTHON_USEDEP}]
!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
@ -37,8 +41,8 @@ BDEPEND="
sasl? ( >=dev-libs/cyrus-sasl-2.1 )
"
distutils_enable_tests pytest
distutils_enable_sphinx Doc
S="${WORKDIR}/${MY_PN}-${PV}"
RESTRICT="test"
python_prepare_all() {
# The live ebuild won't compile if setuptools_scm < 1.16.2 is installed
@ -57,35 +61,12 @@ python_prepare_all() {
distutils-r1_python_prepare_all
}
python_test() {
# Run all tests which don't require slapd
local ignored_tests=(
t_bind.py
t_cext.py
t_edit.py
t_ldapobject.py
t_ldap_options.py
t_ldap_sasl.py
t_ldap_schema_subentry.py
t_ldap_syncrepl.py
t_slapdobject.py
)
pushd Tests >/dev/null || die
pytest -vv ${ignored_tests[@]/#/--ignore } \
|| die "tests failed with ${EPYTHON}"
popd > /dev/null || die
}
python_install() {
distutils-r1_python_install
python_optimize
}
python_install_all() {
if use examples; then
docinto examples
dodoc -r Demo/.
docompress -x /usr/share/doc/${PF}/examples
fi
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

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

@ -0,0 +1,12 @@
--- 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

@ -0,0 +1,18 @@
--- 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,

@ -0,0 +1,19 @@
<?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>

@ -0,0 +1,44 @@
# 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(+)"
inherit distutils-r1
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}
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() {
distutils-r1_python_install_all
rm -r ${D}/usr/share
}

@ -1 +1 @@
DIST soaplib-1.0.0.tar.gz 68722 SHA256 3f92388651ef4595824006094626b0bfa257cc04c53c1e129cea0e851b652dba SHA512 f63a541e55dc7ce9886ee9ef6f6ca24257dce79522a3be3928872de1406063a49c6254b40f184ec488c3ce3975602ad7b99f47602b0960b825d66b0f6aef9e3a WHIRLPOOL e237e1ae9cd916d935ebebefeb87999f748e5706daf0de00c5d83bba17ac83b9e0f943fa1164044511bee83a354dcdb98b00b10b1905c2f2efee46f0ebc3a2ea
DIST soaplib-1.0.0.tar.gz 68722 BLAKE2B f44f431cf23eef36cfb9ea0fbc7dc57e575b770ab78a4008e21a0f244c5cdb8ff0b59d0f9990cc289f121fdb9334d84678ba36801bfa29a02bfec39144ef7a19 SHA512 f63a541e55dc7ce9886ee9ef6f6ca24257dce79522a3be3928872de1406063a49c6254b40f184ec488c3ce3975602ad7b99f47602b0960b825d66b0f6aef9e3a

@ -18,7 +18,7 @@ IUSE="examples"
RDEPEND="
dev-python/lxml
dev-python/pytz
dev-python/pytz-python2
"
DEPEND="${RDEPEND}
dev-python/setuptools

@ -155,16 +155,16 @@ RDEPEND="
net-misc/rsync
dev-python/sudsds[python_targets_python2_7]
net-libs/dslib[python_targets_python2_7]
>=dev-python/pyopenssl-0.14[python_targets_python2_7]
>=dev-python/pyopenssl-python2-0.14
dev-libs/openssl
dev-python/m2crypto[python_targets_python2_7]
dev-python/pytz[python_targets_python2_7]
dev-python/m2crypto-python2
dev-python/pytz-python2
)
gpg? (
app-crypt/gnupg
app-crypt/openpgp-keys-calculate-release
)
>=dev-python/pyxml-0.8[python_targets_python2_7]
>=dev-python/pyxml-0.8
sys-apps/iproute2[-minimal]
sys-apps/pciutils
app-arch/xz-utils
@ -212,31 +212,31 @@ RDEPEND="
server? (
sys-auth/pam_ldap
sys-auth/nss_ldap
dev-python/python-ldap
dev-python/python2-ldap
)
client? (
dev-python/py-smbpasswd
>=dev-python/python-ldap-2.0[ssl,python_targets_python2_7]
>=dev-python/python2-ldap-2.0[ssl]
sys-auth/pam_client
>=sys-auth/pam_ldap-180[ssl]
>=sys-auth/nss_ldap-239
)
qt5? (
dev-python/dbus-python[python_targets_python2_7]
dev-python/dbus-python2
|| (
dev-python/pillow[python_targets_python2_7]
dev-python/imaging[python_targets_python2_7]
)
dev-python/PyQt5[python_targets_python2_7]
dev-python/PyQt5
)
dbus? (
dev-python/dbus-python
dev-python/dbus-python2
)
dev-python/pexpect[python_targets_python2_7]
dev-python/pexpect-python2
!<sys-apps/calculate-lib-2.1.12
!sys-apps/calculate-lib:3

@ -17,8 +17,8 @@ KEYWORDS="amd64 x86"
IUSE=""
RDEPEND="
dev-python/pyasn1[${PYTHON_USEDEP}]
dev-python/pyopenssl[${PYTHON_USEDEP}]
dev-python/pyasn1-python2[${PYTHON_USEDEP}]
dev-python/pyopenssl-python2[${PYTHON_USEDEP}]
>=dev-python/sudsds-1.0.1[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}

@ -38,3 +38,29 @@ mail-client/claws-mail -python_single_target_python2_7
media-gfx/gimp -python -python_single_target_python2_7
net-mail/notmuch -python_targets_python2_7
sys-auth/keystone -python_targets_python2_7
dev-python/cffi -python_targets_python2_7
dev-python/cryptography -python_targets_python2_7
dev-python/dbus-python -python_targets_python2_7
dev-python/m2crypto -python_targets_python2_7
dev-python/pexpect -python_targets_python2_7
dev-python/ptyprocess -python_targets_python2_7
dev-python/pyasn1 -python_targets_python2_7
dev-python/pyasn1-modules -python_targets_python2_7
dev-python/pygobject -python_targets_python2_7
dev-python/pyopenssl -python_targets_python2_7
dev-python/python-ldap -python_targets_python2_7
dev-python/dbus-python -python_targets_python2_7
dev-python/secretstorage -python_targets_python2_7
dev-python/requests -python_targets_python2_7
dev-python/urllib3 -python_targets_python2_7
dev-python/cffi-python2 python_targets_python2_7
dev-python/cryptography-python2 python_targets_python2_7
dev-python/dbus-python2 python_targets_python2_7
dev-python/m2crypto-python2 python_targets_python2_7
dev-python/pexpect-python2 python_targets_python2_7
dev-python/ptyprocess-python2 python_targets_python2_7
dev-python/pyasn1-python2 python_targets_python2_7
dev-python/pyasn1-modules-python2 python_targets_python2_7
dev-python/pyopenssl-python2 python_targets_python2_7
dev-python/python2-ldap python_targets_python2_7
dev-python/dbus-python2 python_targets_python2_7

@ -3,7 +3,7 @@
# $Header: $
EAPI="5"
PYTHON_COMPAT=(python2_7)
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1 eutils
@ -18,8 +18,7 @@ KEYWORDS="amd64 x86"
IUSE=""
DEPEND="!<sys-apps/calculate-client-2.1.12
!<sys-apps/calculate-server-2.1.11
>=dev-lang/python-2.5.2
>=dev-python/python-ldap-2.0[ssl,python_targets_python2_7]
>=dev-python/python2-ldap-2.0[ssl]
>=dev-python/pyxml-0.8"
RDEPEND="${DEPEND}"

@ -40,7 +40,7 @@ DEPEND="=sys-apps/calculate-lib-2.1.12-r4
>=net-mail/dovecot-1.2.0[ldap,pam,ssl(+)]
)
>=mail-filter/procmail-3.22
dev-python/pymilter
dev-python/pymilter-python2
>=mail-mta/postfix-2.2[ldap,pam,ssl,sasl,dovecot-sasl]
)
!calculate_noftp? (
Loading…
Cancel
Save