-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
46 lines (40 loc) · 1.43 KB
/
Copy pathsetup.py
File metadata and controls
46 lines (40 loc) · 1.43 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
from setuptools import setup, find_packages
import os
import ast
with open('README.md', 'r', encoding='utf-8') as fh:
long_description = fh.read()
# Read requirements from requirements.txt if it exists
requirements = []
if os.path.exists('requirements.txt'):
with open('requirements.txt', 'r', encoding='utf-8') as req_file:
requirements = [line.strip() for line in req_file if line.strip() and not line.startswith('#')]
def get_version():
with open('aini/__init__.py', 'r', encoding='utf-8') as f:
for line in f:
if line.startswith('__version__'):
return ast.literal_eval(line.split('=')[1].strip())
raise RuntimeError("Version information not found")
# For backward compatibility
setup(
name='aini',
version=get_version(),
author='Alpha x1',
author_email='alpha.xone@outlook.com',
description='Declarative AI components',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/alpha-xone/aini',
packages=find_packages(),
include_package_data=True,
package_data={
'aini': ['**/*.yml', '**/*.yaml', '**/*.json'],
'': ['requirements.txt'],
},
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
],
python_requires='>=3.7',
install_requires=requirements,
)