1- """
1+ """tmuxp lives at <https://github.com/tony/tmuxp>.
2+
23tmuxp
34-----
45
56Manage tmux workspaces from JSON and YAML, pythonic API, shell completion.
67
78
89"""
10+ import sys
911from setuptools import setup
10- try :
11- from pip .req import parse_requirements
12- except ImportError :
13- def requirements (f ):
14- reqs = open (f , 'r' ).read ().splitlines ()
15- reqs = [r for r in reqs if not r .strip ().startswith ('#' )]
16- return reqs
17- else :
18- def requirements (f ):
19- install_reqs = parse_requirements (f )
20- reqs = [str (r .req ) for r in install_reqs ]
21- return reqs
12+
13+ with open ('requirements.pip' ) as f :
14+ install_reqs = [line for line in f .read ().split ('\n ' ) if line ]
15+ tests_reqs = []
16+
17+ if sys .version_info < (2 , 7 ):
18+ install_reqs += ['argparse' ]
19+ tests_reqs += ['unittest2' ]
2220
2321import re
2422VERSIONFILE = "tmuxp/__init__.py"
@@ -44,7 +42,8 @@ def requirements(f):
4442 long_description = open ('README.rst' ).read (),
4543 packages = ['tmuxp' , 'tmuxp.testsuite' ],
4644 include_package_data = True ,
47- install_requires = requirements ('requirements.pip' ),
45+ install_requires = install_reqs ,
46+ tests_require = tests_reqs ,
4847 scripts = ['pkg/tmuxp.bash' , 'pkg/tmuxp.zsh' , 'pkg/tmuxp.tcsh' ],
4948 entry_points = dict (console_scripts = ['tmuxp=tmuxp:main' ]),
5049 classifiers = [
0 commit comments