Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4451

Use Hatch as Build Backend

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.8
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Context

      Hatch is a modern, standards-compliant, user-friendly build and package maintenance tool. By adopting hatch we get:

      • Full support for pyproject.toml
      • Easier maintenance of wheel and sdist contents that respects VCS
      • A wide suite of plugins, including loading requirements from requirements files
      • A single interface for automated version bumping (hatch version and dist building hatch dist -t wheel.
      • A potential replacement for tox, using hatch environments.

      By adopting CMake we get:

      • A well-defined and supported build system
      • An explicit build file

      For now we can invoke Setuptools ourselves in a custom hatch build script. Once the CMake plugin for Hatch is complete, we can use CMake and that plugin instead.

      Definition of done

      Replace usage of setuptools with hatch.

      Pitfalls

      We need to ensure that the contents/behavior of our dists are not changing.

        There are no Sub-Tasks for this issue.

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: