From 6cf19ae56b34e7c66cef3d24ff6a2576a1c3b26e Mon Sep 17 00:00:00 2001 From: Siddharth Chaini <40721514+sidchaini@users.noreply.github.com> Date: Sun, 15 Nov 2026 16:28:21 -0500 Subject: [PATCH 1/3] Fix wheel builds: declare the package explicitly The v0.3.0 release run failed in cibuildwheel with PackageDiscoveryError: Multiple top-level packages discovered in a flat-layout: ['wheelhouse', 'distclassipy'] pyproject.toml relied on setuptools' automatic flat-layout discovery, which treats any top-level directory as a candidate package; inside the cibuildwheel build tree that includes its wheelhouse/ output directory. The sdist job passed only because a clean checkout has no such directory. Listing packages = ["distclassipy"] disables discovery. Also add the Python 3.14 trove classifier (wheels are built for cp314). --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 346ebb3..6a23dbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent" ] dependencies = [ @@ -31,6 +32,11 @@ dependencies = [ "scikit-learn>=1.6.0" ] +[tool.setuptools] +# List the package explicitly: automatic flat-layout discovery also picks up +# stray top-level directories (e.g. cibuildwheel's wheelhouse/) and aborts. +packages = ["distclassipy"] + [tool.setuptools.dynamic] version = {attr = "distclassipy.__version__"} From 00097c0f8c24acd3fa88bab1ef372b8da2cbbb84 Mon Sep 17 00:00:00 2001 From: Siddharth Chaini <40721514+sidchaini@users.noreply.github.com> Date: Sun, 15 Nov 2026 16:28:21 -0500 Subject: [PATCH 2/3] Allow build-only manual runs of the release workflow Add a workflow_dispatch trigger so the sdist + full wheel matrix can be built and tested on any branch from the Actions tab before cutting a release. The publish job only runs for release events, so manual runs never upload to PyPI. --- .github/workflows/publish-to-pypi.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 52b130c..1b8786c 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -16,6 +16,10 @@ name: Upload Python Package on: release: types: [published] + # Manual build-only run (Actions tab -> "Run workflow", any branch): builds + # and tests the sdist and all wheels without uploading anything. Use it to + # check a branch before cutting a release. + workflow_dispatch: permissions: contents: read @@ -72,6 +76,7 @@ jobs: publish: name: Publish to PyPI needs: [build_sdist, build_wheels] + if: github.event_name == 'release' # never upload from manual runs runs-on: ubuntu-latest permissions: id-token: write # trusted publishing From b70942fa3e24e0d003ff78f60f10a889800b70e5 Mon Sep 17 00:00:00 2001 From: Siddharth Chaini <40721514+sidchaini@users.noreply.github.com> Date: Sun, 15 Nov 2026 16:57:11 -0500 Subject: [PATCH 3/3] Set version to 0.3.1 0.3.0 was tagged but never reached PyPI (the wheel build failed on package discovery, fixed in the previous commits). --- distclassipy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distclassipy/__init__.py b/distclassipy/__init__.py index f9b16fb..71c832e 100755 --- a/distclassipy/__init__.py +++ b/distclassipy/__init__.py @@ -34,7 +34,7 @@ ) from .distances import _ALL_METRICS, _UNIQUE_METRICS -__version__ = "0.3.0" +__version__ = "0.3.1" __all__ = [ "DistanceMetricClassifier",