Skip to content

Commit f27e7f8

Browse files
committed
-
1 parent 820ed58 commit f27e7f8

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

setup.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
# #
2121
### Finished confirming correct Python version. ###############################
2222

23-
if sys.version_info[0] == 3:
24-
source_folder = '.source_py3'
23+
if 'sdist' in sys.argv:
24+
source_folders = ('source_py2', 'source_py3')
25+
elif sys.version_info[0] == 3:
26+
source_folders = ('source_py3',)
2527
else:
26-
source_folder = '.source_py2'
28+
source_folders = ('source_py2',)
2729

2830

2931
def get_python_toolbox_packages():
@@ -37,7 +39,7 @@ def get_python_toolbox_packages():
3739
3840
'''
3941
return ['python_toolbox.' + p for p in
40-
setuptools.find_packages('./python_toolbox')] + \
42+
setuptools.find_packages('%s/python_toolbox' % source_folder)] + \
4143
['python_toolbox']
4244

4345

@@ -52,7 +54,8 @@ def get_test_python_toolbox_packages():
5254
5355
'''
5456
return ['test_python_toolbox.' + p for p in
55-
setuptools.find_packages('./test_python_toolbox')] + \
57+
setuptools.find_packages('%s/test_python_toolbox' % source_folder
58+
)] + \
5659
['test_python_toolbox']
5760

5861

@@ -145,9 +148,10 @@ def get_packages():
145148
description='A collection of Python tools for various tasks',
146149
author='Ram Rachum',
147150
author_email='ram@rachum.com',
148-
package_dir=source_folder,
151+
#package_dir={'': source_folder},
149152
packages=get_packages(),
150-
scripts=['test_python_toolbox/scripts/_test_python_toolbox.py'],
153+
scripts=['%s/test_python_toolbox/scripts/_test_python_toolbox.py'
154+
% source_folder],
151155
long_description=my_long_description,
152156
license='MIT',
153157
classifiers=my_classifiers,

0 commit comments

Comments
 (0)