Disable extensions on Python 2.7 for Windows.

pull/194/head
Graham Dumpleton 12 months ago
parent a4777802d0
commit 8e73ebdf2c
  1. 3
      .github/workflows/main.yml
  2. 12
      setup.py

@ -86,6 +86,7 @@ jobs:
os:
- windows-latest
python-version:
- 2.7
- 3.5
- 3.6
- 3.7
@ -151,7 +152,7 @@ jobs:
output-dir: dist
env:
WRAPT_INSTALL_EXTENSIONS: true # Require extensions.
CIBW_SKIP: pp* # Skip wheels for PyPy.
CIBW_SKIP: pp* cp27-win* # Skip wheels for PyPy and Python 2.7 on Windows.
- uses: actions/upload-artifact@v2
with:
name: dist

@ -1,4 +1,5 @@
import os
import sys
import platform
import setuptools
@ -6,14 +7,21 @@ import setuptools
# # --- Detect if extensions should be disabled ------------------------------
wrapt_env = os.environ.get('WRAPT_INSTALL_EXTENSIONS')
if wrapt_env is None:
wrapt_env = os.environ.get('WRAPT_EXTENSIONS')
if wrapt_env is not None:
disable_extensions = wrapt_env.lower() == 'false'
force_extensions = wrapt_env.lower() == 'true'
else:
disable_extensions = False
force_extensions = False
if platform.system() == 'Windows' and sys.version_info[0] < 3:
disable_extensions = True
force_extensions = False
else:
disable_extensions = False
force_extensions = False
if platform.python_implementation() != "CPython":
disable_extensions = True

Loading…
Cancel
Save