22
33import sys
44from io import open
5- from setuptools import setup , find_packages
5+
6+ from setuptools import find_packages , setup
67from setuptools .command .test import test as TestCommand
8+
79from readchar import __version__
810
911
1012def read_description ():
1113 try :
12- with open (' README.rst' , encoding = ' utf8' ) as fd :
14+ with open (" README.rst" , encoding = " utf8" ) as fd :
1315 return fd .read ()
1416 except : # noqa
1517 return "Error found retrieving description"
1618
1719
1820class PyTest (TestCommand ):
19- user_options = [(' pytest-args=' , 'a' , "Arguments to pass to py.test" )]
21+ user_options = [(" pytest-args=" , "a" , "Arguments to pass to py.test" )]
2022
2123 def initialize_options (self ):
2224 TestCommand .initialize_options (self )
23- self .pytest_args = [' --cov-report=term-missing' ]
25+ self .pytest_args = [" --cov-report=term-missing" ]
2426
2527 def finalize_options (self ):
2628 TestCommand .finalize_options (self )
@@ -30,52 +32,52 @@ def finalize_options(self):
3032 def run_tests (self ):
3133 # import here, cause outside the eggs aren't loaded
3234 import pytest
35+
3336 errno = pytest .main (self .pytest_args )
3437 sys .exit (errno )
3538
3639
3740setup (
38- name = ' readchar' ,
41+ name = " readchar" ,
3942 version = __version__ ,
4043 description = "Utilities to read single characters and key-strokes" ,
4144 long_description = read_description (),
4245 classifiers = [
43- 'Development Status :: 5 - Production/Stable' ,
44- 'Environment :: Console' ,
45- 'Intended Audience :: Developers' ,
46- 'License :: OSI Approved :: MIT License' ,
47- 'Operating System :: OS Independent' ,
48- 'Programming Language :: Python :: 2.7' ,
49- 'Programming Language :: Python :: 3.4' ,
50- 'Programming Language :: Python :: 3.5' ,
51- 'Programming Language :: Python :: 3.6' ,
52- 'Programming Language :: Python :: 3.7' ,
53- 'Programming Language :: Python :: Implementation :: CPython' ,
54- 'Programming Language :: Python :: Implementation :: PyPy' ,
55- 'Topic :: Software Development' ,
56- 'Topic :: Software Development :: User Interfaces' ,
46+ "Development Status :: 5 - Production/Stable" ,
47+ "Environment :: Console" ,
48+ "Intended Audience :: Developers" ,
49+ "License :: OSI Approved :: MIT License" ,
50+ "Operating System :: OS Independent" ,
51+ "Programming Language :: Python :: 2.7" ,
52+ "Programming Language :: Python :: 3.4" ,
53+ "Programming Language :: Python :: 3.5" ,
54+ "Programming Language :: Python :: 3.6" ,
55+ "Programming Language :: Python :: 3.7" ,
56+ "Programming Language :: Python :: 3.8" ,
57+ "Programming Language :: Python :: 3.9" ,
58+ "Programming Language :: Python :: Implementation :: CPython" ,
59+ "Programming Language :: Python :: Implementation :: PyPy" ,
60+ "Topic :: Software Development" ,
61+ "Topic :: Software Development :: User Interfaces" ,
5762 ],
58- keywords = ' stdin,command line' ,
59- author = ' Miguel Ángel García' ,
60- author_email = ' miguelangel.garcia@gmail.com' ,
61- url = ' https://github.com/magmax/python-readchar' ,
62- license = ' MIT' ,
63- packages = find_packages (exclude = [' tests' , ' venv' ]),
63+ keywords = " stdin,command line" ,
64+ author = " Miguel Ángel García" ,
65+ author_email = " miguelangel.garcia@gmail.com" ,
66+ url = " https://github.com/magmax/python-readchar" ,
67+ license = " MIT" ,
68+ packages = find_packages (exclude = [" tests" , " venv" ]),
6469 include_package_data = True ,
6570 zip_safe = False ,
66- cmdclass = {' test' : PyTest },
71+ cmdclass = {" test" : PyTest },
6772 tests_require = [
68- 'pexpect' ,
69- 'coverage' ,
70-
71- 'pytest' ,
72- 'pytest-cov' ,
73-
74- 'wheel' ,
75- ],
76- install_requires = [
73+ "pexpect" ,
74+ "coverage" ,
75+ "pytest" ,
76+ "pytest-cov" ,
77+ "wheel" ,
7778 ],
79+ install_requires = [],
7880 setup_requires = [
79- ' flake8' ,
81+ " flake8" ,
8082 ],
8183)
0 commit comments