Skip to content

Installing via uv breaks because python version classifier #178

@casblaauw

Description

@casblaauw

Report

Was making a new environment to debug tests and was at first getting these problems with hatch, but it's happening even with uv in a conda environment.

Steps:

  • New conda env with python=3.13
  • pip install uv; uv pip install tensorflow[and-cuda]~=2.2.0
  • uv pip install -e . on the repo
/staging/leuven/stg_00002/lcb/cblaauw/python_modules/CREsted $ uv pip install -e .
Using Python 3.13.11 environment at: /lustre1/project/stg_00002/lcb/cblaauw/software/mambaforge/envs/crested_py313_tf220
Resolved 74 packages in 446ms
  × Failed to build `crested @ file:///lustre1/project/stg_00002/lcb/cblaauw/python_modules/CREsted`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `hatchling.build.build_editable` failed (exit status: 1)

      [stderr]
      Traceback (most recent call last):
        File "<string>", line 11, in <module>
          wheel_filename = backend.build_editable("/data/leuven/349/vsc34968/.cache/uv/builds-v0/.tmpQTH9Yu", {}, None)
        File "/apps/leuven/rocky8/icelake/2023a/software/hatchling/1.18.0-GCCcore-12.3.0/lib/python3.11/site-packages/hatchling/build.py", line 78,
      in build_editable
          return os.path.basename(next(builder.build(wheel_directory, ['editable'])))
                                  ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/apps/leuven/rocky8/icelake/2023a/software/hatchling/1.18.0-GCCcore-12.3.0/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py",
      line 93, in build
          self.metadata.validate_fields()
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
        File "/apps/leuven/rocky8/icelake/2023a/software/hatchling/1.18.0-GCCcore-12.3.0/lib/python3.11/site-packages/hatchling/metadata/core.py", line
      244, in validate_fields
          self.core.validate_fields()
          ~~~~~~~~~~~~~~~~~~~~~~~~~^^
        File "/apps/leuven/rocky8/icelake/2023a/software/hatchling/1.18.0-GCCcore-12.3.0/lib/python3.11/site-packages/hatchling/metadata/core.py", line
      1325, in validate_fields
          getattr(self, attribute)
          ~~~~~~~^^^^^^^^^^^^^^^^^
        File "/apps/leuven/rocky8/icelake/2023a/software/hatchling/1.18.0-GCCcore-12.3.0/lib/python3.11/site-packages/hatchling/metadata/core.py", line
      978, in classifiers
          raise ValueError(message)
      ValueError: Unknown classifier in field `project.classifiers`: Programming Language :: Python :: 3.13

      hint: This usually indicates a problem with the package or the build environment.

Version information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions