Skip to content

Commit

Permalink
py-xlsx2csv: new port
Browse files Browse the repository at this point in the history
A working script for xlsx -> csv
  • Loading branch information
kurthindenburg committed Feb 17, 2017
1 parent 58640ae commit bab00f1
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
46 changes: 46 additions & 0 deletions python/py-xlsx2csv/Portfile
@@ -0,0 +1,46 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup python 1.0

name py-xlsx2csv
set real_name xlsx2csv
version 0.7.2
platforms darwin
supported_archs noarch
license GPL-2+
maintainers {khindenburg @kurthindenburg} openmaintainer

description xlsx to csv converter

long_description Converts xslx files to csv format.\
Handles large XLSX files. Fast and easy to use.

homepage https://pypi.python.org/pypi/${real_name}
master_sites pypi:x/${real_name}

worksrcdir ${real_name}-${version}
distfiles ${real_name}-${version}${extract.suffix}

checksums rmd160 ea3757468cbdc86f91c5e9cc7171dc909e6cb5cf \
sha256 7c6c8fa6c2774224d03a6a96049e116822484dccfa3634893397212ebcd23866

# Some issues still with Python 3+
python.versions 27

if {${subport} ne ${name}} {
depends_build port:py${python.version}-setuptools

patchfiles patch-run-python-version.diff
post-patch {
reinplace "s|/usr/bin/env python|${python.bin}|g" ${worksrcpath}/test/run
reinplace "s|__PYTHON_VERSION__|${python.branch}|g" ${worksrcpath}/test/run
}

test.run yes
test.cmd ${python.bin} ${worksrcpath}/test/run
test.env PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
test.target

livecheck.type none
}
11 changes: 11 additions & 0 deletions python/py-xlsx2csv/files/patch-run-python-version.diff
@@ -0,0 +1,11 @@
--- test/run 2015-04-15 01:07:20.000000000 -0400
+++ test/run 2017-02-17 10:05:11.000000000 -0500
@@ -1,7 +1,7 @@
#!/usr/bin/env python

#PYTHON_VERSIONS = ["2.4", "2.7", "3.3"]
-PYTHON_VERSIONS = ["2.6", "2.7"]
+PYTHON_VERSIONS = ["__PYTHON_VERSION__"]

import os
from subprocess import call

0 comments on commit bab00f1

Please sign in to comment.