Skip to content

Commit

Permalink
Make C extension optional
Browse files Browse the repository at this point in the history
C excension is just a speedup, so we don't need to fail the installation
if the build is failed.

It's a follow-up fix for 6ec33af.

Closes: issue #393
  • Loading branch information
e0ne committed Mar 25, 2020
1 parent 4f97acd commit 90022c7
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 90022c7

Please sign in to comment.