-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
56 lines (49 loc) · 1.66 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
#!/usr/bin/env python
from __future__ import print_function
from __future__ import absolute_import
import importlib
import os
import re
import setuptools
# project long description
BASE_PATH = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(BASE_PATH, 'README.md'), "r") as file:
long_description = file.read()
install_requires = [
'pydicom',
'futures'
]
github_dependencies = {
'pynetdicom3': 'https://github.com/pydicom/pynetdicom3.git'
}
# install dependencies only available on github repositories
for dependency in github_dependencies:
try:
print('check if dependency module {0} is already installed'.format(dependency))
i = importlib.import_module(dependency)
print('{0} [OK]'.format(dependency))
except Exception as e:
print('module {0} not found, installing...'.format(dependency))
try:
os.system('pip install git+{0}'.format(github_dependencies[dependency]))
except Exception as e:
print('Could not install following dependency: {0}'.format(dependency))
# import own module
from populate import populate as module
setuptools.setup(
name=module.__project__,
version=module.__version__,
author=module.__author__,
author_email=module.__authoremail__,
description=module.short_description,
long_description=long_description,
long_description_content_type="text/markdown",
url=module.__source__,
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
install_requires=install_requires
)