diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index c19f5e1..9ac0c16 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -51,9 +51,28 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] # windows-latest + os: [ubuntu-latest, macos-latest, windows-latest] + architecture: ['x64'] + include: + - os: windows-latest + architecture: 'x86' + CIBW_SKIP: "*2*win* *win_amd64" + CIBW_ENVIRONMENT_WINDOWS: INCLUDE="C:/Program Files (x86)/Snappy/include" LIB="C:/Program Files (x86)/Snappy/lib" + - os: windows-latest + architecture: 'x64' + CIBW_SKIP: "*2*win* *win32" + CIBW_ENVIRONMENT_WINDOWS: INCLUDE="C:/Program Files/Snappy/include" LIB="C:/Program Files/Snappy/lib" name: Python ${{ matrix.os }} + env: + CIBW_TEST_REQUIRES: pytest + CIBW_TEST_COMMAND: "python -m pytest --verbose {project}/test_snappy.py" + CIBW_BEFORE_ALL_LINUX: yum install -y snappy-devel + MACOSX_DEPLOYMENT_TARGET: "10.9" + CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}" + CIBW_BEFORE_ALL: "bash {project}/build_snappy.sh" + CIBW_SKIP: ${{ matrix.CIBW_SKIP }} + CIBW_ENVIRONMENT_WINDOWS: ${{ matrix.CIBW_ENVIRONMENT_WINDOWS }} steps: - uses: actions/checkout@v2 @@ -61,11 +80,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.8" + architecture: ${{ matrix.architecture }} - - name: Install Visual C++ for Python 2.7 - if: runner.os == 'Windows' - run: | - choco install vcpython27 -f -y +# - name: Install Visual C++ for Python 2.7 +# if: runner.os == 'Windows' +# run: | +# choco install vcpython27 -f -y - name: Add msbuild to PATH if: runner.os == 'Windows' @@ -75,17 +95,14 @@ jobs: run: | python -m pip install cibuildwheel==1.8.0 + - name: delvewheel install + if: runner.os == 'Windows' + run: | + python -m pip install delvewheel==0.0.9 + - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse - env: - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: "python -m pytest --verbose {project}/test_snappy.py" - CIBW_BEFORE_ALL_LINUX: yum install -y snappy-devel - CIBW_BEFORE_ALL: "bash {project}/build_snappy.sh" - MACOSX_DEPLOYMENT_TARGET: "10.9" - CIBW_SKIP: "*2*win*" - CIBW_ENVIRONMENT_WINDOWS: INCLUDE="C:/Program Files (x86)/Snappy/include":$INCLUDE - uses: actions/upload-artifact@v2 with: diff --git a/setup.py b/setup.py index 102f20d..f679963 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,12 @@ except ImportError: from distutils.core import setup, Extension +import os + +sys.stderr.write("#" * 100 + "\n") +sys.stderr.write(os.environ.get("LIBPATH", "libpath not found") + "\n") +sys.stderr.write("#" * 100 + "\n") + version = '0.6.0' long_description = """ Python bindings for the snappy compression library from Google.