Skip to content

Commit

Permalink
Fix cibuildwheel bug (#163)
Browse files Browse the repository at this point in the history
* Force deployment target

* Update readme
  • Loading branch information
Bruno Schmitt committed Sep 8, 2021
1 parent f1612f3 commit f2147fa
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 35 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/build_dev_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,9 @@ jobs:
fail-fast: false
matrix:
include:
# _Unsupported_ macOS-10.x
# - os: macos-10.15
# build: "cp3*-macosx_x86_64"
# name: macOS (10.9)
# target: '10.9'
# flags: CC=gcc-11 CXX=g++-11 CXXFLAGS="-static-libgcc -static-libstdc++"
# Supported macOS-10.x
- os: macos-10.15
build: "cp3*-macosx_x86_64"
# build: "cp3*-macosx_arm64 cp3*-macosx_x86_64"
name: macOS (10.15+)
target: '10.15'
# macOS-11
Expand Down Expand Up @@ -169,23 +162,19 @@ jobs:
with:
arch: ${{ matrix.arch }}

- name: Set Windows variables
if: runner.os == 'Windows'
shell: bash
run: |
echo "CC=cl.exe" >> $GITHUB_ENV
echo "CXX=cl.exe" >> $GITHUB_ENV
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.build }}
CIBW_ARCHS: all
CIBW_ENVIRONMENT: "${{ matrix.flags }} TWEEDLEDUM_DEV_VERSION=${{needs.setup_date.outputs.timestamp}}"
CIBW_ARCHS: all
CIBW_ENVIRONMENT_LINUX: "TWEEDLEDUM_DEV_VERSION=${{needs.setup_date.outputs.timestamp}}"
CIBW_ENVIRONMENT_MACOS: "${{ matrix.flags }} _PYTHON_HOST_PLATFORM=macosx-${{ matrix.target }}-x86_64"
CIBW_ENVIRONMENT_WINDOWS: "CC=cl.exe CXX=cl.exe"
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest --import-mode importlib -v {project}/python/test/
CMAKE_BUILD_PARALLEL_LEVEL: 2
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.target }}
TWEEDLEDUM_DEV_VERSION: ${{needs.setup_date.outputs.timestamp}}

- name: Upload built wheels
uses: actions/upload-artifact@v2
Expand Down
19 changes: 3 additions & 16 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,9 @@ jobs:
fail-fast: false
matrix:
include:
# _Unsupported_ macOS-10.x
# - os: macos-10.15
# build: "cp3*-macosx_x86_64"
# name: macOS (10.9)
# target: '10.9'
# flags: CC=gcc-11 CXX=g++-11 CXXFLAGS="-static-libgcc -static-libstdc++"
# Supported macOS-10.x
- os: macos-10.15
build: "cp3*-macosx_x86_64"
# build: "cp3*-macosx_arm64 cp3*-macosx_x86_64"
name: macOS (10.15+)
target: '10.15'
# macOS-11
Expand Down Expand Up @@ -159,19 +152,13 @@ jobs:
with:
arch: ${{ matrix.arch }}

- name: Set Windows variables
if: runner.os == 'Windows'
shell: bash
run: |
echo "CC=cl.exe" >> $GITHUB_ENV
echo "CXX=cl.exe" >> $GITHUB_ENV
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.build }}
CIBW_ARCHS: all
CIBW_ENVIRONMENT: "${{ matrix.flags }}"
CIBW_ARCHS: all
CIBW_ENVIRONMENT_MACOS: "${{ matrix.flags }} _PYTHON_HOST_PLATFORM=macosx-${{ matrix.target }}-x86_64"
CIBW_ENVIRONMENT_WINDOWS: "CC=cl.exe CXX=cl.exe"
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest --import-mode importlib -v {project}/python/test/
CMAKE_BUILD_PARALLEL_LEVEL: 2
Expand Down
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ passes in python.

# Installation

Tweedledum has two python packages that can be installed using `pip`. For both,
you will at least __Python 3.6__. The `tweedledum` package contains the latest
stable release. You can install it from PyPI using:
[Known issues](#known-issues) with _macOS High Sierra (10.13)_ and _macOS Mojave (10.14)_.

`tweedledum` has two python packages that can be installed using `pip`. For
both, you will at least __Python 3.6__. The `tweedledum` package contains the
latest stable release. You can install it from PyPI using:

* Latest stable release (Linux/Mac/Windows)

Expand Down Expand Up @@ -185,6 +187,26 @@ third-party tools and services. Thanks a lot!
- [**pybind11**](https://github.com/pybind/pybind11) - Seamless operability between C++11 and Python
- [**rang**](https://github.com/agauniyal/rang) - A Minimal, Header only Modern c++ library for terminal goodies

## Known issues

These are issues that hopefully will be fixed, but currently are unsolved. If
you know how to help with one of these issues, contributions are welcome!

### macOS: High Sierra (10.13) and Mojave (10.14)

`tweedledum` offers limited support for both systems. While wheels might be
available for some releases, it is strongly advised to install `tweedledum` or
`tweedledum-dev` by building them directly from source. For example:

```sh
CC=gcc-10 CXX=g++-10 CXXFLAGS="-static-libgcc -static-libstdc++" pip install tweedledum --no-binary :all:
```

Note that such command requires a working `gcc10` installation. (It also works
with `gcc11`, but no further tests were made.) I recommend the use of
[Homebrew](https://brew.sh) to install `gcc`. (Or maybe
[Tigerbrew](https://github.com/mistydemeo/tigerbrew))

## License

This software is licensed under the MIT licence (see
Expand Down

0 comments on commit f2147fa

Please sign in to comment.