vapier      14/09/04 18:58:24

  Added:                pybootd-scripts.patch
  Log:
  Initial ebuild by Hung-Te Lin & me.
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
D2E96200)

Revision  Changes    Path
1.1                  net-ftp/pybootd/files/pybootd-scripts.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/pybootd/files/pybootd-scripts.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/pybootd/files/pybootd-scripts.patch?rev=1.1&content-type=text/plain

Index: pybootd-scripts.patch
===================================================================
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'),
 )




Reply via email to