Skip to content

hatch build problem with workspaces #2245

@warsaw

Description

@warsaw

I have an experimental branch of my atpublic (i.e. @public decorators) which uses workspaces to manage two inter-dependent packages. There's the traditional public package which is the main code. Then I have a new package called atpublic-builtins which just adds a public.pth and public.startup (for experimental PEP 829 support) file.

All my previous commands, such as hatch run all to run the full test (except see below), static analysis, and doc builds, works pretty well at the top repo level directory.

However hatch build does not. It could definitely be user error!

I had to add the build command and run it like hatch run build to make it work:

[tool.hatch.envs.default.scripts]
all = [
    'hatch test --all',
    'hatch run qa:qa',
    'hatch run docs:docs',
]
build = [
    'rm -rf dist && mkdir dist',
    '(cd packages/atpublic && hatch build && mv dist/* ../../dist/)',
    '(cd packages/atpublic-builtins && hatch build && mv dist/* ../../dist/)',
]

I want to end up with all the wheels and sdists in a top level dist/ directory so I can just cd there and twine upload *

The other problem I'm running into is that, while in the main branch hatch run all tests against all Pythons in my support matrix, in the install-extra branch, it only runs it against the first Python in my matrix, i.e. Python 3.10. I don't know how to get it to run against all Pythons in [[tool.hatch.envs.hatch-test.matrix]].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions