1111
1212### Confirming correct Python version: ########################################
1313# #
14- if sys .version_info [1 ] <= 6 :
14+ if sys .version_info [: 2 ] <= ( 2 , 5 ) :
1515 raise Exception (
1616 "You're using Python <= 2.5, but this package requires either Python "
1717 "2.7, or 3.3 or above, so you can't use it unless you upgrade your "
2121### Finished confirming correct Python version. ###############################
2222
2323if sys .version_info [0 ] == 3 :
24- source_folder = '. source_py3'
24+ source_folder = 'source_py3'
2525else :
26- source_folder = '. source_py2'
26+ source_folder = 'source_py2'
2727
2828
2929def get_python_toolbox_packages ():
@@ -37,7 +37,7 @@ def get_python_toolbox_packages():
3737
3838 '''
3939 return ['python_toolbox.' + p for p in
40- setuptools .find_packages ('. /python_toolbox' )] + \
40+ setuptools .find_packages ('%s /python_toolbox' % source_folder )] + \
4141 ['python_toolbox' ]
4242
4343
@@ -52,7 +52,8 @@ def get_test_python_toolbox_packages():
5252
5353 '''
5454 return ['test_python_toolbox.' + p for p in
55- setuptools .find_packages ('./test_python_toolbox' )] + \
55+ setuptools .find_packages ('%s/test_python_toolbox'
56+ % source_folder )] + \
5657 ['test_python_toolbox' ]
5758
5859
@@ -145,9 +146,10 @@ def get_packages():
145146 description = 'A collection of Python tools for various tasks' ,
146147 author = 'Ram Rachum' ,
147148 author_email = 'ram@rachum.com' ,
148- package_dir = source_folder ,
149+ package_dir = { '' : source_folder } ,
149150 packages = get_packages (),
150- scripts = ['test_python_toolbox/scripts/_test_python_toolbox.py' ],
151+ scripts = ['%s/test_python_toolbox/scripts/_test_python_toolbox.py'
152+ % source_folder ],
151153 long_description = my_long_description ,
152154 license = 'MIT' ,
153155 classifiers = my_classifiers ,
0 commit comments