diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 7aac3dfb..792792a0 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -18,13 +18,16 @@ on: - published env: - CIBW_ENVIRONMENT: "PIP_ONLY_BINARY=numpy SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}" SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.overrideVersion }} + CIBW_ENVIRONMENT: "PIP_ONLY_BINARY=numpy SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}" + CIBW_TEST_EXTRAS: test + CIBW_TEST_COMMAND: "pytest {project}/tests" + CIBW_TEST_SKIP: "pp*macos* pp*win* pp27-* *universal2:arm64" jobs: build_sdist: name: Build SDist - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v1 with: @@ -40,6 +43,38 @@ jobs: with: path: dist/*.tar.gz + build_arch_wheels: + name: ${{ matrix.python }} on ${{ matrix.arch }} + runs-on: ubuntu-20.04 + strategy: + matrix: + python: [36, 37, 38, 39] + arch: [aarch64] + steps: + + - uses: actions/checkout@v1 + with: + submodules: true + + - uses: docker/setup-qemu-action@v1 + with: + platforms: all + + - uses: joerick/cibuildwheel@v1.9.0 + env: + CIBW_BUILD: cp${{ matrix.python }}-* + CIBW_ARCHS: ${{ matrix.arch }} + + - name: Verify clean directory + run: git diff --exit-code + shell: bash + + - name: Upload wheels + uses: actions/upload-artifact@v2 + with: + path: wheelhouse/*.whl + + build_wheels: name: ${{ matrix.type }} ${{ matrix.arch }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -49,27 +84,31 @@ jobs: os: [windows-latest, macos-latest] arch: [auto64] type: [Standard] + build: ["*"] include: - os: ubuntu-latest type: Standard arch: auto + build: "cp3* pp*" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010 CIBW_MANYLINUX_I686_IMAGE: manylinux2010 - os: ubuntu-latest type: ManyLinux1 arch: auto + build: "cp{27,35,36,37,38}-*" CIBW_MANYLINUX_X86_64_IMAGE: skhep/manylinuxgcc-x86_64 CIBW_MANYLINUX_I686_IMAGE: skhep/manylinuxgcc-i686 - os: macos-latest - type: Standard arch: universal2 + build: "*" - os: windows-latest - type: Standard arch: auto32 + build: "*" + steps: - uses: actions/checkout@v1 with: @@ -77,13 +116,11 @@ jobs: - uses: joerick/cibuildwheel@v1.9.0 env: - CIBW_SKIP: cp27-win* pp27* + CIBW_BUILD: ${{ matrix.build }} + CIBW_SKIP: cp27-win* pp27-win* CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.CIBW_MANYLINUX_I686_IMAGE }} CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.CIBW_MANYLINUX_X86_64_IMAGE }} CIBW_ARCHS: ${{ matrix.arch }} - CIBW_TEST_EXTRAS: test - CIBW_TEST_COMMAND: "pytest {project}/tests" - CIBW_TEST_SKIP: "pp*macos* *universal2:arm64" - name: Verify clean directory run: git diff --exit-code @@ -124,8 +161,6 @@ jobs: CIBW_BUILD: cp27-win32 DISTUTILS_USE_SDK: 1 MSSdk: 1 - CIBW_TEST_EXTRAS: test - CIBW_TEST_COMMAND: "pytest {project}/tests" - name: Verify clean directory run: git diff --exit-code @@ -137,13 +172,11 @@ jobs: upload_all: name: Upload if release - needs: [build_wheels, build_win27_wheels, build_sdist] + needs: [build_wheels, build_win27_wheels, build_arch_wheels, build_sdist] runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/setup-python@v2 - - uses: actions/download-artifact@v2 with: name: artifact diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d7cfe991..00000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: python - -git: - depth: false - -branches: - only: - - master - - travisci - - "/^v\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/" - -jobs: - include: - - services: docker - env: CIBW_BUILD="cp36* cp37*" NPY_NUM_BUILD_JOBS=2 - arch: arm64 - - services: docker - env: CIBW_BUILD="cp38* cp39*" NPY_NUM_BUILD_JOBS=2 - arch: arm64 - - services: docker - arch: ppc64le - env: CIBW_SKIP="cp35* cp36*" NPY_NUM_BUILD_JOBS=1 - # - services: docker - # arch: s390x - # beta - Doesn't always work. Wait till Travis fixes. - # -install: -- sudo rm -r $HOME/.cache -- python3 -m pip install --upgrade twine setuptools setuptools_scm pip cryptography -- python3 -m pip install cibuildwheel==1.8.0 - -script: -- sed -i '/numpy/d' pyproject.toml -- CIBW_BUILD_VERBOSITY=1 CIBW_ENVIRONMENT="SETUPTOOLS_SCM_PRETEND_VERSION=\"$TRAVIS_TAG\"" travis_wait 60 python3 -m cibuildwheel --output-dir dist - -deploy: - provider: pypi - distributions: "--license" # Trick travis, see https://github.com/travis-ci/dpl/blob/577fb987337b6275f85cc104a38df30d030a860e/lib/dpl/providers/pypi.rb#L36 - username: "__token__" - skip_cleanup: true - on: - tags: true - password: - secure: CzkempBr8UTAa2J1vAY1vRBXRvgY0jJ1G8Q1tRigXAzwxHXwopYQ4ai4DF1hp9ecsOpxU7+1RYctvFEzmhDdDixxM3/Byc4ialeYM4bwS9Ynf9VtgkGQUGRjNLZJAcO3+8Npvu79XUgjuHOKUXjHPZSgd2V3Wo8JtDcW1v2DVeRtxD7EkXKRkLcH7IHmjLMRrZ0gkvS+U464zY63K64bdvSNHmCn/4aGpHki3VWxdZJfAZrKgBtdV6agmt3Vj/lBkvIYQLqqbKY74fdGPtky/w3OMY4whTO0xN5Lxz51Q/SAu9G5iN1gz3brvt4MxgzL35RnrGjq14brzPJndz1v4O4igYyvayROJ7ZXUsB9MlMKxNyXWrJ56JEHGWNWFf/m2+Icgrc2JPuLqxAa68EYVW+VkP+4aL1lxCLpGq+J0sutv8YtzpXQ9Ugv4a/wpUnRto9YfMettQFEZ262fHANzyNmhIdWRSHKHSxvK9Q36lnTVa90NaXq8ndsS0ZBvSCb6VTbZjbj7HjQC0ee1yMT1hHQOCnefo7XaiCbWqqGXeth5AoyXfVXKP/abJdVWqdXLyPMCU6xzQVUOuyafAJcZejUuG+zFTUD7tOrWu+sjfl5Vbumvg9gvPhB5p4MTblLWjM793effm/87eo832DWV/ydbWRSMKaFGxXgtuDgGcs= diff --git a/README.md b/README.md index f3bc3097..3f15a6bb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ # boost-histogram for Python [![Actions Status][actions-badge]][actions-link] -[![Travis-CI][travis-badge]][travis-link] [![Documentation Status][rtd-badge]][rtd-link] [![Code style: black][black-badge]][black-link] @@ -162,31 +161,33 @@ The easiest way to get boost-histogram is to use a binary wheel, which happens w python -m pip install boost-histogram ``` -Wheels are produced using [cibuildwheel](https://cibuildwheel.readthedocs.io/en/stable/); all platforms supported by cibuildwheel are provided in boost-histogram: +Wheels are produced using [cibuildwheel](https://cibuildwheel.readthedocs.io/en/stable/); all common platforms have wheels provided in boost-histogram: | System | Arch | Python versions | PyPy versions | |---------|-----|------------------|--------------| -| ManyLinux1 (custom GCC 9.2) | 32 & 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 | | +| ManyLinux1 (custom GCC 9.2) | 32 & 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8 | | | ManyLinux2010 | 32 & 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 | 7.3: 2.7, 3.6, 3.7 | -| ManyLinux2014 | ARM64 & PowerPC | 3.5, 3.6, 3.7, 3.8, 3.9 | | +| ManyLinux2014 | ARM64 | 3.6, 3.7, 3.8, 3.9 | | | macOS 10.9+ | 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 | 7.3: 2.7, 3.6, 3.7 | +| macOS Universal2 | Arm64 | 3.9 | | | Windows | 32 & 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 | (32 bit) 7.3: 2.7, 3.6, 3.7 | -* manylinux1: Using a custom docker container with GCC 9; should work but can't be called directly other compiled extensions unless they do the same thing (think that's the main caveat). Supporting 32 bits because it's there. +* manylinux1: Using a custom docker container with GCC 9; should work but can't be called directly other compiled extensions unless they do the same thing (think that's the main caveat). Supporting 32 bits because it's there. Anything running Python 3.9 should be compatible with manylinux2010, so manylinux1 not provided for Python 3.9 (like NumPy). * manylinux2010: Requires pip 10+ and a version of Linux newer than 2010. * Windows: pybind11 requires compilation with a newer copy of Visual Studio than Python 2.7's Visual Studio 2008; you need to have the [Visual Studio 2015 distributable][msvc2015] installed (the dll is included in 2017 and 2019, as well). * PyPy: Supported on all platforms that `cibuildwheel` supports, in pypy2, pypy3.6, and pypy3.7 variants. -* ARM and PowerPC on Linux is supported for newer Python versions via manylinux2014. +* ARM on Linux is supported for newer Python versions via manylinux2014. PowerPC or IBM-Z available on request. +* macOS Universal2 wheels for Apple Silicon and Intel provided for Python 3.9 (requires Pip 21.0.1). [msvc2015]: https://www.microsoft.com/en-us/download/details.aspx?id=48145 -If you are on a Linux system that is not part of the "many" in manylinux, such as Alpine or ClearLinux, building from source is usually fine, since the compilers on those systems are often quite new. It will just take a little longer to install when it's using the sdist instead of a wheel. +If you are on a Linux system that is not part of the "many" in manylinux, such as Alpine or ClearLinux, building from source is usually fine, since the compilers on those systems are often quite new. It will just take longer to install when it is using the sdist instead of a wheel. #### Conda-Forge -The boost-histogram package is available on Conda-Forge, as well. All supported versions are available with the exception of Python 2.7, which is no longer supported by conda-forge directly. If you really need boost-histogram + Conda + Python 2.7, please open an issue. +The boost-histogram package is available on Conda-Forge, as well. All supported versions are available with the exception of Python 2.7, which is no longer supported by conda-forge directly. ```bash conda install -c conda-forge boost-histogram @@ -278,8 +279,6 @@ Support for this work was provided by the National Science Foundation cooperativ [rtd-badge]: https://readthedocs.org/projects/boost-histogram/badge/?version=latest [rtd-link]: https://boost-histogram.readthedocs.io/en/latest/?badge=latest [sk-badge]: https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg -[travis-badge]: https://travis-ci.com/scikit-hep/boost-histogram.svg?branch=master -[travis-link]: https://travis-ci.com/scikit-hep/boost-histogram [Boost::Histogram]: https://www.boost.org/doc/libs/release/libs/histogram/doc/html/index.html [Boost::Histogram source]: https://github.com/boostorg/histogram diff --git a/src/boost_histogram/_internal/sig_tools.py b/src/boost_histogram/_internal/sig_tools.py index f166d72e..5ab80b18 100644 --- a/src/boost_histogram/_internal/sig_tools.py +++ b/src/boost_histogram/_internal/sig_tools.py @@ -15,6 +15,7 @@ def inject_signature(sig, locals=None): # type: (str, Optional[Dict[str, Any]]) -> Any def wrap(f): return f + return wrap