-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathsetup.py
76 lines (71 loc) · 2.39 KB
/
setup.py
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
import re
from io import open
from pathlib import Path
import requests
from setuptools import find_packages, setup
this_directory = Path(__file__).parent
with open(str(this_directory / "README.md"), encoding="utf-8") as f:
long_description = f.read()
with open(str(this_directory / "itables/version.py")) as f:
version_file = f.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
version = version_match.group(1)
external = Path(__file__).parent / "itables" / "external"
if not external.is_dir():
external.mkdir()
for name, url in [
("jquery.min.js", "https://code.jquery.com/jquery-3.6.0.min.js"),
(
"jquery.dataTables.min.css",
"https://cdn.datatables.net/1.13.1/css/jquery.dataTables.min.css",
),
(
"jquery.dataTables.mjs",
"https://cdn.datatables.net/1.12.1/js/jquery.dataTables.mjs",
),
]:
r = requests.get(url)
with open(str(external / name), "wb") as fp:
fp.write(r.content)
setup(
name="itables",
version=version,
author="Marc Wouts",
author_email="[email protected]",
description="Interactive Tables in Jupyter",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/mwouts/itables",
packages=find_packages(exclude=["tests"]),
package_data={
"itables": [
"html/*",
"html/column_filters/*",
"samples/*.csv",
"external/*",
]
},
tests_require=["pytest", "pytz"],
install_requires=["IPython", "pandas", "numpy"],
extras_require={
"polars": ["polars", "pyarrow"],
"ibis": ["ibis-framework[pandas]"],
},
license="MIT",
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Framework :: Jupyter",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"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",
],
)