diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d6d966da..92a4ce025 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -303,28 +303,6 @@ jobs: cd .. python3 -m pip install histomicstk --pre --find-links project/wheels --find-links https://girder.github.io/large_image_wheels python3 -c "import histomicstk" - release: - working_directory: ~/project - docker: - - image: cimg/python:3.9 - - image: docker:git - steps: - - checkout - - setup_remote_docker - - run: - name: Setup virtual environment - command: | - if [ ! -d env ]; then python -m virtualenv env || python -m venv env; fi - echo ". $CIRCLE_WORKING_DIRECTORY/env/bin/activate" >> $BASH_ENV - - run: - name: Install python packages - command: pip install setuptools_scm twine - - run: - name: Build wheels - command: ./build_wheels.sh - - run: - name: Release to PyPi - command: twine upload --verbose wheels/* dist/* docs-deploy: working_directory: ~/project docker: @@ -411,21 +389,6 @@ workflows: branches: ignore: - gh-pages - - release: - requires: - - py37 - - py38 - - py39 - - py310 - - py311 - - lint_and_docs - - wheels - - docker - filters: - tags: - only: /^v.*/ - branches: - only: master - docs-deploy: requires: - py37 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2daa3df96..e6fdd2f99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,21 +57,18 @@ jobs: name: docs path: ./docs/_build build_wheels: - name: Build wheels on ${{ matrix.buildplat[0] }} / ${{ matrix.buildplat[1] }} for ${{ matrix.python }} + name: Wheels for ${{ matrix.python }} / ${{ matrix.buildplat[0] }} / ${{ matrix.buildplat[1] }} runs-on: ${{ matrix.buildplat[0] }} # Don't build external PRs. if: github.repository == 'DigitalSlideArchive/HistomicsTK' strategy: matrix: + # See matplotlib for some of the rationale of this buildplat: - - [ubuntu-latest, manylinux_x86_64] - - [ubuntu-latest, musllinux_x86_64] - - [macos-latest, macosx_*] - - [windows-latest, win_amd64] + - [ubuntu-latest, x86_64] + - [macos-latest, "x86_64 arm64"] + - [windows-latest, auto64] python: ["cp37", "cp38", "cp39", "cp310", "cp311"] - exclude: - - buildplat: - - [windows-latest, win32] fail-fast: false steps: @@ -87,11 +84,14 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.14.1 env: - CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + CIBW_BUILD: ${{ matrix.python }}-* + CIBW_TEST_SKIP: "*-macosx_arm64" + CIBW_ARCHS: ${{ matrix.buildplat[1] }} + MACOSX_DEPLOYMENT_TARGET: "10.12" - uses: actions/upload-artifact@v3 with: - name: ${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }} + # name: ${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }} path: ./wheelhouse/*.whl make_sdist: name: Make SDist @@ -104,7 +104,7 @@ jobs: run: pipx run build --sdist - uses: actions/upload-artifact@v3 with: - name: sdist + # name: sdist path: dist/*.tar.gz # Still on Circle-CI @@ -128,6 +128,8 @@ jobs: steps: - uses: actions/download-artifact@v3 with: - # name: artifact + name: artifact path: dist + - name: List dist directory + run: ls dist - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.gitignore b/.gitignore index 541f8efb9..88880b43c 100644 --- a/.gitignore +++ b/.gitignore @@ -152,6 +152,7 @@ cython_debug/ .idea/ .vscode +*.sw[po] # temporary downloaded data when doing unit testing locally tests/externaldata/ diff --git a/setup.py b/setup.py index 2a7cacf5f..45b12f514 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ import importlib -import os import sys from setuptools import find_packages @@ -19,26 +18,9 @@ readme = readme_file.read() -def prerelease_local_scheme(version): - """ - Return local scheme version unless building on master in CircleCI. - - This function returns the local scheme version number - (e.g. 0.0.0.dev+g) unless building on CircleCI for a - pre-release in which case it ignores the hash and produces a - PEP440 compliant pre-release version number (e.g. 0.0.0.dev). - """ - from setuptools_scm.version import get_local_node_and_date - - if os.getenv('CIRCLE_BRANCH') in {'master'} or os.getenv('CI_BRANCH') in {'master'}: - return '' - else: - return get_local_node_and_date(version) - - setup( name='histomicstk', - use_scm_version={'local_scheme': prerelease_local_scheme, + use_scm_version={'local_scheme': 'no-local-version', 'fallback_version': '0.0.0'}, description='A Python toolkit for Histopathology Image Analysis', long_description=readme,