Skip to content

Implement a package manager for hatch #13

Closed

Description

@karthiknadig

This is so you can handle creation and package management. Think adding dependencies, if users want to add new dependencies, if they use built-in pip will add those dependencies to the wrong lock file.

Activity

  1. flying-sheep commented on May 8, 2025

    @flying-sheep
    Member

    There are no lock files yet for Hatch, so I think “use uv if available in the venv, else use pip” is close enough to Hatch’s behavior for now. Or am I missing something?

  2. karthiknadig commented on May 8, 2025

    @karthiknadig
    CollaboratorAuthor

    doesnt the pyproject.toml support something like:

    
    [tool.hatch.envs.types]
    extra-dependencies = [
      "mypy>=1.0.0",
    ]
    

    If you control the package management, you could update this.

  3. flying-sheep commented on May 8, 2025

    @flying-sheep
    Member

    There is no hatch dep add, only hatch dep show and hatch dep hash.

    With Hatch, I usually add the deps declaratively to project.dependencies or project.optional-dependencies.*, and they end up in envs via $env.features or so, I very rarely add things to to $env.(extra-)dependencies.

    In the future, I’d add things to dependency groups and reference those from hatch envs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions