Debian Codegraph @

setup.py

raw symbols SCIP
1 import io
2 import os
3 import re
4
5 from setuptools import setup, find_packages
6
7
8 here = os.path.abspath(os.path.dirname(__file__))
9
10
11 def read(path, encoding="utf-8"):
12 path = os.path.join(here, path)
13 with io.open(path, encoding=encoding) as fp:
14 return fp.read()
15
16
17 def version(path):
18 """Obtain the packge version from a python file e.g. pkg/__init__.py
19 See <https://packaging.python.org/en/latest/single_source_version.html>.
20 """
21 version_file = read(path)
22 version_match = re.search(
23 r"""^__version__ = ['"]([^'"]*)['"]""", version_file, re.M
24 )
25 if version_match:
26 return version_match.group(1)
27 raise RuntimeError("Unable to find version string.")
28
29
30 setup(
31 name="vega_datasets",
32 version=version("vega_datasets/__init__.py"),
33 description="A Python package for offline access to Vega datasets",
34 long_description=read("README.md"),
35 long_description_content_type="text/markdown",
36 author="Jake VanderPlas",
37 author_email="[email protected]",
38 maintainer="Jake VanderPlas",
39 maintainer_email="[email protected]",
40 url="http://github.com/altair-viz/vega_datasets",
41 download_url="http://github.com/altair-viz/vega_datasets",
42 license="MIT",
43 install_requires=["pandas"],
44 python_requires=">=3.5",
45 tests_require=["pytest"],
46 packages=find_packages(exclude=["tools"]),
47 package_data={
48 "vega_datasets": [
49 "datasets.json",
50 "dataset_info.json",
51 "local_datasets.json",
52 os.path.join("_data", "*.json"),
53 os.path.join("_data", "*.csv"),
54 os.path.join("_data", "*.tsv"),
55 ]
56 },
57 classifiers=[
58 "Development Status :: 4 - Beta",
59 "Environment :: Console",
60 "Intended Audience :: Science/Research",
61 "License :: OSI Approved :: MIT License",
62 "Natural Language :: English",
63 "Programming Language :: Python :: 3.5",
64 "Programming Language :: Python :: 3.6",
65 "Programming Language :: Python :: 3.7",
66 "Programming Language :: Python :: 3.8",
67 ],
68 project_urls={
69 "Bug Reports": "https://github.com/altair-viz/vega_datasets/issues",
70 "Source": "https://github.com/altair-viz/vega_datasets",
71 },
72 )