Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pixi add git source dependency #2858

Merged
merged 25 commits into from
Jan 10, 2025

Conversation

nichmor
Copy link
Contributor

@nichmor nichmor commented Jan 8, 2025

closes: #2795

Overview

Extend pixi add to support git source dependencies.
pixi add --git --branch/--rev/--tag --subdir

To test it, you can cd examples/pixi-build/cpp-sdl and run:
pixi add --git https://github.com/wolfv/pixi-build-examples --branch main --subdir boost-check boost-check
or select a different commit/tag.

Some implementation details/choices:

  • Manifest.add_dependency now accepts PixiSpec and PackageName instead of Matchspec. This allows in my opinion to be more flexible when adding pixi specs into manifest, as PixiSpec can represent SourceSpec/BinSpec and move the responsibility of creating it to the caller side rather than manifest side. It also saves manifest to not accept ChannelConfig

  • project.update_dependencies now accept also SourceSpec.

We also support adding git for pypi:

pixi add --git https://github.com/mahmoud/boltons.git boltons --pypi

@nichmor nichmor marked this pull request as ready for review January 8, 2025 11:26
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey this works great!

Could you add some documentation of the CLI and get it working for pypi aswell?

src/cli/cli_config.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good to me.

@ruben-arts ruben-arts enabled auto-merge (squash) January 9, 2025 15:13
@ruben-arts ruben-arts merged commit d1df544 into prefix-dev:main Jan 10, 2025
31 checks passed
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.

pixi add support for git source dependencies
2 participants