-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
72 lines (65 loc) · 2.68 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
# -*- coding: UTF-8 -*-
from __future__ import absolute_import, division, print_function
# builtins is either provided by Python 3 or by the "future" module for Python 2 (http://python-future.org/)
from functools import reduce
import sys
from setuptools import setup
install_requires = [
'numpy>=1.10',
'scipy>=0.16',
'Pillow',
'PyQt5',
]
entry_points = {
'console_scripts': [
'knossos_cuber = knossos_cuber.knossos_cuber:main',
],
'gui_scripts': [
'knossos_cuber_gui = knossos_cuber.knossos_cuber_gui:main'
]
}
if sys.version_info < (3, 0):
# Python 2 needs builtins provided by future
install_requires.append('future>=0.15')
# Decide if/how the GUI should be installed:
try:
import PyQt5
# If the line above works, there is no need to install PyQt5, so we should remove it from install_requires:
install_requires.remove('PyQt5')
except ImportError: # PyQt5 not available
if sys.version_info >= (3, 5):
# PyQt5 will be installed by setuptools via install_requires.
pass
else:
# PyQt5 currently can't be pip installed on python<3.5. Either it is there (system package) or you can't use it.
print('PyQt5 not found. knossos_cuber_gui will not be available.')
print('(This problem occurs only in old Python versions.')
print(' If you use Python 3.5 or later, PyQt5 will be automatically provided.)')
print('You can also try installing PyQt5 via your system package manager (apt, yum etc.) and then re-install.')
sys.stdout.flush()
del entry_points['gui_scripts']
setup(
name='knossos_cuber',
packages=['knossos_cuber'],
entry_points=entry_points,
include_package_data=True,
version='1.0',
description='A script that converts images into a KNOSSOS-readable format.',
author='Jörgen Kornfeld, Fabian Svara',
author_email='Jörgen Kornfeld <joergen.kornfeld@mpimf-heidelberg.mpg.de>,'
'Fabian Svara <fabian.svara@mpimf-heidelberg.mpg.de>',
url='https://github.com/knossos-project/knossos_cuber', # TODO: Actually push it there
keywords=['converter', 'skeletonization', 'segmentation'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Visualization',
],
install_requires=install_requires,
)