Skip to content

Commit

Permalink
try read environment variable
Browse files Browse the repository at this point in the history
enable windows build

fix print, change include path  


try environment variable formating

check LIBPATH environment variable

check libpath


check LIB variable

extract win32 builds

use delvewheel

fix CIBW_REPAIR_WHEEL_COMMAND_WINDOWS

fix delvewheel install

ommitrt vcpython27 install

new matrix for windows

Update wheel.yml

fix python architecture

update windows variables
  • Loading branch information
Czaki committed Feb 2, 2021
1 parent 335a805 commit 7cf989a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 13 deletions.
43 changes: 30 additions & 13 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,41 @@ 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

- name: Setup Python
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'
Expand All @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7cf989a

Please sign in to comment.