From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4A6C113835A for ; Sun, 12 Jul 2020 20:19:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F2270E0814; Sun, 12 Jul 2020 20:19:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C2D9FE0806 for ; Sun, 12 Jul 2020 20:19:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 453BB34F6D1 for ; Sun, 12 Jul 2020 20:19:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6C6CA2CE for ; Sun, 12 Jul 2020 20:19:51 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1594585181.eceef75b4e3f0906eb641426efe6e922da77274c.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyfakefs/, dev-python/pyfakefs/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pyfakefs/Manifest dev-python/pyfakefs/files/pyfakefs-4.1.0-openpyxl.patch dev-python/pyfakefs/pyfakefs-4.1.0.ebuild X-VCS-Directories: dev-python/pyfakefs/files/ dev-python/pyfakefs/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: eceef75b4e3f0906eb641426efe6e922da77274c X-VCS-Branch: master Date: Sun, 12 Jul 2020 20:19:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8324fbf7-6b69-4926-9379-7f0397f7bc0a X-Archives-Hash: c5d147e8883c6a32643c27c52622f0be commit: eceef75b4e3f0906eb641426efe6e922da77274c Author: Michał Górny gentoo org> AuthorDate: Sun Jul 12 19:15:22 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Jul 12 20:19:41 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eceef75b dev-python/pyfakefs: Bump to 4.1.0 Signed-off-by: Michał Górny gentoo.org> dev-python/pyfakefs/Manifest | 1 + .../pyfakefs/files/pyfakefs-4.1.0-openpyxl.patch | 38 ++++++++++++++++++++++ dev-python/pyfakefs/pyfakefs-4.1.0.ebuild | 28 ++++++++++++++++ 3 files changed, 67 insertions(+) diff --git a/dev-python/pyfakefs/Manifest b/dev-python/pyfakefs/Manifest index 5df88a33cff..57ba60cb194 100644 --- a/dev-python/pyfakefs/Manifest +++ b/dev-python/pyfakefs/Manifest @@ -1,2 +1,3 @@ DIST pyfakefs-3.7.2.tar.gz 180195 BLAKE2B f1e76b652fc67f630fb45798974dc22455e9e99509829fbcaa479f36887c90207d7b6f087e89c9e113bb44df8c4221dc4676129663740812a9426d84a1d47401 SHA512 33bdbf7e21f1135c0ee048943a4b7dffec96e018285e4ee2e6a1c6a7f9e595e27348c83af3803d80322e7fd12a59985a6bf6342aa6211ba95c74ffa20929fb5a DIST pyfakefs-4.0.2.tar.gz 177627 BLAKE2B a52bd900466203af6170bb9ce92f1e5f73f246d576f12390f5b52224de34fa69a3a4c426319b701953f040e343bcf267e20ea2a33df62c4a46f6397f760330aa SHA512 ba14cbc278ece50142d441b7731b01ba316ba9f11e5d442476e12b8b678490aace9578eb3b2fa2e47d6805795ceaf85574d3c5fb992a098585597c7e96d7143a +DIST pyfakefs-4.1.0.tar.gz 185920 BLAKE2B ee61e5ecda697150374bef035054038aed29e23958c58a3b135aae8dae7b397a194586ef6fd3ae70db1d136572a23a876d7f2dacb7e5814c1bedc9bb4502c3fe SHA512 946e21e34643db2b84e53d14bd9758c8edaa9e5e40b827fd74b245f018e8084995f55256900bf795c23a5aae29f124d9fcb80caf08442f6292adb80ee59d79b4 diff --git a/dev-python/pyfakefs/files/pyfakefs-4.1.0-openpyxl.patch b/dev-python/pyfakefs/files/pyfakefs-4.1.0-openpyxl.patch new file mode 100644 index 00000000000..44b76b0132b --- /dev/null +++ b/dev-python/pyfakefs/files/pyfakefs-4.1.0-openpyxl.patch @@ -0,0 +1,38 @@ +From 1d6fabcaccf8dc716f7a49a67f5342d83ef37976 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sun, 12 Jul 2020 21:26:33 +0200 +Subject: [PATCH] Skip test_write_excel if openpyxl is not installed + +test_write_excel fails if pandas are installed but openpyxl is not. +Adjust the condition around the case appropriately. +--- + pyfakefs/tests/patched_packages_test.py | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/pyfakefs/tests/patched_packages_test.py b/pyfakefs/tests/patched_packages_test.py +index 05ed7ef..f8d8a1a 100644 +--- a/pyfakefs/tests/patched_packages_test.py ++++ b/pyfakefs/tests/patched_packages_test.py +@@ -28,6 +28,11 @@ try: + except ImportError: + xlrd = None + ++try: ++ import openpyxl ++except ImportError: ++ openpyxl = None ++ + + class TestPatchedPackages(fake_filesystem_unittest.TestCase): + def setUp(self): +@@ -57,6 +62,7 @@ class TestPatchedPackages(fake_filesystem_unittest.TestCase): + df = pd.read_excel(path) + assert (df.columns == [1, 2, 3, 4]).all() + ++ if pd is not None and openpyxl is not None: + def test_write_excel(self): + self.fs.create_dir('/foo') + path = '/foo/bar.xlsx' +-- +2.27.0 + diff --git a/dev-python/pyfakefs/pyfakefs-4.1.0.ebuild b/dev-python/pyfakefs/pyfakefs-4.1.0.ebuild new file mode 100644 index 00000000000..f1b37e17b4b --- /dev/null +++ b/dev-python/pyfakefs/pyfakefs-4.1.0.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} pypy3 ) +DISTUTILS_USE_SETUPTOOLS=rdepend +DISTUTILS_IN_SOURCE_BUILD=1 + +inherit distutils-r1 + +DESCRIPTION="a fake file system that mocks the Python file system modules" +HOMEPAGE="https://github.com/jmcgeheeiv/pyfakefs/ https://pypi.org/project/pyfakefs/" +SRC_URI="https://github.com/jmcgeheeiv/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${P}-openpyxl.patch +) + +python_test() { + "${EPYTHON}" -m pyfakefs.tests.all_tests -v || die "tests failed under ${EPYTHON}" +}