-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathsetup.py
More file actions
96 lines (89 loc) · 4.07 KB
/
setup.py
File metadata and controls
96 lines (89 loc) · 4.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# coding: utf-8
# Copyright 2014-2025 Álvaro Justen <https://github.com/turicas/rows/>
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
# more details.
# You should have received a copy of the GNU Lesser General Public License along with this program. If not, see
# <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
from setuptools import find_packages, setup
utils_requirements = ["requests", "requests-cache", "tqdm"]
pdfminer_requirements = [
"cached-property",
"pdfminer.six == 20191110; python_version == '2.7'",
"pdfminer.six == 20201018; python_version == '3.5'",
"pdfminer.six == 20221105; python_version == '3.6'",
"pdfminer.six == 20221105; python_version == '3.7'",
"pdfminer.six; python_version >= '3.8'",
]
EXTRA_REQUIREMENTS = {
"cli": ["click"],
"cli-extra": ["click"] + utils_requirements,
"csv": [],
"detect": ["file-magic; python_version >= '3.0'", "charset-normalizer; python_version >= '3.7'"],
"html": ["lxml"], # apt: libxslt-dev libxml2-dev
"ods": ["lxml"],
"parquet": ["parquet"],
"pdf": pdfminer_requirements,
"pdf-pdfminer.six": pdfminer_requirements,
"pdf-pymupdf": ["cached-property", "pymupdf"],
"postgresql": ["psycopg2-binary"],
"utils": utils_requirements,
"xls": ["xlrd", "xlwt"],
"xlsx": ["defusedxml>=0.6.0", "openpyxl"],
"xpath": ["lxml"],
}
EXTRA_REQUIREMENTS["all"] = sum(EXTRA_REQUIREMENTS.values(), [])
INSTALL_REQUIREMENTS = [
"pathlib; python_version < '3.0'",
]
LONG_DESCRIPTION = """
No matter in which format your tabular data is: rows will import it,
automatically detect types and give you high-level Python objects so you can
start working with the data instead of trying to parse it. It is also
locale-and-unicode aware. :)
Read the documentation and learn how simple is to use it: http://turicas.info/rows
""".strip()
setup(
name="rows",
description=("A common, beautiful interface to tabular data, no matter the format"),
long_description=LONG_DESCRIPTION,
version="0.5.0-dev0",
author="Álvaro Justen",
author_email="[email protected]",
url="https://github.com/turicas/rows/",
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=INSTALL_REQUIREMENTS,
extras_require=EXTRA_REQUIREMENTS,
keywords="tabular table csv xls xlsx xpath ods sqlite html pdf rows data opendata",
dependency_links=[
"https://github.com/turicas/parquet-python/archive/enhancement/move-to-thriftpy2.zip#egg=parquet"
],
entry_points={"console_scripts": ["rows = rows.cli:cli"]},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Database",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Utilities",
],
)