diff options
author | Tim Harder <radhermit@gentoo.org> | 2019-11-16 21:49:01 -0700 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2019-11-16 22:06:51 -0700 |
commit | 49b1038f628d110714a36e2839d37ebd507efb12 (patch) | |
tree | a389bf8057136aeeb0214cda0ef627c8e6c25678 /app-text/xlsx2csv | |
parent | app-text/docx2txt: drop myself as a maintainer (diff) | |
download | gentoo-49b1038f628d110714a36e2839d37ebd507efb12.tar.gz gentoo-49b1038f628d110714a36e2839d37ebd507efb12.tar.bz2 gentoo-49b1038f628d110714a36e2839d37ebd507efb12.zip |
app-text/xlsx2csv: version bump to 0.7.6
Signed-off-by: Tim Harder <radhermit@gentoo.org>
Diffstat (limited to 'app-text/xlsx2csv')
-rw-r--r-- | app-text/xlsx2csv/Manifest | 1 | ||||
-rw-r--r-- | app-text/xlsx2csv/files/xlsx2csv-0.7.6-tests.patch | 61 | ||||
-rw-r--r-- | app-text/xlsx2csv/xlsx2csv-0.7.6.ebuild | 33 |
3 files changed, 95 insertions, 0 deletions
diff --git a/app-text/xlsx2csv/Manifest b/app-text/xlsx2csv/Manifest index b0b073036996..7dbc902e10fa 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 000000000000..f3e04b827bd0 --- /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 000000000000..a23cd8563014 --- /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 +} |