-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
96 lines (84 loc) · 2.36 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
# -*- coding: utf-8 -*-
# Always prefer setuptools over distutils
from setuptools import setup, find_namespace_packages
# To use a consistent encoding
from codecs import open
import os
import os.path
here = os.path.abspath(os.path.dirname(__file__))
PKG_NAME = "thomas-server"
PKG_DESC = "Thomas' RESTful API and webinterface."
# Get the long description from the README file
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
PKG_DESCRIPTION = f.read()
# Read the API version from disk. This file should be located in the package
# folder, since it's also used to set the pkg.__version__ variable.
version_path = os.path.join(here, 'thomas', 'server', '_version.py')
version_ns = {
'__file__': version_path
}
with open(version_path) as f:
exec(f.read(), {}, version_ns)
def package_files(directory, base=''):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
p = os.path.join(path, filename)
paths.append(p.replace(base, ''))
return paths
thomas_server_files = [
"__build__",
]
thomas_server_files.extend(
package_files(
'thomas/server/static/',
base='thomas/server/'
)
)
# Setup the package
setup(
name=PKG_NAME,
version=version_ns['__version__'],
description=PKG_DESC,
long_description=PKG_DESCRIPTION,
long_description_content_type='text/markdown',
url='https://github.com/mellesies/thomas-server',
author='Melle Sieswerda',
author_email='[email protected]',
packages=find_namespace_packages(include=['thomas.*']),
python_requires='>= 3.6',
install_requires=[
'appdirs',
'bcrypt',
'click',
'colorama',
'eventlet',
'flask-cors',
'flask-restful',
'flask-socketio>=4.2',
'flask>=1.1',
'flask_jwt_extended==3.24',
'flask_marshmallow>=0.12',
'flask_sqlalchemy',
'marshmallow',
'marshmallow-sqlalchemy>=0.22',
'pyyaml',
'requests',
'sqlalchemy>=1.3',
'termcolor',
'thomas-core',
'py-fhir',
'werkzeug>=1.0',
],
package_data={
"": [
"config.yaml"
],
"thomas.server": thomas_server_files,
},
entry_points={
'console_scripts': [
f'thomas=thomas.server.cli:cli',
],
},
)