diff --git a/HISTORY.rst b/HISTORY.rst index 75e684b..ab798ed 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +?.?.? (????-??-??) +++++++++++++++++++ + +* Added --noexts option for setup.py to avoid trying to build the C extensions + 0.2.2 (2014-03-27) ++++++++++++++++++ diff --git a/README.rst b/README.rst index 1b6428b..4de9ad6 100644 --- a/README.rst +++ b/README.rst @@ -19,6 +19,12 @@ fuzzysearch is useful for finding approximate subsequence matches * Free software: `MIT license `_ * Documentation: http://fuzzysearch.rtfd.org. +Installation +------------ +Just install using pip:: + + $ pip install fuzzysearch + Features -------- diff --git a/docs/installation.rst b/docs/installation.rst index e597bce..0bc19f6 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -4,9 +4,15 @@ Installation At the command line:: - $ easy_install fuzzysearch + $ pip install fuzzysearch Or, if you have virtualenvwrapper installed:: $ mkvirtualenv fuzzysearch - $ pip install fuzzysearch \ No newline at end of file + $ pip install fuzzysearch + +Installation should succeed even if building the C extensions fails. If not, +you can force the installation to skip building the extensions:: + + $ pip install fuzzysearch --noexts + diff --git a/setup.py b/setup.py index 673ccb3..83dec84 100644 --- a/setup.py +++ b/setup.py @@ -10,9 +10,13 @@ from distutils.command.build_ext import build_ext from distutils.errors import CCompilerError, DistutilsExecError, \ DistutilsPlatformError -if sys.argv[-1] == 'publish': - os.system('python setup.py sdist upload') - sys.exit() +# --noexts: don't try building the C extensions +if '--noexts' in sys.argv[1:]: + del sys.argv[sys.argv[1:].index('--noexts') + 1] + noexts = True +else: + noexts = False + def readfile(file_path): dir_path = os.path.dirname(os.path.abspath(__file__)) @@ -151,7 +155,7 @@ def try_building_extension(): echo(line) -if not (is_pypy or is_jython): +if not (noexts or is_pypy or is_jython): try_building_extension() else: run_setup(False) \ No newline at end of file