-
Notifications
You must be signed in to change notification settings - Fork 58
/
setup.py
executable file
·102 lines (89 loc) · 2.98 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
#!/usr/bin/env python
"""
Setup.py distribution file for wcwidth.
https://github.com/jquast/wcwidth
"""
# std imports
import os
import codecs
# 3rd party
import setuptools
def _get_here(fname):
return os.path.join(os.path.dirname(__file__), fname)
class _SetupUpdate(setuptools.Command):
# This is a compatibility, some downstream distributions might
# still call "setup.py update".
#
# New entry point is tox, 'tox -eupdate'.
description = "Fetch and update unicode code tables"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys
import subprocess
retcode = subprocess.Popen([
sys.executable,
_get_here(os.path.join('bin', 'update-tables.py'))]).wait()
assert retcode == 0, ('non-zero exit code', retcode)
def main():
"""Setup.py entry point."""
setuptools.setup(
name='wcwidth',
# NOTE: manually manage __version__ in wcwidth/__init__.py !
version='0.2.13',
description=(
"Measures the displayed width of unicode strings in a terminal"),
long_description=codecs.open(
_get_here('README.rst'), 'rb', 'utf8').read(),
author='Jeff Quast',
author_email='[email protected]',
install_requires=('backports.functools-lru-cache>=1.2.1;'
'python_version < "3.2"'),
license='MIT',
packages=['wcwidth'],
url='https://github.com/jquast/wcwidth',
package_data={
'': ['LICENSE', '*.rst'],
},
zip_safe=True,
classifiers=[
'Intended Audience :: Developers',
'Natural Language :: English',
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'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',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Localization',
'Topic :: Software Development :: Internationalization',
'Topic :: Terminals'
],
keywords=[
'cjk',
'combining',
'console',
'eastasian',
'emoji',
'emulator',
'terminal',
'unicode',
'wcswidth',
'wcwidth',
'xterm',
],
cmdclass={'update': _SetupUpdate},
)
if __name__ == '__main__':
main()