summary refs log tree commit diff stats
diff options
context:
space:
mode:
l---------scripts/ranger1
l---------scripts/rifle1
-rwxr-xr-xsetup.py16
3 files changed, 14 insertions, 4 deletions
diff --git a/scripts/ranger b/scripts/ranger
deleted file mode 120000
index 21b7d3ee..00000000
--- a/scripts/ranger
+++ /dev/null
@@ -1 +0,0 @@
-../ranger.py
\ No newline at end of file
diff --git a/scripts/rifle b/scripts/rifle
deleted file mode 120000
index 1dbaa2d8..00000000
--- a/scripts/rifle
+++ /dev/null
@@ -1 +0,0 @@
-../ranger/ext/rifle.py
\ No newline at end of file
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',