summary refs log tree commit diff stats
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 16ab88c7..56ace9ce 100755
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,8 @@
 from __future__ import (absolute_import, division, print_function)
 
 import distutils.core  # pylint: disable=import-error,no-name-in-module
-import os.path
+import os
+import shutil
 
 import ranger
 
@@ -15,6 +16,14 @@ def _findall(directory):
             if os.path.isfile(os.path.join(directory, f))]
 
 
+def _script(src_path, name):
+    if not os.path.exists('build/scripts'):
+        os.makedirs('build/scripts')
+    dest_path = os.path.join('build/scripts', name)
+    shutil.copy(src_path, dest_path)
+    return dest_path
+
+
 if __name__ == '__main__':
     distutils.core.setup(  # pylint: disable=no-member
         name='ranger',
@@ -25,7 +34,10 @@ if __name__ == '__main__':
         author_email=ranger.__email__,
         license=ranger.__license__,
         url='http://ranger.nongnu.org',
-        scripts=['scripts/ranger', 'scripts/rifle'],
+        scripts=[
+            _script('ranger.py', 'ranger'),
+            _script('ranger/ext/rifle.py', 'rifle'),
+        ],
         data_files=[
             ('share/applications', [
                 'doc/ranger.desktop',