From 91acd4df6b518034061cea1604e1a31343533fe0 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Tue, 29 Aug 2023 10:24:30 -0400 Subject: [PATCH] Publish wheels with github actions (#1063) --- .github/workflows/ci.yml | 14 ++++++++++++++ .gitignore | 1 - Dockerfile-wheels | 2 ++ MANIFEST.in | 11 +++++++++++ sample_images/.gitignore | 2 -- setup.py | 2 +- 6 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 MANIFEST.in delete mode 100644 sample_images/.gitignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8bde8e10..2daa3df96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,6 +93,19 @@ jobs: with: name: ${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }} path: ./wheelhouse/*.whl + make_sdist: + name: Make SDist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Build SDist + run: pipx run build --sdist + - uses: actions/upload-artifact@v3 + with: + name: sdist + path: dist/*.tar.gz # Still on Circle-CI # - docker @@ -105,6 +118,7 @@ jobs: - test - lint - build_wheels + - make_sdist if: github.repository == 'DigitalSlideArchive/HistomicsTK' && ( startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master' ) environment: name: pypi diff --git a/.gitignore b/.gitignore index 4d8bfa6fb..541f8efb9 100644 --- a/.gitignore +++ b/.gitignore @@ -90,7 +90,6 @@ HistomicsTKDocker.code-workspace # debugging .devcontainer/ -MANIFEST.in .pre-commit-config.yaml run_tests_code_cleanup.sh diff --git a/Dockerfile-wheels b/Dockerfile-wheels index 63f763c93..f7e983f5b 100644 --- a/Dockerfile-wheels +++ b/Dockerfile-wheels @@ -31,6 +31,8 @@ RUN for PYBIN in /opt/python/*/bin; do \ done ENV htk_path=/HistomicsTK +WORKDIR /HistomicsTK + RUN mkdir -p $htk_path COPY . $htk_path/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..bb5e0ce53 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,11 @@ +exclude * +prune * +include LICENSE +include NOTICE +include *.rst +global-include CMakeLists.txt +include setup.py +include pyproject.toml +include requirements-dev.txt +graft histomicstk +global-exclude *.py[co] __pycache__ diff --git a/sample_images/.gitignore b/sample_images/.gitignore deleted file mode 100644 index d6b7ef32c..000000000 --- a/sample_images/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/setup.py b/setup.py index 1c3cd77f0..2a7cacf5f 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def prerelease_local_scheme(version): author='Kitware, Inc.', author_email='developers@digitalslidearchive.net', url='https://github.com/DigitalSlideArchive/HistomicsTK', - packages=find_packages(exclude=['tests', '*_test']), + packages=find_packages(exclude=['tests', '*_test*']), package_dir={ 'histomicstk': 'histomicstk', },