mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
dev-python/pyfakefs: Bump to 4.1.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -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
|
||||
|
||||
38
dev-python/pyfakefs/files/pyfakefs-4.1.0-openpyxl.patch
Normal file
38
dev-python/pyfakefs/files/pyfakefs-4.1.0-openpyxl.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
From 1d6fabcaccf8dc716f7a49a67f5342d83ef37976 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
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
|
||||
|
||||
28
dev-python/pyfakefs/pyfakefs-4.1.0.ebuild
Normal file
28
dev-python/pyfakefs/pyfakefs-4.1.0.ebuild
Normal file
@@ -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}"
|
||||
}
|
||||
Reference in New Issue
Block a user