summaryrefslogtreecommitdiff
blob: 71a001f44798c846f23c6626f4491d06b2735083 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
install the pybootd.py helper as pybootd otherwise the import gets confused

--- a/setup.py
+++ b/setup.py
@@ -18,13 +18,23 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
+import shutil
 from distutils.core import setup
+import distutils.command.install_scripts
 
 
 def _read(fname):
     import os
     return open(os.path.join(os.path.dirname(__file__), fname)).read()
 
+class script_rename(distutils.command.install_scripts.install_scripts):
+
+    def run(self):
+        distutils.command.install_scripts.install_scripts.run(self)
+        for script in self.get_outputs():
+            if script.endswith('.py'):
+                shutil.move(script, script[:-3])
+
 setup(
     name='pybootd',
     version='1.5.0',
@@ -56,5 +66,7 @@ setup(
     package_data = {
         '': ['etc/*.ini', 'etc/*.cfg'],
     },
+    cmdclass = {'install_scripts': script_rename},
+    scripts = ['pybootd.py'],
     long_description=_read('README.rst'),
 )