From 95543941f5c4a67fce08577f45b95adb0746fb38 Mon Sep 17 00:00:00 2001 From: Vijayraj Gohil <63923064+vraj130@users.noreply.github.com> Date: Thu, 16 Jul 2026 02:17:22 -0700 Subject: [PATCH] Include gnm.shape.data packages in setuptools package list. gnm_base.py, gnm_data_loader.py and gnm_landmarks.py import gnm.shape.data.versions.gnm_specs and gnm_catalog as regular Python modules, but the [tool.setuptools] packages list in pyproject.toml does not declare gnm.shape.data or gnm.shape.data.versions. The package-data globs only cover asset files (npz, images, md, h5), so built distributions omit gnm_specs.py and gnm_catalog.py entirely. As a result, installing gnm-shape from a built wheel (pip install . or a wheel from python -m build) fails at import time: ImportError: cannot import name 'gnm_specs' from 'gnm.shape.data.versions' (unknown location) This is not caught by CI because all workflows install the package in editable mode (pip install -e), which puts the whole source tree on sys.path. Verified by building a wheel before and after this change: before, the wheel contains no .py files under gnm/shape/data/ and importing gnm.shape.gnm_numpy from the installed wheel raises the ImportError above; after, gnm_specs.py and gnm_catalog.py are included (the npz model asset ships in both cases) and GNM.from_local works from the installed wheel. --- gnm/shape/pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnm/shape/pyproject.toml b/gnm/shape/pyproject.toml index a64c2ad4..36465df3 100644 --- a/gnm/shape/pyproject.toml +++ b/gnm/shape/pyproject.toml @@ -63,6 +63,8 @@ dev = [ [tool.setuptools] packages = [ "gnm.shape", + "gnm.shape.data", + "gnm.shape.data.versions", "gnm.shape.fitting_utils", "gnm.shape.visualization", ]