Skip to content

Commit

Permalink
fix conda
Browse files Browse the repository at this point in the history
fix failed conda merge request: conda-forge/frozendict-feedstock#48
  • Loading branch information
Marco-Sulla authored Nov 24, 2023
1 parent fd3741b commit 6addde9
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 @@ -190,10 +190,11 @@ def get_ext_module_1(optional):

# C Extension is optional by default from version 2.3.5
# If the module is built by pipeline, C Extension must be mandatory.
optional = environ.get('CIBUILDWHEEL', '0') != '1'
optional = environ.get('CIBUILDWHEEL') != '1'

# Check if build the pure py implementation
pure_py = environ.get('FROZENDICT_PURE_PY', '0') == '1'
pure_py_env = environ.get('FROZENDICT_PURE_PY')
pure_py = pure_py_env == '1'

mix_c_py_error = ValueError(
"You can't specify the pure py implementation *and* C extension togheter"
Expand All @@ -214,7 +215,8 @@ def get_ext_module_1(optional):
raise mix_c_py_error

if custom_arg in custom_args_py:
if not pure_py:
# check if pure py explicitly disabled
if pure_py_env == '0':
raise mix_c_py_error

setuptools.setup(**common_setup_args)
Expand Down

0 comments on commit 6addde9

Please sign in to comment.