From 7bc9c63c9da678a7e6fceb095d56c634afd22c56 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 15 Dec 2019 18:09:03 +0000 Subject: gentoo resync : 15.12.2019 --- dev-python/pylibmc/Manifest | 5 +- .../files/pylibmc-1.6.1-fix-test-failures-r1.patch | 16 +++++ dev-python/pylibmc/pylibmc-1.5.1-r1.ebuild | 1 + dev-python/pylibmc/pylibmc-1.6.1-r1.ebuild | 72 ++++++++++++++++++++++ 4 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 dev-python/pylibmc/files/pylibmc-1.6.1-fix-test-failures-r1.patch create mode 100644 dev-python/pylibmc/pylibmc-1.6.1-r1.ebuild (limited to 'dev-python/pylibmc') diff --git a/dev-python/pylibmc/Manifest b/dev-python/pylibmc/Manifest index 786d347bef9c..7325b8b8fd7d 100644 --- a/dev-python/pylibmc/Manifest +++ b/dev-python/pylibmc/Manifest @@ -1,3 +1,6 @@ +AUX pylibmc-1.6.1-fix-test-failures-r1.patch 516 BLAKE2B b471ca80b11beff5ac0119f5eafaf437a74022c977a884b8bdf4ef2afdb3d535ad6602db9b1206fb6649bf57ffe5bbd17509d3dda3b6604fcfa428b592dbeae3 SHA512 802337b66cbd188cc81208420448da24cecde3c01d435d6814437f0ee31850b6ef8a53f61647740da340a69971e5fe570cc2a8c1b31226e425ce7ff88bca101c DIST pylibmc-1.5.1.tar.gz 69525 BLAKE2B 5039ad7d99a5ca57bd6cf7f00c77cc8bba122fe5852de164df34a71b4f5d1e4fcb428e749a66d384691b74f30b99e000f5cb9cd6479af2fc324d885b0fa59aa7 SHA512 efc40fae9721a6be589f87b66109132d4656725f718e1d63d7d25b9b27790b7c00fc3c7e4e47235895b7127cebc64229ddb284d23d0d903d3a510da7e1ce4549 -EBUILD pylibmc-1.5.1-r1.ebuild 1359 BLAKE2B 40a5af52776362eb34b65726aabe7688ee696ec01e1711f9c1b0058ccdd33e587f5f93eeb63a1311c0812388961312a7246c35b62129a8ab03cb07bffc83f2ad SHA512 9f6c1f0c67b47b072c07eaeae17a57968f24e87b225847f8e7c1e6ee830de39764d6467dc6346dbbf9b8f48b4a785b0939cf894e4d27613bdaeb765086b98eac +DIST pylibmc-1.6.1.tar.gz 72061 BLAKE2B ebaa6f9dfc341d862a8b46bbbf0db1420ff400cb40390f7bee6bf198ff941ad7967b578040ffe1209721ea84a163a39649108a2a23f3dadc2d579db740b2ccf3 SHA512 a3874435389486b29bab5f1d29e5c179d67655d90995bb27fcb7cd46ce7eb3b60117b94f901602f8a65dc0e587d5f8edfcf15e259effd439411adb58ddb7065e +EBUILD pylibmc-1.5.1-r1.ebuild 1386 BLAKE2B a78d6dff1153fa91d85a8dfdca6260a2de047666875bf058677fa90901b66375e55a7940ae563da2699d5176b4c5f4b6589046e00eed67ff1ff9283d2d4861e7 SHA512 551ca4602b3ea65f5025f1e05c82572b3051dc2647b4304309d37c844c24c6cee421e3a8953fd60d150d7ae93b1efaaf5d65bc31475fa192c4460792998c821d +EBUILD pylibmc-1.6.1-r1.ebuild 1980 BLAKE2B 3452c492e8605dc174db2a8b62d1a37849d0bc591cf2f3765904d56c132bede39b6ef3278c4f2ca832bab9a16aa1288fd2f37237404a7f728c88973e5b1bfed8 SHA512 dabbc91ccc9193d164c762b2a012aa5e296b28313262009b46bb70e59d0b6ebd0e6ee544265029975a24c805bc70e95f081841454ab4901393ca26eca190b7a7 MISC metadata.xml 366 BLAKE2B 5dcc369c40a052fcc6ff72c6f8fc46ffc8334c1a91e3f2e8ba8f9bf0bea7414d91833e5627f3d53b10e9d3d9f230b0af333929820a616433ff9d439cae888d2d SHA512 974f19bd4dd8043c07fa0001072e25b553aa82f4b9e9c00e579cb88e8819a4411a04b2e59cace18e0a8e2ce7395057e520b0bc78435865c4536b3de2e402265d diff --git a/dev-python/pylibmc/files/pylibmc-1.6.1-fix-test-failures-r1.patch b/dev-python/pylibmc/files/pylibmc-1.6.1-fix-test-failures-r1.patch new file mode 100644 index 000000000000..0a91fd39266e --- /dev/null +++ b/dev-python/pylibmc/files/pylibmc-1.6.1-fix-test-failures-r1.patch @@ -0,0 +1,16 @@ +diff --git a/src/_pylibmcmodule.c b/src/_pylibmcmodule.c +index 5324d1d..70c18cb 100644 +--- a/src/_pylibmcmodule.c ++++ b/src/_pylibmcmodule.c +@@ -600,6 +600,11 @@ static PyObject *_PylibMC_parse_memcached_value(PylibMC_Client *self, + } + #endif + ++ /* make sure we don't pass a null pointer to _PylibMC_deserialize_native */ ++ if (value == NULL) { ++ value = ""; ++ } ++ + if (self->native_deserialization) { + retval = _PylibMC_deserialize_native(self, NULL, value, size, flags); + } else { diff --git a/dev-python/pylibmc/pylibmc-1.5.1-r1.ebuild b/dev-python/pylibmc/pylibmc-1.5.1-r1.ebuild index dc37a7e064ac..7c3faf97d7e7 100644 --- a/dev-python/pylibmc/pylibmc-1.5.1-r1.ebuild +++ b/dev-python/pylibmc/pylibmc-1.5.1-r1.ebuild @@ -16,6 +16,7 @@ LICENSE="BSD" SLOT="0" KEYWORDS="amd64 x86" IUSE="doc test" +RESTRICT="!test? ( test )" RDEPEND=">=dev-libs/libmemcached-0.32" # Older sphinx versions fail to compile the doc diff --git a/dev-python/pylibmc/pylibmc-1.6.1-r1.ebuild b/dev-python/pylibmc/pylibmc-1.6.1-r1.ebuild new file mode 100644 index 000000000000..374710126548 --- /dev/null +++ b/dev-python/pylibmc/pylibmc-1.6.1-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_{5,6,7,8}} ) + +inherit distutils-r1 + +DESCRIPTION="Libmemcached wrapper written as a Python extension" +HOMEPAGE="http://sendapatch.se/projects/pylibmc/ https://pypi.org/project/pylibmc/" +# One image is missing from the doc at PyPI +# https://github.com/lericson/pylibmc/pull/221 +SRC_URI="https://github.com/lericson/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc test" + +# implementations to use for building docs, separate from PYTHON_COMPAT since +# dev-python/sphinx might not be available everywhere +DOCS_PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) + +RDEPEND=">=dev-libs/libmemcached-0.32" +# Older sphinx versions fail to compile the doc +# https://github.com/sphinx-doc/sphinx/issues/3266 +BDEPEND="${RDEPEND} + doc? ( $(python_gen_cond_dep ' + >=dev-python/sphinx-1.5.1-r1[${PYTHON_USEDEP}]' "${DOCS_PYTHON_COMPAT[@]}") + ) + test? ( + net-misc/memcached + dev-python/nose[${PYTHON_USEDEP}] + )" + +RESTRICT="!test? ( test )" + +REQUIRED_USE="doc? ( || ( $(python_gen_useflags "${DOCS_PYTHON_COMPAT[@]}") ) )" + +PATCHES=( + "${FILESDIR}/pylibmc-1.6.1-fix-test-failures-r1.patch" +) + +pkg_setup() { + use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( "${DOCS_PYTHON_COMPAT[@]}" ) +} + +python_prepare_all() { + sed -e "/with-info=1/d" -i setup.cfg || die + + # some amazon thing, expects to be in AWS + rm tests/test_autoconf.py || die + distutils-r1_python_prepare_all +} + +python_compile_all() { + if use doc; then + # This variable is added to sys.path + # but it does not seem to be useful + PYLIBMC_DIR="." emake -C docs + HTML_DOCS=( docs/_build/html/. ) + fi +} + +python_test() { + distutils_install_for_testing + memcached -d -p 11219 -u nobody -l localhost -P "${T}/m.pid" || die + MEMCACHED_PORT=11219 nosetests -v + local ret=${?} + kill "$(<"${T}/m.pid")" || die + [[ ${ret} == 0 ]] || die "Tests fail with ${EPYTHON}!" +} -- cgit v1.2.3