Skip to content
Permalink
Browse files
combine a couple branches to address issues with python wheels
  • Loading branch information
Jon committed May 3, 2022
1 parent 1c745cb commit 70e2a6613a9c842977557261846e36151b269d76
Showing 4 changed files with 18 additions and 30 deletions.
@@ -16,18 +16,12 @@ jobs:
name: Source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
persist-credentials: false
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.8'

- name: Install Python dependencies
run: python -m pip install --upgrade pip setuptools wheel numpy tox pytest build
python-version: '3.x'

- name: Build sdist
run: python setup.py sdist
@@ -44,42 +38,35 @@ jobs:
matrix:
config:
- {
name: "MacOS Latest, Clang",
os: macos-latest,
cc: "clang", cxx: "clang++"
name: "MacOS 10.15",
os: macos-latest
}
- {
name: "Ubuntu Latest, GCC",
os: ubuntu-latest,
cc: "gcc", cxx: "g++"
name: "Ubuntu Latest",
os: ubuntu-latest
}
- {
name: "Windows Latest, MSVC",
os: windows-latest,
cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
name: "Windows Latest",
os: windows-latest
}

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
persist-credentials: false
uses: actions/checkout@v3

- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.x'

- name: Install Python dependencies
run: python -m pip install --upgrade pip setuptools wheel numpy tox pytest build cibuildwheel==2.1.1 twine
run: python -m pip install cibuildwheel==2.5.0

- name: Build wheels
run: python -m cibuildwheel --output-dir dist
env:
CIBW_SKIP: "*-win32"
CIBW_ARCHS_MACOS: "x86_64 universal2"
CIBW_SKIP: "*-win32 pp*-macosx*"
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"

- uses: actions/upload-artifact@v2
with:
@@ -17,7 +17,7 @@

cmake_minimum_required(VERSION 3.12.0)
project(DataSketches
VERSION 3.2.0
VERSION 3.3.0
LANGUAGES CXX)

include(GNUInstallDirs)
@@ -19,7 +19,7 @@ find_package(Python3 COMPONENTS Interpreter Development)

# only Windows+MSVC seems to have trouble locating pybind11
if (MSVC)
execute_process(COMMAND cmd.exe /c ${CMAKE_CURRENT_SOURCE_DIR}/pybind11Path.cmd "${Python3_EXECUTABLE}"
execute_process(COMMAND cmd.exe /c ${CMAKE_CURRENT_SOURCE_DIR}/pybind11Path.cmd "${Python_EXECUTABLE}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE EXTRA_PACKAGE_PATH)
@@ -51,7 +51,8 @@ def build_extension(self, ext):
cmake_args += ['-DWITH_PYTHON=True']
cmake_args += ['-DCMAKE_CXX_STANDARD=11']
# ensure we use a consistent python version
cmake_args += ['-DPython3_EXECUTABLE=' + sys.executable]
cmake_args += ['-DPython_EXECUTABLE=' + sys.executable]
cmake_args += ['-DPython_ROOT_DIR=' + os.path.dirname(sys.executable)]
cfg = 'Debug' if self.debug else 'Release'
build_args = ['--config', cfg]

0 comments on commit 70e2a66

Please sign in to comment.