Skip to content

Conversation

@d-v-b
Copy link
Contributor

@d-v-b d-v-b commented Jan 30, 2026

use hatchling instead of setuptools as the build system. Fixes #1357. I also add a test that ensures that the version of the package internally matches that reported by the built version.

@github-actions github-actions bot added bug Indicates an unexpected problem or unintended behavior enhancement Indicates new improvements labels Jan 30, 2026
@d-v-b d-v-b changed the base branch from master to pre/v2.1 January 30, 2026 14:39
Copy link
Member

@dimitri-yatsenko dimitri-yatsenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approved ✅

Verified the fix works correctly:

  1. Build succeeds: python -m build --wheel produces datajoint-2.1.0a9-py3-none-any.whl

  2. Subpackages included: The builtin_codecs subpackage is now correctly packaged:

    datajoint/builtin_codecs/__init__.py
    datajoint/builtin_codecs/attach.py
    datajoint/builtin_codecs/blob.py
    datajoint/builtin_codecs/filepath.py
    datajoint/builtin_codecs/hash.py
    datajoint/builtin_codecs/npy.py
    datajoint/builtin_codecs/object.py
    datajoint/builtin_codecs/schema.py
    
  3. Import works: import datajoint succeeds (previously failed with ImportError: cannot import name 'builtin_codecs')

  4. Version test passes: importlib.metadata.version('datajoint') == datajoint.__version__

Changes look good:

  • Switching from setuptools to hatchling is a sensible modernization
  • Removing setuptools from runtime dependencies is correct
  • Using [project.scripts] instead of [project.entry-points."console_scripts"] is the modern standard
  • The new version test is a useful regression guard

LGTM!

@d-v-b d-v-b merged commit 243c9e0 into datajoint:pre/v2.1 Jan 30, 2026
5 checks passed
@d-v-b d-v-b deleted the chore/fix-packaging branch January 30, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Indicates an unexpected problem or unintended behavior enhancement Indicates new improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants