-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
84 lines (67 loc) · 1.83 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
77
78
79
80
81
82
83
84
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
from typing import Callable, TypeAlias, Type
from setuptools import setup, find_packages
from pathlib import Path
ScmVersion: TypeAlias = Type['setuptools_scm.version.ScmVersion']
REPO_ROOT = Path(__file__).parent
README_FILE = (REPO_ROOT / 'README.md')
def vcs_ver() -> dict[str, str | Callable[[ScmVersion], str]]:
def scheme(version: ScmVersion) -> str:
if version.tag and not version.distance:
return version.format_with('')
else:
return version.format_choice('+{node}', '+{node}.dirty')
return {
'relative_to': __file__,
'version_scheme': 'guess-next-dev',
'local_scheme': scheme
}
setup(
name = 'bookwurm',
use_scm_version = vcs_ver(),
author = 'Aki \'lethalbit\' Van Ness',
author_email = 'nya@catgirl.link',
description = 'Ingest documents into meilisearch',
license = 'BSD-3-Clause',
python_requires = '~=3.10',
zip_safe = True,
url = 'https://github.com/lethalbit/bookwurm',
long_description = README_FILE.read_text(),
long_description_content_type = 'text/markdown',
setup_requires = [
'wheel',
'setuptools',
'setuptools_scm'
],
install_requires = [
'Jinja2',
'arrow',
'rich',
'meilisearch',
'PyMuPDF',
],
packages = find_packages(
where = '.',
exclude = (
'tests', 'tests.*', 'examples', 'examples.*'
)
),
package_data = { },
extras_require = {
},
entry_points = {
'console_scripts': [
'bookwurm = bookwurm.cli:main',
]
},
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
],
project_urls = {
'Documentation': 'https://github.com/lethalbit/bookwurm',
'Source Code' : 'https://github.com/lethalbit/bookwurm',
'Bug Tracker' : 'https://github.com/lethalbit/bookwurm/issues',
}
)