Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
python-visualization
GitHub Repository: python-visualization/folium
Path: blob/main/setup.py
1588 views
1
import os
2
3
from setuptools import setup
4
5
rootpath = os.path.abspath(os.path.dirname(__file__))
6
7
8
def read(*parts):
9
return open(os.path.join(rootpath, *parts)).read()
10
11
12
def walk_subpkg(name):
13
data_files = []
14
package_dir = "folium"
15
for parent, dirs, files in os.walk(os.path.join(package_dir, name)):
16
# Remove package_dir from the path.
17
sub_dir = os.sep.join(parent.split(os.sep)[1:])
18
for f in files:
19
data_files.append(os.path.join(sub_dir, f))
20
return data_files
21
22
23
package_data = {
24
"": [
25
"*.js",
26
"plugins/*.js",
27
"plugins/*.html",
28
"plugins/*.css",
29
"plugins/*.tpl",
30
"templates/*.html",
31
"templates/*.js",
32
"templates/*.txt",
33
"py.typed",
34
]
35
+ walk_subpkg("templates/tiles")
36
}
37
38
packages = ["folium", "folium.plugins"]
39
40
# Dependencies.
41
with open("requirements.txt") as f:
42
tests_require = f.readlines()
43
install_requires = [t.strip() for t in tests_require]
44
45
setup(
46
name="folium",
47
description="Make beautiful maps with Leaflet.js & Python",
48
license="MIT",
49
long_description="{}".format(read("README.rst")),
50
long_description_content_type="text/x-rst",
51
author="Rob Story",
52
author_email="[email protected]",
53
url="https://github.com/python-visualization/folium",
54
keywords="data visualization",
55
classifiers=[
56
"Programming Language :: Python :: 3.9",
57
"Programming Language :: Python :: 3.10",
58
"Programming Language :: Python :: 3.11",
59
"Programming Language :: Python :: 3.12",
60
"Programming Language :: Python :: 3.13",
61
"Topic :: Scientific/Engineering :: GIS",
62
"Topic :: Scientific/Engineering :: Visualization",
63
"License :: OSI Approved :: MIT License",
64
"Development Status :: 5 - Production/Stable",
65
],
66
platforms="any",
67
packages=packages,
68
package_data=package_data,
69
python_requires=">=3.9",
70
extras_require={"testing": ["pytest"]},
71
install_requires=install_requires,
72
zip_safe=False,
73
use_scm_version={
74
"write_to": "folium/_version.py",
75
"write_to_template": '__version__ = "{version}"',
76
"tag_regex": r"^(?P<prefix>v)?(?P<version>[^\+]+)(?P<suffix>.*)?$",
77
},
78
)
79
80