Update py-csvkit (#14525)

* Update py-csvkit

This PR updates the py-csvkit package. This version requires a python
stack based on agate and this PR includes the new dependency packages.

- py-agate-dbf
- py-agate-excel
- py-agate-sql
- py-agate
- py-dbfread
- py-isodate
- py-leather
- py-parsedatetime
- py-python-slugify
- py-pytimeparse
- py-text-unidecode

* Replace the copy/pasted apostrophes

Python 2 can not process the copy/pasted apostrophes so replace them
with standard single quote character.

* Add version constraints on dependencies
This commit is contained in:
Glenn Johnson 2020-01-15 22:45:04 -06:00 committed by Adam J. Stewart
parent a48fb69601
commit 8b1bf2d613
12 changed files with 230 additions and 7 deletions

View File

@ -0,0 +1,19 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyAgateDbf(PythonPackage):
"""agate-dbf adds read support for dbf files to agate."""
homepage = "https://agate-dbf.readthedocs.io/en/latest/"
url = "https://pypi.io/packages/source/a/agate-dbf/agate-dbf-0.2.1.tar.gz"
version('0.2.1', sha256='00c93c498ec9a04cc587bf63dd7340e67e2541f0df4c9a7259d7cb3dd4ce372f')
depends_on('py-setuptools', type='build')
depends_on('py-agate@1.5.0:', type=('build', 'run'))
depends_on('py-dbfread@2.0.5:', type=('build', 'run'))

View File

@ -0,0 +1,21 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyAgateExcel(PythonPackage):
"""agate-excel adds read support for Excel files (xls and xlsx) to
agate."""
homepage = "https://agate-excel.readthedocs.io/en/latest/"
url = "https://pypi.io/packages/source/a/agate-excel/agate-excel-0.2.3.tar.gz"
version('0.2.3', sha256='8f255ef2c87c436b7132049e1dd86c8e08bf82d8c773aea86f3069b461a17d52')
depends_on('py-setuptools', type='build')
depends_on('py-agate@1.5.0:', type=('build', 'run'))
depends_on('py-xlrd@0.9.4:', type=('build', 'run'))
depends_on('py-openpyxl@2.3.0:', type=('build', 'run'))

View File

@ -0,0 +1,19 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyAgateSql(PythonPackage):
"""agate-sql adds SQL read/write support to agate."""
homepage = "https://agate-sql.readthedocs.io/en/latest/"
url = "https://pypi.io/packages/source/a/agate-sql/agate-sql-0.5.4.tar.gz"
version('0.5.4', sha256='9277490ba8b8e7c747a9ae3671f52fe486784b48d4a14e78ca197fb0e36f281b')
depends_on('py-setuptools', type='build')
depends_on('py-agate@1.5.0:', type=('build', 'run'))
depends_on('py-sqlalchemy@1.0.8:', type=('build', 'run'))

View File

@ -0,0 +1,26 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyAgate(PythonPackage):
"""agate is a Python data analysis library that is optimized for humans
instead of machines. It is an alternative to numpy and pandas that solves
real-world problems with readable code."""
homepage = "https://agate.readthedocs.io/en/latest/"
url = "https://pypi.io/packages/source/a/agate/agate-1.6.1.tar.gz"
version('1.6.1', sha256='c93aaa500b439d71e4a5cf088d0006d2ce2c76f1950960c8843114e5f361dfd3')
depends_on('py-setuptools', type='build')
depends_on('py-six@1.9.0:', type=('build', 'run'))
depends_on('py-pytimeparse@1.1.5:', type=('build', 'run'))
depends_on('py-parsedatetime@2.1:', type=('build', 'run'))
depends_on('py-babel@2.0:', type=('build', 'run'))
depends_on('py-isodate@0.5.4:', type=('build', 'run'))
depends_on('py-python-slugify@1.2.1:', type=('build', 'run'))
depends_on('py-leather@0.3.2:', type=('build', 'run'))

View File

@ -13,13 +13,20 @@ class PyCsvkit(PythonPackage):
homepage = 'http://csvkit.rtfd.org/'
url = "https://pypi.io/packages/source/c/csvkit/csvkit-0.9.1.tar.gz"
version('1.0.4', sha256='1353a383531bee191820edfb88418c13dfe1cdfa9dd3dc46f431c05cd2a260a0')
version('0.9.1', sha256='92f8b8647becb5cb1dccb3af92a13a4e85702d42ba465ce8447881fb38c9f93a')
depends_on('py-setuptools', type='build')
depends_on('py-setuptools', type=('build', 'run'))
depends_on('py-six@1.6.1:', type=('build', 'run'))
depends_on('py-argparse@1.2.1:', type=('build', 'run'), when='^python@:2.6')
depends_on('py-ordereddict@1.1:', type=('build', 'run'), when='^python@:2.6')
depends_on('py-simplejson@3.6.3:', type=('build', 'run'), when='^python@:2.6')
depends_on('py-python-dateutil@2.2', type=('build', 'run'), when='@0.9.1')
depends_on('py-python-dateutil', type=('build', 'run'), when='@0.9.2:')
depends_on('py-dbf@0.94.003', type=('build', 'run'))
depends_on('py-xlrd', type=('build', 'run'))
depends_on('py-sqlalchemy', type=('build', 'run'))
depends_on('py-six', type=('build', 'run'))
depends_on('py-openpyxl@2.2.0-b1', type=('build', 'run'))
depends_on('py-dbf@0.94.003', type=('build', 'run'), when='@0.9.1')
depends_on('py-xlrd@0.7.1:', type=('build', 'run'), when='@0.9.1')
depends_on('py-sqlalchemy@0.6.6:', type=('build', 'run'), when='@0.9.1')
depends_on('py-openpyxl@2.2.0-b1', type=('build', 'run'), when='@0.9.1')
depends_on('py-agate@1.6.1:', type=('build', 'run'), when='@1:')
depends_on('py-agate-excel@0.2.2:', type=('build', 'run'), when='@1:')
depends_on('py-agate-dbf@0.2.0:', type=('build', 'run'), when='@1:')
depends_on('py-agate-sql@0.5.3:', type=('build', 'run'), when='@1:')

View File

@ -0,0 +1,20 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyDbfread(PythonPackage):
"""DBF is a file format used by databases such dBase, Visual FoxPro, and
FoxBase+. This library reads DBF files and returns the data as native
Python data types for further processing. It is primarily intended for
batch jobs and one-off scripts."""
homepage = "https://dbfread.readthedocs.io/en/latest/"
url = "https://pypi.io/packages/source/d/dbfread/dbfread-2.0.7.tar.gz"
version('2.0.7', sha256='07c8a9af06ffad3f6f03e8fe91ad7d2733e31a26d2b72c4dd4cfbae07ee3b73d')
depends_on('py-setuptools', type='build')

View File

@ -0,0 +1,21 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyIsodate(PythonPackage):
"""This module implements ISO 8601 date, time and duration parsing. The
implementation follows ISO8601:2004 standard, and implements only date/time
representations mentioned in the standard. If something is not mentioned
there, then it is treated as non existent, and not as an allowed option."""
homepage = "https://github.com/gweis/isodate/"
url = "https://pypi.io/packages/source/i/isodate/isodate-0.6.0.tar.gz"
version('0.6.0', sha256='2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8')
depends_on('py-setuptools', type='build')
depends_on('py-six', type=('build', 'run'))

View File

@ -0,0 +1,19 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyLeather(PythonPackage):
"""Leather is the Python charting library for those who need charts now and
don't care if they're perfect."""
homepage = "https://leather.readthedocs.io/en/stable/"
url = "https://pypi.io/packages/source/l/leather/leather-0.3.3.tar.gz"
version('0.3.3', sha256='076d1603b5281488285718ce1a5ce78cf1027fe1e76adf9c548caf83c519b988')
depends_on('py-setuptools', type='build')
depends_on('py-six@1.6.1:', type=('build', 'run'))

View File

@ -0,0 +1,17 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyParsedatetime(PythonPackage):
"""Parse human-readable date/time strings."""
homepage = "https://github.com/bear/parsedatetime"
url = "https://pypi.io/packages/source/p/parsedatetime/parsedatetime-2.5.tar.gz"
version('2.5', sha256='d2e9ddb1e463de871d32088a3f3cea3dc8282b1b2800e081bd0ef86900451667')
depends_on('py-setuptools', type='build')

View File

@ -0,0 +1,19 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPythonSlugify(PythonPackage):
"""A Python Slugify application that handles Unicode"""
homepage = "https://github.com/un33k/python-slugify"
url = "https://pypi.io/packages/source/p/python-slugify/python-slugify-4.0.0.tar.gz"
version('4.0.0', sha256='a8fc3433821140e8f409a9831d13ae5deccd0b033d4744d94b31fea141bdd84c')
depends_on('python@2.7:2.8,3.5:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-text-unidecode@1.3:', type=('build', 'run'))

View File

@ -0,0 +1,17 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPytimeparse(PythonPackage):
"""A small Python library to parse various kinds of time expressions."""
homepage = "https://github.com/wroberts/pytimeparse"
url = "https://pypi.io/packages/source/p/pytimeparse/pytimeparse-1.1.8.tar.gz"
version('1.1.8', sha256='e86136477be924d7e670646a98561957e8ca7308d44841e21f5ddea757556a0a')
depends_on('py-setuptools', type='build')

View File

@ -0,0 +1,18 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyTextUnidecode(PythonPackage):
"""text-unidecode is the most basic port of the Text::Unidecode Perl
library."""
homepage = "https://github.com/kmike/text-unidecode/"
url = "https://pypi.io/packages/source/t/text-unidecode/text-unidecode-1.3.tar.gz"
version('1.3', sha256='bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93')
depends_on('py-setuptools', type='build')