diff options
author | Eevee (Alex Munroe) <eevee.git@veekun.com> | 2014-05-02 17:31:00 -0700 |
---|---|---|
committer | Eevee (Alex Munroe) <eevee.git@veekun.com> | 2014-05-02 17:31:00 -0700 |
commit | c206f1ddf5bf5302ba16836c60c8c2ee5df48f40 (patch) | |
tree | 353ea55a7528726e8dc33bec47c0dcfed67af4d0 /setup.py | |
parent | 33166518a49bb682ebe9d4102dee8759ffb41f5e (diff) | |
download | pyscss-c206f1ddf5bf5302ba16836c60c8c2ee5df48f40.tar.gz |
Remove the runtime C speedups warning. Fixes #83.
Also mentions the PCRE dependency, which seems to trip up OS X users a
lot.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -1,11 +1,13 @@ #!/usr/bin/env python +from distutils.command.build_ext import build_ext +from distutils.errors import CCompilerError, DistutilsExecError, \ + DistutilsPlatformError import os +import platform import sys + from setuptools import setup, Extension, Feature from setuptools.dist import Distribution -from distutils.command.build_ext import build_ext -from distutils.errors import CCompilerError, DistutilsExecError, \ - DistutilsPlatformError # Need to install `six` to be able to import from the scss namespace Distribution(dict(setup_requires='six')) @@ -15,9 +17,6 @@ from scss.scss_meta import PROJECT, URL, VERSION, AUTHOR, AUTHOR_EMAIL, LICENSE, # fail safe compilation shamelessly stolen from the simplejson # setup.py file. Original author: Bob Ippolito -is_jython = 'java' in sys.platform -is_pypy = hasattr(sys, 'pypy_version_info') - speedups = Feature( 'optional C speed-enhancement module', standard=True, @@ -136,11 +135,16 @@ def try_building_extension(): echo(LINE) echo(BUILD_EXT_WARNING) + echo('pyScss will still work fine, but may be slower.') + echo( + 'The most likely cause is missing PCRE headers; you may need to ' + 'install libpcre or libpcre-dev, depending on your platform.' + ) echo('Plain-Python installation succeeded.') echo(LINE) -if not (is_pypy or is_jython): +if platform.python_implementation() == 'CPython': try_building_extension() else: run_setup(False) |