-
-
Notifications
You must be signed in to change notification settings - Fork 78
/
setup.py
110 lines (96 loc) · 3.19 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) Spyder Project Contributors
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""Setup script for spyder_terminal."""
# Standard library imports
import ast
import os
import os.path as osp
import sys
# Third party imports
from setuptools import find_packages, setup
from setupbase import (BuildStatic, CleanComponents, COMPONENTS, HERE,
SdistWithBuildStatic)
def get_version(module='spyder_terminal'):
"""Get version."""
with open(os.path.join(HERE, module, '__init__.py'), 'r') as f:
data = f.read()
lines = data.split('\n')
for line in lines:
if line.startswith('VERSION_INFO'):
version_tuple = ast.literal_eval(line.split('=')[-1].strip())
version = '.'.join(map(str, version_tuple))
break
return version
def get_description():
"""Get long description."""
with open(os.path.join(HERE, 'README.rst'), 'r') as f:
data = f.read()
return data
REQUIREMENTS = [
'spyder>=5.2.0',
'tornado',
'terminado>=0.13.1',
'coloredlogs',
'requests'
]
EXTRAS_REQUIRE = {
'test': [
'pytest<6.0',
'pytest-cov',
'flaky',
'pytest-qt==3.3.0',
'pytest-timeout'
]
}
# Verify that COMPONENTS exist before trying to build wheels
if any([arg == 'bdist_wheel' for arg in sys.argv]):
if not osp.isdir(COMPONENTS):
print("\nWARNING: Server components are missing!! Please run "
"'python setup.py sdist' first.\n")
sys.exit(1)
cmdclass = {
'build_static': BuildStatic,
'sdist': SdistWithBuildStatic,
'clean_components': CleanComponents
}
setup(
name='spyder-terminal',
version=get_version(),
cmdclass=cmdclass,
keywords=['Spyder', 'Plugin'],
url='https://github.com/spyder-ide/spyder-terminal',
license='MIT',
author='Spyder Project Contributors',
author_email='spyder.python@gmail.com',
description='Spyder Plugin for displaying a virtual terminal '
'(OS independent) inside the main Spyder window',
long_description=get_description(),
long_description_content_type='text/x-rst',
packages=find_packages(exclude=['contrib', 'docs']),
install_requires=REQUIREMENTS,
include_package_data=True,
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8'
],
extras_require=EXTRAS_REQUIRE,
entry_points={
"spyder.plugins": [
"terminal = spyder_terminal.terminalplugin:TerminalPlugin"
],
})