From 8b958c577a7f5f484db42b7c26b0340e14fd9351 Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Thu, 25 Jun 2015 23:40:59 +0530 Subject: Use setuptools if present The main reason for this is the presence of `develop` command in setuptools. So by running `sudo python setup.py develop` - ranger gets installed, but you can easily make changes to the code and won't have to reinstall it. You can read more about it here: http://pythonhosted.org//setuptools/setuptools.html#development-mode It basically links an egg, so I had to add an appropriate line to .gitignore as well. --- setup.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 1e074f8d..cd3b80de 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,12 @@ # This file is part of ranger, the console file manager. # License: GNU GPL version 3, see the file "AUTHORS" for details. -import distutils.core +# Setuptools is superior but not available in the stdlib +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + import os.path import ranger @@ -11,7 +16,7 @@ def _findall(directory): if os.path.isfile(os.path.join(directory, f))] if __name__ == '__main__': - distutils.core.setup( + setup( name='ranger', description='Vim-like file manager', long_description=ranger.__doc__, -- cgit 1.4.1-2-gfad0