-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
57 lines (49 loc) · 1.55 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
from setuptools import setup
import os
VERSION = "1.1.8"
def get_long_description():
with open(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "README.md"),
encoding="utf8",
) as fp:
return fp.read()
def get_data_files(rel_path):
data_files = [
"templates/*"
]
if rel_path.endswith("/"):
rel_path = rel_path[:-1]
basedir = os.path.dirname(__file__)
static_dir = os.path.join(basedir, f"{rel_path}/static/")
for dir, subdirs, files in os.walk(static_dir):
for file in files:
filepath = os.path.join(dir, file).replace(
f"{rel_path}/", ""
)
data_files.append(filepath)
return data_files
setup(
name="datasette-surveys",
description="Datasette plugin for creating surveys and collecting responses all in one place.",
long_description=get_long_description(),
long_description_content_type="text/markdown",
author="Brandon Roberts",
author_email="[email protected]",
url="https://github.com/next-LI/datasette-surveys",
license="Apache License, Version 2.0",
version=VERSION,
packages=["datasette_surveys"],
entry_points={"datasette": ["surveys = datasette_surveys"]},
install_requires=[
# "datasette>=0.56",
"asgi-csrf>=0.7",
"starlette",
"aiofiles",
"python-multipart",
"sqlite-utils",
],
extras_require={
"test": ["pytest", "pytest-asyncio", "asgiref", "httpx", "asgi-lifespan"]
},
include_package_data=True,
)