From 0d6e690b6928c02d4eb9f9a0f949cda7082c517e Mon Sep 17 00:00:00 2001 From: Gordon Hart Date: Wed, 25 Sep 2024 09:51:58 -0400 Subject: [PATCH] Update build steps to exclude examples, docs (#695) * Update build steps to exclude examples, docs * Also exclude tests * Explicitly include kolena to have to exclude less * Remove sources that shouldn't have been checked in --- .github/workflows/release.yml | 4 ++-- pyproject.toml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 414cbaf6c..f30385051 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,7 @@ jobs: run: sed -i "s/0.999.0/$(git describe --tags --abbrev=0)/g" pyproject.toml - name: Build 'kolena' Python package - run: uv build --sdist + run: uvx hatch build -t sdist - name: Publish 'kolena' documentation to production (S3) run: | @@ -94,7 +94,7 @@ jobs: sed -i '0,/kolena/{s/kolena/kolena-client/}' pyproject.toml kolena/__init__.py uv pip install --all-extras -r pyproject.toml - uv build --sdist + uvx hatch build -t sdist - name: "[backcompat] Install twine for package distribution on CodeArtifact" run: pip install twine diff --git a/pyproject.toml b/pyproject.toml index 67473d84f..33d7d4e24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,6 +60,10 @@ kolena = 'kolena._utils.cli:run' requires = ["hatchling"] build-backend = "hatchling.build" +[tool.hatch.build.targets.sdist] +include = ["kolena"] +exclude = ["docs"] + [tool.pytest.ini_options] # do not scan 'kolena' for tests, as there are many functions/classes that look like tests norecursedirs = "kolena"