-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
54 lines (46 loc) · 1.34 KB
/
setup.py
File metadata and controls
54 lines (46 loc) · 1.34 KB
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
"""
Copyright (c) 2019-2021, Jairus Martin.
Distributed under the terms of the MIT License.
The full license is in the file LICENSE.text, distributed with this software.
Created on Feb 21, 2019
@author: jrm
"""
import re
from setuptools import Extension, setup, find_packages
def find_version():
with open("atomdb/__init__.py") as f:
for line in f:
m = re.search(r'version = [\'"](.+)["\']', line)
if m:
return m.group(1)
raise Exception("Could not find version in atomdb/__init__.py")
ext_module = Extension(
"atomdb.ext",
["src/ext.c"],
include_dirs=["src"],
language="c",
)
setup(
name="atom-db",
version=find_version(),
author="CodeLV",
author_email="frmdstryr@gmail.com",
url="https://github.com/codelv/atom-db",
description="Database abstraction layer for atom objects",
license="MIT",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
requires=["atom"],
python_requires=">=3.10",
install_requires=["atom>=0.7.0"],
optional_requires=[
"sqlalchemy<2",
"aiomysql",
"aiopg",
"aiosqlite", # sql database support
"motor", # nosql database support
],
ext_modules=[ext_module],
packages=find_packages(),
package_data={'atomdb': ["py.typed"]}
)