diff options
author | Ivan Kolodyazhny <e0ne@e0ne.info> | 2020-03-20 13:29:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 13:29:21 +0200 |
commit | 08e8ae4875a9690739dc10b8a3410cb593d0138b (patch) | |
tree | 13656e1dcca535d75368caadaa49cd873fa38424 | |
parent | 31358919cf24b11f4f428d42c6240cbbdf730f51 (diff) | |
parent | 6ec33af0d01fe73d5ce2c48a9d784fb47596d641 (diff) | |
download | pyscss-08e8ae4875a9690739dc10b8a3410cb593d0138b.tar.gz |
Merge pull request #386 from hrw/master
make it work with setuptools v46
-rw-r--r-- | setup.py | 33 |
1 files changed, 15 insertions, 18 deletions
@@ -6,7 +6,7 @@ import os import platform import sys -from setuptools import setup, Extension, Feature +from setuptools import setup, Extension # this imports PROJECT, URL, VERSION, AUTHOR, AUTHOR_EMAIL, LICENSE, # DOWNLOAD_URL @@ -24,19 +24,19 @@ if sys.version_info < (2, 7): # fail safe compilation shamelessly stolen from the simplejson # setup.py file. Original author: Bob Ippolito -speedups = Feature( - 'optional C speed-enhancement module', - standard=True, - ext_modules=[ - # NOTE: header files are included by MANIFEST.in; Extension does not - # include headers in an sdist (since they're typically in /usr/lib) - Extension( - 'scss.grammar._scanner', - sources=['scss/src/_speedups.c', 'scss/src/block_locator.c', 'scss/src/scanner.c', 'scss/src/hashtable.c'], - libraries=['pcre'] - ), - ], -) +ext_modules = [ + # NOTE: header files are included by MANIFEST.in; Extension does not + # include headers in an sdist (since they're typically in /usr/lib) + Extension( + 'scss.grammar._scanner', + sources=['scss/src/_speedups.c', 'scss/src/block_locator.c', + 'scss/src/scanner.c', 'scss/src/hashtable.c'], + libraries=['pcre'] + ), +] + +extra_opts = {} +extra_opts['ext_modules'] = ext_modules ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError) if sys.platform == 'win32' and sys.version_info > (2, 6): @@ -83,9 +83,6 @@ def read(fname): def run_setup(with_binary): - features = {} - if with_binary: - features['speedups'] = speedups setup( name=PROJECT, version=VERSION, @@ -117,12 +114,12 @@ def run_setup(with_binary): 'scss.grammar', ], cmdclass={'build_ext': ve_build_ext}, - features=features, entry_points=""" [console_scripts] pyscss = scss.tool:main less2scss = scss.less2scss:main """, + **extra_opts ) |