| 1 |
from setuptools import setup, find_packages |
| 2 |
import os |
| 3 |
|
| 4 |
|
| 5 |
def get_long_description(): |
| 6 |
with open( |
| 7 |
os.path.join(os.path.dirname(os.path.abspath(__file__)), "README.md"), |
| 8 |
encoding="utf8", |
| 9 |
) as fp: |
| 10 |
return fp.read() |
| 11 |
|
| 12 |
|
| 13 |
def get_version(): |
| 14 |
path = os.path.join( |
| 15 |
os.path.dirname(os.path.abspath(__file__)), "datasette", "version.py" |
| 16 |
) |
| 17 |
g = {} |
| 18 |
with open(path) as fp: |
| 19 |
exec(fp.read(), g) |
| 20 |
return g["__version__"] |
| 21 |
|
| 22 |
|
| 23 |
setup( |
| 24 |
name="datasette", |
| 25 |
version=get_version(), |
| 26 |
description="An open source multi-tool for exploring and publishing data", |
| 27 |
long_description=get_long_description(), |
| 28 |
long_description_content_type="text/markdown", |
| 29 |
author="Simon Willison", |
| 30 |
license="Apache License, Version 2.0", |
| 31 |
url="https://datasette.io/", |
| 32 |
project_urls={ |
| 33 |
"Documentation": "https://docs.datasette.io/en/stable/", |
| 34 |
"Changelog": "https://docs.datasette.io/en/stable/changelog.html", |
| 35 |
"Live demo": "https://latest.datasette.io/", |
| 36 |
"Source code": "https://github.com/simonw/datasette", |
| 37 |
"Issues": "https://github.com/simonw/datasette/issues", |
| 38 |
"CI": "https://github.com/simonw/datasette/actions?query=workflow%3ATest", |
| 39 |
}, |
| 40 |
packages=find_packages(exclude=("tests",)), |
| 41 |
package_data={ |
| 42 |
"datasette": ["templates/*.html", "vendored/**/*.txt"], |
| 43 |
}, |
| 44 |
include_package_data=True, |
| 45 |
python_requires=">=3.10", |
| 46 |
install_requires=[ |
| 47 |
"asgiref>=3.2.10", |
| 48 |
"click>=7.1.1", |
| 49 |
"click-default-group>=1.2.3", |
| 50 |
"Jinja2>=2.10.3", |
| 51 |
"hupper>=1.9", |
| 52 |
"httpx>=0.20,<1.0", |
| 53 |
"pluggy>=1.0", |
| 54 |
"uvicorn>=0.11", |
| 55 |
"aiofiles>=0.4", |
| 56 |
"janus>=0.6.2", |
| 57 |
"asgi-csrf>=0.9", |
| 58 |
"PyYAML>=5.3", |
| 59 |
"mergedeep>=1.1.1", |
| 60 |
"itsdangerous>=1.1", |
| 61 |
"setuptools", |
| 62 |
"pip", |
| 63 |
# Needed by our vendored Pint: |
| 64 |
"platformdirs>=2.1.0", |
| 65 |
"typing_extensions>=4.0.0", |
| 66 |
"flexcache>=0.3", |
| 67 |
"flexparser>=0.3", |
| 68 |
], |
| 69 |
entry_points=""" |
| 70 |
[console_scripts] |
| 71 |
datasette=datasette.cli:cli |
| 72 |
""", |
| 73 |
setup_requires=["pytest-runner"], |
| 74 |
extras_require={ |
| 75 |
"docs": [ |
| 76 |
"furo==2024.8.6", |
| 77 |
"sphinx-autobuild", |
| 78 |
"codespell", |
| 79 |
"blacken-docs", |
| 80 |
"sphinx-copybutton", |
| 81 |
], |
| 82 |
"test": [ |
| 83 |
"pytest>=5.2.2", |
| 84 |
"pytest-xdist>=2.2.1", |
| 85 |
"pytest-asyncio>=0.17", |
| 86 |
"beautifulsoup4>=4.8.1", |
| 87 |
"black==24.4.2", |
| 88 |
"blacken-docs==1.12.1", |
| 89 |
"pytest-timeout>=1.4.2", |
| 90 |
"trustme>=0.7", |
| 91 |
"cogapp>=3.3.0", |
| 92 |
], |
| 93 |
"rich": ["rich"], |
| 94 |
}, |
| 95 |
tests_require=["datasette[test]"], |
| 96 |
classifiers=[ |
| 97 |
"Development Status :: 4 - Beta", |
| 98 |
"Framework :: Datasette", |
| 99 |
"Intended Audience :: Developers", |
| 100 |
"Intended Audience :: Science/Research", |
| 101 |
"Intended Audience :: End Users/Desktop", |
| 102 |
"Topic :: Database", |
| 103 |
"Programming Language :: Python :: 3.14", |
| 104 |
"Programming Language :: Python :: 3.13", |
| 105 |
"Programming Language :: Python :: 3.12", |
| 106 |
"Programming Language :: Python :: 3.11", |
| 107 |
"Programming Language :: Python :: 3.10", |
| 108 |
], |
| 109 |
) |