diff --git a/README.md b/README.md index 3fde95d..3ccf09e 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,17 @@ To install for __Python 3__, execute the following: sudo pip3 install -r requirements.txt sudo python3 setup.py install + +To install this tool in a [virtual environment](https://pypi.python.org/pypi/virtualenv), execute the following steps: + + # Set up the virtual environment. Replace $python_global with the path to your Python executable. "venv" is the name of the subdirectory that will be created, and can be anything. + $python_global -m virtualenv venv + . venv/bin/activate + pip install -r requirements.txt + # Tell distutils to use the current environment's Python executable, + # which will then be handled by virtualenv. + python setup.py build -e "/usr/bin/env python" + python setup.py install ## Known Issues diff --git a/setup.py b/setup.py index f333fb8..27ef80d 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,12 @@ #!/usr/bin/env python from mp import version -from distutils.core import setup +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + + setup(name='mpfshell', version=version.FULL,