summary refs log tree commit diff stats
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-02-10 02:38:47 +0100
committernfnty <git@nfnty.se>2017-02-10 03:11:26 +0100
commit144de5540dc118f9d1cd50d0b16e817616f367bc (patch)
treee6b34a15ccb15659d30462deb2fabd8d0963d948
parent912e26b49cb6f7ab29a0becc9887c8a934f6f780 (diff)
downloadranger-144de5540dc118f9d1cd50d0b16e817616f367bc.tar.gz
setup.py: Use `setuptools` by default, Change name for PyPI
-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()