summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rwxr-xr-xsetup.py17
2 files changed, 15 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 9dbf38df..6d54530a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,8 +5,10 @@
 
 /.cache
 /build
+/dist
 /doc/ranger.1.html
 /install_log.txt
 /pytestdebug.log
+/ranger_fm.egg-info
 
 /stuff/*
diff --git a/setup.py b/setup.py
index 06bbb5b8..0ed861eb 100755
--- a/setup.py
+++ b/setup.py
@@ -4,10 +4,14 @@
 
 from __future__ import (absolute_import, division, print_function)
 
-import distutils.core  # pylint: disable=import-error,no-name-in-module
 import os
 import shutil
 
+try:
+    from setuptools import setup
+except ImportError:
+    from distutils.core import setup
+
 import ranger
 
 
@@ -24,9 +28,9 @@ def script(src_path, name):
     return dest_path
 
 
-if __name__ == '__main__':
-    distutils.core.setup(  # pylint: disable=no-member
-        name='ranger',
+def main():
+    setup(
+        name='ranger-fm',
         description='Vim-like file manager',
         long_description=ranger.__doc__,
         version=ranger.__version__,
@@ -34,6 +38,7 @@ if __name__ == '__main__':
         author_email=ranger.__email__,
         license=ranger.__license__,
         url='http://ranger.nongnu.org',
+
         scripts=[
             script('ranger.py', 'ranger'),
             script('ranger/ext/rifle.py', 'rifle'),
@@ -77,3 +82,7 @@ if __name__ == '__main__':
             'ranger.gui.widgets',
         ),
     )
+
+
+if __name__ == '__main__':
+    main()