Skip to content

Commit

Permalink
Merge pull request #394 from e0ne/optional-build
Browse files Browse the repository at this point in the history
Make C extension optional
  • Loading branch information
e0ne authored Mar 26, 2020
2 parents 4f97acd + 90022c7 commit 89038d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
),
]

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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 89038d3

Please sign in to comment.