summary refs log tree commit diff stats
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-02-09 15:18:25 +0100
committernfnty <git@nfnty.se>2017-02-09 15:19:11 +0100
commit1a6d1846939e56a169e1584f03d352edf3ac5d76 (patch)
treef7636463cb5f59c1c61a14ee927372dcef2c1fc2
parent31277e06fb83c3ceedd0613f881e79e78a38e7e5 (diff)
downloadranger-1a6d1846939e56a169e1584f03d352edf3ac5d76.tar.gz
setup.py: Minor fixes
Remove underscores from functions
Prevent scripts path conflict
-rwxr-xr-xsetup.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/setup.py b/setup.py
index 56ace9ce..06bbb5b8 100755
--- a/setup.py
+++ b/setup.py
@@ -11,15 +11,15 @@ import shutil
 import ranger
 
 
-def _findall(directory):
+def findall(directory):
     return [os.path.join(directory, f) for f in os.listdir(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)
+def script(src_path, name):
+    if not os.path.exists('build/scripts_tmp'):
+        os.makedirs('build/scripts_tmp')
+    dest_path = os.path.join('build/scripts_tmp', name)
     shutil.copy(src_path, dest_path)
     return dest_path
 
@@ -35,8 +35,8 @@ if __name__ == '__main__':
         license=ranger.__license__,
         url='http://ranger.nongnu.org',
         scripts=[
-            _script('ranger.py', 'ranger'),
-            _script('ranger/ext/rifle.py', 'rifle'),
+            script('ranger.py', 'ranger'),
+            script('ranger/ext/rifle.py', 'rifle'),
         ],
         data_files=[
             ('share/applications', [
@@ -52,10 +52,10 @@ if __name__ == '__main__':
                 'HACKING.md',
                 'README.md',
             ]),
-            ('share/doc/ranger/config', _findall('doc/config')),
-            ('share/doc/ranger/config/colorschemes', _findall('doc/config/colorschemes')),
-            ('share/doc/ranger/examples', _findall('examples')),
-            ('share/doc/ranger/tools', _findall('doc/tools')),
+            ('share/doc/ranger/config', findall('doc/config')),
+            ('share/doc/ranger/config/colorschemes', findall('doc/config/colorschemes')),
+            ('share/doc/ranger/examples', findall('examples')),
+            ('share/doc/ranger/tools', findall('doc/tools')),
         ],
         package_data={
             'ranger': [