Skip to content

Commit a9ec8aa

Browse files
committed
Merge pull request #49 from lamerman/distutils-fix
Backward compatibility for distutils added to setup.py
2 parents 952b92f + 02f7622 commit a9ec8aa

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

example/allinone/test.spy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ from common.common import common_func
1212
# iteration over command output
1313
for line in `ls -l`:
1414
# print of output with local variable capture
15-
print `echo LINE IS: {line}
15+
print `echo 'LINE IS: {line}'
1616

1717
# return code capture
1818
s = `ls -l | grep non_existent_string

example/allinone/test3.spy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ from common.common import common_func
1212
# iteration over command output
1313
for line in `ls -l`:
1414
# print of output with local variable capture
15-
print(`echo LINE IS: {line}`)
15+
print(`echo 'LINE IS: {line}'`)
1616

1717
# return code capture
1818
s = `ls -l | grep non_existent_string

setup.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,19 @@
22

33
try:
44
from setuptools import setup
5+
6+
args_for_setup = {'entry_points': {
7+
'console_scripts': {
8+
'shellpy = shellpython.shellpy:main'
9+
}
10+
}}
11+
512
except ImportError:
613
from distutils.core import setup
714

15+
args_for_setup = {'scripts': ['shellpy']}
16+
17+
818
setup(name='shellpy',
919
version='0.4.0',
1020
description='A convenient tool for shell scripting in python',
@@ -14,11 +24,7 @@
1424
download_url='https://github.com/lamerman/shellpy/tarball/0.4.0',
1525
keywords=['shell', 'bash', 'sh'],
1626
packages=['shellpython'],
17-
entry_points = {
18-
'console_scripts': {
19-
'shellpy = shellpython.shellpy:main'
20-
}
21-
},
2227
package_data={'shellpython': ['*.tpl']},
23-
install_requires=['colorama']
28+
install_requires=['colorama'],
29+
**args_for_setup
2430
)

shellpy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shellpython/shellpy.py

shellpython/shellpy.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)