Skip to content

Update hatch version in devcontainer and fix hatch build #22

Description

@ncclementi

I was trying the .devcontainer and when I went to do hatch run build:check as aprt of teh tutorial, I got an error. WHich I found it was reported in pypa/hatch#2193

This problem gets sort of solved, by upgrading to the latest hatch version on the dev container.

BUt on 1.16 there were changes, and now you get

hatch run build:check
cmd [1] | hatch build --clean
Environment `build` is not a builder environment

WHile trying to get thsi to work, I was able to do so, by modifying the pyproject.toml to have hatchiling as build dependency

build = [
    "hatchling",
    "pip-audit",
    "twine",
]

and then

[tool.hatch.envs.build.scripts]
check = [
    "pip check", 
    "hatchling build {args:--clean}",
    "twine check dist/*",
]

Which resulted in something like this, I think it's alright idk if those changes are the right ones.

pip check
No broken requirements found.
cmd [2] | hatchling build --clean
[sdist]
dist/wgxcpack-0.1.0.tar.gz

[wheel]
dist/wgxcpack-0.1.0-py3-none-any.whl
cmd [3] | twine check dist/*
Checking dist/wgxcpack-0.1.0-py3-none-any.whl: PASSED
Checking dist/wgxcpack-0.1.0.tar.gz: PASSED

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions