* [gentoo-commits] repo/gentoo:master commit in: app-text/xlsx2csv/, app-text/xlsx2csv/files/
@ 2019-11-17 5:08 Tim Harder
0 siblings, 0 replies; only message in thread
From: Tim Harder @ 2019-11-17 5:08 UTC (permalink / raw
To: gentoo-commits
commit: 49b1038f628d110714a36e2839d37ebd507efb12
Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 17 04:49:01 2019 +0000
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Sun Nov 17 05:06:51 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49b1038f
app-text/xlsx2csv: version bump to 0.7.6
Signed-off-by: Tim Harder <radhermit <AT> gentoo.org>
app-text/xlsx2csv/Manifest | 1 +
app-text/xlsx2csv/files/xlsx2csv-0.7.6-tests.patch | 61 ++++++++++++++++++++++
app-text/xlsx2csv/xlsx2csv-0.7.6.ebuild | 33 ++++++++++++
3 files changed, 95 insertions(+)
diff --git a/app-text/xlsx2csv/Manifest b/app-text/xlsx2csv/Manifest
index b0b07303699..7dbc902e10f 100644
--- a/app-text/xlsx2csv/Manifest
+++ b/app-text/xlsx2csv/Manifest
@@ -1,2 +1,3 @@
DIST xlsx2csv-0.7.3.tar.gz 201482 BLAKE2B a2268e584097777d28f2565a19d0f271cb694066e1abffffd7578ecf0271efd420af63932eaea4389c062e050da257fa2f7164c9de7cdfa4ab3fd416692e7968 SHA512 855fcce9ae6ec51c46673e085a456d2862912d0da5130fdac34d88e5612c64d2bc0674c13b3bfb6cd6b7017e513fe0924dbb594db543020842705a82b6006e8e
DIST xlsx2csv-0.7.4.tar.gz 212472 BLAKE2B de77f4d199bd5fbb43fb4aa775aed9b36aea4c956846be42e9387b79bf76727ba457a0c54db3b4803376b82af12923f21786aa34d21542e2d6ab354be33ad3f3 SHA512 771af30dce63b64272fc8d4dccbcab2106f60a2c9d33370b4d4034a21606e5726c84d963d59e88e2aa124c60f62fd57831ca5fb442d7540474ff1d688da9aaf6
+DIST xlsx2csv-0.7.6.tar.gz 231283 BLAKE2B d0271c6a82b7ed2825e3224f0e34637db3dacda3fe99c6ef5a087cc8d248592efc169b466514abd18b50f6625e8d9743c812b46ecb6f76ce7d1fdc51dfe34fc4 SHA512 7fc8e0da0c050e12d0cfd73f16ffd9c00f19bf05925b54cc68d6a0858a75db89d52e46312956dfd149e0ec88778f68056942a090db44e6148796fad33fa26489
diff --git a/app-text/xlsx2csv/files/xlsx2csv-0.7.6-tests.patch b/app-text/xlsx2csv/files/xlsx2csv-0.7.6-tests.patch
new file mode 100644
index 00000000000..f3e04b827bd
--- /dev/null
+++ b/app-text/xlsx2csv/files/xlsx2csv-0.7.6-tests.patch
@@ -0,0 +1,61 @@
+--- xlsx2csv-0.7.6/test/run
++++ xlsx2csv-0.7.6/test/run
+@@ -5,8 +5,6 @@
+ import subprocess
+ from io import open
+
+-PYTHON_VERSIONS = ["2.7"]
+-
+ """
+ This test uses sys.stdout.
+ That means this test doesn't verify:
+@@ -16,31 +14,24 @@
+
+ def compare(case, arguments=[]):
+ failed = False
+- for pyver in PYTHON_VERSIONS:
+- ext = "xlsx"
+- if os.path.exists("test/%s.xlsm" % case):
+- ext = "xlsm"
+-
+- if os.name == 'posix':# in case of Linux
+- left = subprocess.check_output(["python%s" %pyver, "./xlsx2csv.py"] + arguments + ["test/%s.%s" %(case, ext)]).decode('utf-8').replace('\r','')
+- elif os.name == 'nt':# in case of Windows
+- # Use py.exe http://blog.python.org/2011/07/python-launcher-for-windows_11.html on Windows
+- left = subprocess.check_output(["py", "-%s" %pyver, "./xlsx2csv.py"] + arguments + ["test/%s.%s" %(case, ext)]).decode('utf-8').replace('\r','')
+- else:
+- print("os.name is unexpected: "+os.name)
+- sys.exit(1)
+-
+- f = open("test/%s.csv" %case, "r", encoding="utf-8", newline="")
+- right = f.read().replace('\r','')
+- f.close()
+-
+- if left != right:
+- print("FAILED: %s %s" %(case, pyver))
+- print(" actual:", left.replace("\r", "\\r").replace("\n", "\\n"))
+- print(" expected:", right.replace("\r", "\\r").replace("\n", "\\n"))
+- failed = True
+- else:
+- print("OK: %s %s" %(case, pyver))
++ ext = "xlsx"
++ if os.path.exists("test/%s.xlsm" % case):
++ ext = "xlsm"
++
++ left = subprocess.check_output(["./xlsx2csv.py"] + arguments + ["test/%s.%s" %(case, ext)]).decode('utf-8').replace('\r','')
++
++ f = open("test/%s.csv" %case, "r", encoding="utf-8", newline="")
++ right = f.read().replace('\r','')
++ f.close()
++
++ if left != right:
++ print("FAILED: %s" % (case,))
++ print(" actual:", left.replace("\r", "\\r").replace("\n", "\\n"))
++ print(" expected:", right.replace("\r", "\\r").replace("\n", "\\n"))
++ failed = True
++ else:
++ print("OK: %s" % (case,))
++
+ if failed:
+ sys.exit(1)
+
diff --git a/app-text/xlsx2csv/xlsx2csv-0.7.6.ebuild b/app-text/xlsx2csv/xlsx2csv-0.7.6.ebuild
new file mode 100644
index 00000000000..a23cd856301
--- /dev/null
+++ b/app-text/xlsx2csv/xlsx2csv-0.7.6.ebuild
@@ -0,0 +1,33 @@
+# 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,3_6,3_7} )
+PYTHON_REQ_USE="xml"
+
+inherit distutils-r1
+
+DESCRIPTION="Convert MS Office xlsx files to CSV"
+HOMEPAGE="https://github.com/dilshod/xlsx2csv/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-lang/perl"
+
+PATCHES=( "${FILESDIR}"/${P}-tests.patch )
+
+python_compile_all() {
+ emake -C man
+}
+
+python_test() {
+ "${PYTHON}" test/run || die "tests failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ doman man/${PN}.1
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-11-17 5:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-17 5:08 [gentoo-commits] repo/gentoo:master commit in: app-text/xlsx2csv/, app-text/xlsx2csv/files/ Tim Harder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox