From 4dc2f13166002af76bfe7b9ac40ea01b3f8d62bb Mon Sep 17 00:00:00 2001 From: mattip Date: Sat, 19 Dec 2020 22:37:22 +0200 Subject: [PATCH 1/7] rework cibuildwheel job --- .github/workflows/cibuildwheel.yml | 37 +++++++++++++++++++++++------- src/_path.h | 5 ++++ 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index ac542bf2ab77..7af5fa6904b4 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -7,6 +7,10 @@ on: - v[0-9]+.[0-9]+.x tags: - v* + schedule: + # every Sunday at midnight, builds master and uploads to + # https://anaconda.org/scipy-wheels-nightly/ + - cron: '0 0 * * 0' jobs: build_wheels: @@ -15,6 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-18.04, windows-latest, macos-latest] + steps: - uses: actions/checkout@v2 @@ -39,10 +44,11 @@ jobs: python -m cibuildwheel --output-dir dist env: CIBW_BUILD: "cp39-*" - CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 - CIBW_MANYLINUX_I686_IMAGE: manylinux1 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010 + CIBW_MANYLINUX_I686_IMAGE: manylinux2010 CIBW_BEFORE_BUILD: pip install certifi numpy==1.19.3 MPL_DISABLE_FH4: "yes" + CIBW_TEST_COMMAND: pytest matplotlib - name: Build wheels for CPython run: | @@ -68,16 +74,14 @@ jobs: startsWith(github.ref, 'refs/heads/v3.3') || startsWith(github.ref, 'refs/tags/v3.3') - - name: Build wheels for PyPy + - name: Build wheels for PyPy3.7 run: | python -m cibuildwheel --output-dir dist env: - CIBW_BUILD: "pp3?-*" + CIBW_BUILD: "pp37-*" CIBW_BEFORE_BUILD: pip install certifi numpy==1.16 - if: > - runner.os != 'Windows' && ( - startsWith(github.ref, 'refs/heads/v3.3') || - startsWith(github.ref, 'refs/tags/v3.3') ) + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010 + CIBW_MANYLINUX_I686_IMAGE: manylinux2010 - name: Validate that LICENSE files are included in wheels run: | @@ -87,3 +91,20 @@ jobs: with: name: wheels path: ./dist/*.whl + + - name: Set token + if: github.event_name == "schedule" + run: | + echo "TOKEN=${{ secrets.SCIPY_WHEELS_NIGHTLY_ACCESS }}" >> $GITHUB_ENV; + echo "ANACONDA_ORG=https://anaconda.org/scipy-wheels-nightly" >> $GITHUB_ENV; + + - name: Upload weekly wheels + if: env.TOKEN + run: | + set -ex + pip install git+https://github.com/Anaconda-Server/anaconda-client; + # The first -t option refers to the token, the second is the "type" + # option to the "upload" command + anaconda -t ${TOKEN} upload \ + --no-progress --force -u $ANACONDA_ORG \ + ${BUILD_DIR}/wheelhouse/*.whl; diff --git a/src/_path.h b/src/_path.h index 784a6457807c..c7f1efd3e386 100644 --- a/src/_path.h +++ b/src/_path.h @@ -1085,6 +1085,11 @@ void quad2cubic(double x0, double y0, outy[2] = y2; } +/* PyPy before v7.3.3 does not have Py_DTSF_ADD_DOT_0 */ +#ifndef Py_DTSF_ADD_DOT_0 +#define Py_DTSF_ADD_DOT_0 0x02 +#endif + void __add_number(double val, char format_code, int precision, std::string& buffer) From f595fe58ab8c7e4ce117dcb7cb8654de6fb47256 Mon Sep 17 00:00:00 2001 From: mattip Date: Sat, 19 Dec 2020 23:31:03 +0200 Subject: [PATCH 2/7] add pypy test run --- .github/workflows/cibuildwheel.yml | 3 +-- .github/workflows/tests.yml | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 7af5fa6904b4..e297f3ac80ba 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -48,7 +48,6 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: manylinux2010 CIBW_BEFORE_BUILD: pip install certifi numpy==1.19.3 MPL_DISABLE_FH4: "yes" - CIBW_TEST_COMMAND: pytest matplotlib - name: Build wheels for CPython run: | @@ -107,4 +106,4 @@ jobs: # option to the "upload" command anaconda -t ${TOKEN} upload \ --no-progress --force -u $ANACONDA_ORG \ - ${BUILD_DIR}/wheelhouse/*.whl; + ./dist/*.whl; diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1b218041e33b..c068ac788979 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,6 +30,10 @@ jobs: python-version: 3.7 extra-requirements: '-r requirements/testing/travis_extra.txt' XVFB_RUN: xvfb-run -a + - os: ubuntu-18.04 + python-version: pypy-3.7 + extra-requirements: '-r requirements/testing/travis_extra.txt' + XVFB_RUN: xvfb-run -a - os: ubuntu-16.04 python-version: 3.8 extra-requirements: '-r requirements/testing/travis_extra.txt' From 82d4db512c3016726b00331654b821316be78d7e Mon Sep 17 00:00:00 2001 From: mattip Date: Sun, 20 Dec 2020 08:50:19 +0200 Subject: [PATCH 3/7] add libraries needed to build lxml --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c068ac788979..03abcaef4f56 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -80,6 +80,8 @@ jobs: libxcb-randr0 \ libxcb-render-util0 \ libxcb-xinerama0 \ + libxml2-dev \ + libxslt1-dev \ lmodern \ fonts-freefont-otf \ texlive-pictures \ From b278f67b93975202fce9f2c44a207d77b54e73c5 Mon Sep 17 00:00:00 2001 From: mattip Date: Sun, 20 Dec 2020 10:02:37 +0200 Subject: [PATCH 4/7] add libraries needed to build pikepdf --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 03abcaef4f56..66385a4d5086 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -80,6 +80,7 @@ jobs: libxcb-randr0 \ libxcb-render-util0 \ libxcb-xinerama0 \ + libqpdf-dev \ libxml2-dev \ libxslt1-dev \ lmodern \ From 367a210d1a66c3e8057adf7853e4ebdd686b0742 Mon Sep 17 00:00:00 2001 From: mattip Date: Sun, 20 Dec 2020 10:27:00 +0200 Subject: [PATCH 5/7] fix yml syntax --- .github/workflows/cibuildwheel.yml | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index e297f3ac80ba..17f74ebdf4f9 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -91,19 +91,19 @@ jobs: name: wheels path: ./dist/*.whl - - name: Set token - if: github.event_name == "schedule" - run: | - echo "TOKEN=${{ secrets.SCIPY_WHEELS_NIGHTLY_ACCESS }}" >> $GITHUB_ENV; - echo "ANACONDA_ORG=https://anaconda.org/scipy-wheels-nightly" >> $GITHUB_ENV; - - - name: Upload weekly wheels - if: env.TOKEN - run: | - set -ex - pip install git+https://github.com/Anaconda-Server/anaconda-client; - # The first -t option refers to the token, the second is the "type" - # option to the "upload" command - anaconda -t ${TOKEN} upload \ - --no-progress --force -u $ANACONDA_ORG \ - ./dist/*.whl; + - name: Set token + if: github.event_name == "schedule" + run: | + echo "TOKEN=${{ secrets.SCIPY_WHEELS_NIGHTLY_ACCESS }}" >> $GITHUB_ENV; + echo "ANACONDA_ORG=https://anaconda.org/scipy-wheels-nightly" >> $GITHUB_ENV; + + - name: Upload weekly wheels + if: env.TOKEN + run: | + set -ex + pip install git+https://github.com/Anaconda-Server/anaconda-client; + # The first -t option refers to the token, the second is the "type" + # option to the "upload" command + anaconda -t ${TOKEN} upload \ + --no-progress --force -u $ANACONDA_ORG \ + ./dist/*.whl; From aae874121f15e635c21b1100771f1db536a4ff86 Mon Sep 17 00:00:00 2001 From: mattip Date: Sun, 20 Dec 2020 12:31:26 +0200 Subject: [PATCH 6/7] skip pikepdf on pypy since no wheel is available --- .github/workflows/tests.yml | 2 +- requirements/testing/travis_extra.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 66385a4d5086..3ca64de25770 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,6 +18,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: include: - name-suffix: "(Minimum Versions)" @@ -80,7 +81,6 @@ jobs: libxcb-randr0 \ libxcb-render-util0 \ libxcb-xinerama0 \ - libqpdf-dev \ libxml2-dev \ libxslt1-dev \ lmodern \ diff --git a/requirements/testing/travis_extra.txt b/requirements/testing/travis_extra.txt index 0b18fc58394a..318dd5f810d1 100644 --- a/requirements/testing/travis_extra.txt +++ b/requirements/testing/travis_extra.txt @@ -4,5 +4,5 @@ ipykernel nbconvert[execute]!=6.0.0,!=6.0.1 nbformat!=5.0.0,!=5.0.1 pandas!=0.25.0 -pikepdf +pikepdf; platform_python_implementation != 'PyPy' pytz From 9878f83190946f2d13e49dd67b6a0c3682fc67fd Mon Sep 17 00:00:00 2001 From: mattip Date: Sun, 20 Dec 2020 18:37:14 +0200 Subject: [PATCH 7/7] numerous failures on PyPy, skip the test --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3ca64de25770..9de45ec24ab0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,10 +31,10 @@ jobs: python-version: 3.7 extra-requirements: '-r requirements/testing/travis_extra.txt' XVFB_RUN: xvfb-run -a - - os: ubuntu-18.04 - python-version: pypy-3.7 - extra-requirements: '-r requirements/testing/travis_extra.txt' - XVFB_RUN: xvfb-run -a + # - os: ubuntu-18.04 + # python-version: pypy-3.7 + # extra-requirements: '-r requirements/testing/travis_extra.txt' + # XVFB_RUN: xvfb-run -a - os: ubuntu-16.04 python-version: 3.8 extra-requirements: '-r requirements/testing/travis_extra.txt'