Skip to content

Conversation

@DavidVujic
Copy link
Owner

@DavidVujic DavidVujic commented Nov 26, 2024

Description

Support for additional Package & Dependency Management tools, primarily Maturin.

Adding a new command - poly build - that can be used for building wheels when deploying projects from a Polylith Workspace.

Use this command by running the sub-commands:
poly build setup
poly build teardown

Usage
Example: with Maturin

(with an activated virtual environment, and the Polylith CLI installed)

# navigate to the project folder
poly build setup
maturin build
poly build teardown

The setup command will collect and copy all the needed bricks into the project folder. Using maturin build to create a wheel. Finally, the teardown command will remove temporary directory (if using custom top namespaces) and the copied bricks folder no longer needed after the wheel is built.

The setup and teardown command is basically the same thing happening in the Hatch and PDM hooks. This Pull Request exposes the new CLI command endpoint, extracting the existing build features into a new brick, and adding some command-specific additional path configuration.

Motivation and Context

As suggested in the Discussion #297

How Has This Been Tested?

✅ CI
✅ new unit tests
✅ Testing new commands with a locally installed CLI (in a Maturin + Polylith example setup)
✅ Asserting the PDM hooks by installing a local build, and running the pdm buildcommand (in the pdm example project)
✅ Asserting the Hatch hook by installing a local build, and running the uv buildcommand (in the uv example project)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

@DavidVujic DavidVujic force-pushed the maturin-build-helper branch from dbde58b to 176e81d Compare December 1, 2024 12:30
@DavidVujic DavidVujic force-pushed the maturin-build-helper branch from bb8282b to cf3d646 Compare December 5, 2024 19:07
@DavidVujic DavidVujic force-pushed the maturin-build-helper branch from 14877dc to d721e57 Compare December 6, 2024 21:26
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2024

@DavidVujic DavidVujic changed the title wip: building component feat(poly build): setup and teardown for building, when using Maturin or other backends without hook or plugin support Dec 8, 2024
@DavidVujic DavidVujic changed the title feat(poly build): setup and teardown for building, when using Maturin or other backends without hook or plugin support feat(poly build): setup and teardown for building, when using Maturin or tools without hook or plugin support Dec 8, 2024
@DavidVujic DavidVujic marked this pull request as ready for review December 8, 2024 15:03
@DavidVujic DavidVujic merged commit 71e36b9 into main Dec 8, 2024
4 checks passed
@DavidVujic DavidVujic deleted the maturin-build-helper branch December 8, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants