diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ca9445264..3854a27e6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,17 +9,6 @@ on: branches: [ master ] workflow_dispatch: -env: - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_BUILD: cp3* - CIBW_ENVIRONMENT: "DEPLOY=ON" - CIBW_ARCHS_MACOS: "x86_64 arm64" - CIBW_TEST_SKIP: "*_arm64" - CIBW_SKIP: "*-win32 *-musllinux_i686 *-manylinux_i686" - CIBW_BUILD_VERBOSITY: 3 - CIBW_TEST_COMMAND: "python -c \"from jkq import qfr\"" - CIBW_BEFORE_BUILD: "pip install cmake" - jobs: build_wheels: name: Build wheels on ${{ matrix.os }} @@ -28,14 +17,13 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - steps: - uses: actions/checkout@v2 with: submodules: recursive - uses: ilammy/msvc-dev-cmd@v1 - name: Build wheels - uses: pypa/cibuildwheel@v2.2.2 + uses: pypa/cibuildwheel@v2.3.0 - uses: actions/upload-artifact@v2 with: path: ./wheelhouse/*.whl @@ -47,24 +35,19 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive - - uses: actions/setup-python@v2 name: Install Python with: python-version: '3.9' - - name: Install dependencies - run: | - python -m pip install --upgrade pip setuptools wheel + run: pip install -q build - name: Build sdist - run: python setup.py sdist - + run: python -m build --sdist - name: Test sdist run: pip install --verbose dist/*.tar.gz env: CC: "gcc-10" CXX: "g++-10" - - uses: actions/upload-artifact@v2 with: path: dist/*.tar.gz @@ -78,7 +61,6 @@ jobs: with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@master with: user: __token__ diff --git a/CMakeLists.txt b/CMakeLists.txt index c6671808e..7f0dd5bad 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.14...3.21) +cmake_minimum_required(VERSION 3.14...3.22) project(qfr LANGUAGES CXX - VERSION 1.7.2 + VERSION 1.7.3 DESCRIPTION "QFR - A JKQ library for Quantum Functionality Representation" ) @@ -21,6 +21,14 @@ if (DEFINED ENV{DEPLOY}) message(STATUS "Setting deployment configuration to '${DEPLOY}' from environment") endif () +# set deployment specific options +if (DEPLOY) + # build a universal macOS binary in case this is a deployment build + set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "" FORCE) + # set the macOS deployment target appropriately + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "" FORCE) +endif () + # build type settings set(default_build_type "Release") if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) diff --git a/README.md b/README.md index cbda64b23..98ef1f4ba 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ It acts as an intermediate representation and provides the facilitites to Building (and running) is continuously tested under Linux, MacOS, and Windows using the [latest available system versions for GitHub Actions](https://github.com/actions/virtual-environments). However, the implementation should be compatible with any current C++ compiler supporting C++17 and a minimum CMake version of 3.14. -*Disclaimer*: We noticed some issues when compiling with Microsoft's `MSCV` compiler toolchain. If you are developing under Windows, consider using the `clang` compiler toolchain. A detailed description of how to set this up can be +*Disclaimer*: We noticed some issues when compiling with Microsoft's `MSVC` compiler toolchain. If you are developing under Windows, consider using the `clang` compiler toolchain. A detailed description of how to set this up can be found [here](https://docs.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-160). It is recommended (although not required) to have [GraphViz](https://www.graphviz.org) installed for visualization purposes. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..dfe76fc2a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,19 @@ +[build-system] +requires = ["setuptools", "wheel", "cmake"] +build-backend = "setuptools.build_meta" + +[tool.cibuildwheel] +build = "cp3*" +skip = "*-win32 *-musllinux_i686 *-manylinux_i686 cp3{8,9,10}-macosx_x86_64" +test-skip = "*_arm64 *_universal2:arm64" +test-command = "python -c \"from jkq import qfr\"" +environment = { DEPLOY = "ON" } +build-verbosity = 3 + +[tool.cibuildwheel.linux] + +[tool.cibuildwheel.macos] +archs = "x86_64 universal2" +environment = { MACOSX_DEPLOYMENT_TARGET = "10.15", DEPLOY = "ON" } + +[tool.cibuildwheel.windows] diff --git a/setup.py b/setup.py index 270ab9621..d6261d68e 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ def build_extension(self, ext): setup( name='jkq.qfr', - version='1.7.2', + version='1.7.3', author='Lukas Burgholzer', author_email='lukas.burgholzer@jku.at', description='QFR - A JKQ tool for Quantum Functionality Representation', @@ -96,7 +96,5 @@ def build_extension(self, ext): 'Source': 'https://github.com/iic-jku/qfr/', 'Tracker': 'https://github.com/iic-jku/qfr/issues', 'Research': 'https://iic.jku.at/eda/research/quantum_dd', - }, - python_requires='>=3.6', - setup_requires=['cmake>=3.14'] + } )