forked from neovim/pynvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
68 lines (53 loc) · 1.71 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
"""setup.py for pynvim."""
import os.path
import platform
import sys
__PATH__ = os.path.abspath(os.path.dirname(__file__))
from setuptools import setup
install_requires = [
'msgpack>=0.5.0',
]
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []
setup_requires = [
] + pytest_runner
tests_require = [
'pytest',
'pytest_timeout',
]
docs_require = [
'sphinx',
'sphinx-rtd-theme',
]
extras_require = {
'test': tests_require,
'docs': docs_require,
}
if platform.python_implementation() != 'PyPy':
# pypy already includes an implementation of the greenlet module
install_requires.append('greenlet>=3.0')
if sys.version_info < (3, 12):
install_requires.append('typing-extensions>=4.5')
# __version__: see pynvim/_version.py
with open(os.path.join(__PATH__, "pynvim/_version.py"),
"r", encoding="utf-8") as fp:
_version_env = {}
exec(fp.read(), _version_env) # pylint: disable=exec-used
version = _version_env['__version__']
setup(name='pynvim',
version=version,
description='Python client for Neovim',
url='http://github.com/neovim/pynvim',
download_url=f'https://github.com/neovim/pynvim/archive/{version}.tar.gz',
author='Neovim Authors',
license='Apache',
packages=['pynvim', 'pynvim.api', 'pynvim.msgpack_rpc',
'pynvim.msgpack_rpc.event_loop', 'pynvim.plugin',
'neovim', 'neovim.api'],
python_requires=">=3.7",
install_requires=install_requires,
setup_requires=setup_requires,
tests_require=tests_require,
extras_require=extras_require,
options={"bdist_wheel": {"universal": True}},
)