-
-
Notifications
You must be signed in to change notification settings - Fork 83
/
setup.py
98 lines (87 loc) · 2.93 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
from typing import List
from pathlib import Path
from setuptools import setup, find_packages
def requirements(name: str) -> List[str]:
root = Path(__file__).parent / 'requirements'
return root.joinpath(name).read_text().splitlines()
with open('README.md', 'r', encoding='utf-8') as f:
readme = f.read()
version = ''
with open('src/prisma/__init__.py', encoding='utf-8') as f:
match = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE)
if not match:
raise RuntimeError('version is not set')
version = match.group(1)
if not version:
raise RuntimeError('version is not set')
extras = {
'node': requirements('node.txt'),
}
setup(
name='prisma',
version=version,
author='Robert Craigie',
author_email='[email protected]',
maintainer='Robert Craigie',
license='APACHE',
url='https://github.com/RobertCraigie/prisma-client-py',
description='Prisma Client Python is an auto-generated and fully type-safe database client',
install_requires=requirements('base.txt'),
long_description=readme,
long_description_content_type='text/markdown',
packages=find_packages(
where='src',
include=['prisma', 'prisma.*', 'prisma_cleanup'],
),
package_dir={'': 'src'},
python_requires='>=3.8.0',
package_data={'': ['generator/templates/**/*.py.jinja', 'py.typed']},
include_package_data=True,
zip_safe=False,
extras_require={
**extras,
'all': [req for requirements in extras.values() for req in requirements],
},
entry_points={
'console_scripts': [
'prisma=prisma.cli:main',
'prisma-client-py=prisma.cli:main',
],
'prisma': [],
},
project_urls={
'Documentation': 'https://prisma-client-py.readthedocs.io',
'Source': 'https://github.com/RobertCraigie/prisma-client-py',
'Tracker': 'https://github.com/RobertCraigie/prisma-client-py/issues',
},
keywords=[
'orm',
'mysql',
'typing',
'prisma',
'sqlite',
'database',
'postgresql',
],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Typing :: Typed',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Database :: Database Engines/Servers',
'Topic :: Database :: Front-Ends',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Operating System :: POSIX',
'Operating System :: MacOS',
'Operating System :: POSIX :: Linux',
'Operating System :: Microsoft :: Windows',
],
)