summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin@juszkiewicz.com.pl>2020-03-11 17:37:34 +0100
committerMarcin Juszkiewicz <marcin@juszkiewicz.com.pl>2020-03-20 09:53:33 +0100
commit6ec33af0d01fe73d5ce2c48a9d784fb47596d641 (patch)
tree13656e1dcca535d75368caadaa49cd873fa38424
parent31358919cf24b11f4f428d42c6240cbbdf730f51 (diff)
downloadpyscss-6ec33af0d01fe73d5ce2c48a9d784fb47596d641.tar.gz
make it work with setuptools v46
-rw-r--r--setup.py33
1 files changed, 15 insertions, 18 deletions
diff --git a/setup.py b/setup.py
index 7e7044d..840d2fd 100644
--- a/setup.py
+++ b/setup.py
@@ -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
)