summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kolodyazhny <e0ne@e0ne.info>2020-03-26 16:48:22 +0200
committerGitHub <noreply@github.com>2020-03-26 16:48:22 +0200
commit89038d35138df10cd909c35daaed1507056556b9 (patch)
treea7018b364ea537cbc8a8e4c7654cdd2c5db19f59
parent4f97acd2498de985f45e3127c985eafd71d34534 (diff)
parent90022c76d3456f2166c133676665c9bf1c7c1421 (diff)
downloadpyscss-89038d35138df10cd909c35daaed1507056556b9.tar.gz
Merge pull request #394 from e0ne/optional-build
Make C extension optional
-rw-r--r--setup.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 840d2fd..fb5fede 100644
--- a/setup.py
+++ b/setup.py
@@ -35,9 +35,6 @@ ext_modules = [
),
]
-extra_opts = {}
-extra_opts['ext_modules'] = ext_modules
-
ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError)
if sys.platform == 'win32' and sys.version_info > (2, 6):
# 2.6's distutils.msvc9compiler can raise an IOError when failing to
@@ -83,6 +80,11 @@ def read(fname):
def run_setup(with_binary):
+ if with_binary:
+ extra_opts = {}
+ extra_opts['ext_modules'] = ext_modules
+ else:
+ extra_opts = {}
setup(
name=PROJECT,
version=VERSION,