Skip to content

Commit

Permalink
feat: expanded docs, schema and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tdejager committed Jan 27, 2025
1 parent 308e6ab commit bd126b2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
13 changes: 2 additions & 11 deletions crates/pixi_manifest/src/pypi/pypi_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,7 @@ pub enum FindLinksUrlOrPath {
}

/// Don't build sdist for all or certain packages
#[derive(
Default,
Debug,
Clone,
PartialEq,
Eq,
Serialize,
strum::Display,
strum::EnumString,
strum::VariantNames,
)]
#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, strum::Display)]
#[strum(serialize_all = "kebab-case")]
#[serde(rename_all = "kebab-case")]
pub enum NoBuild {
Expand All @@ -69,6 +59,7 @@ pub enum NoBuild {
/// Don't build any sdist
All,
/// Don't build sdist for specific packages
// Todo: would be nice to check if these are actually used at some point
Packages(HashSet<String>),
}

Expand Down
6 changes: 6 additions & 0 deletions docs/reference/pixi_manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ When enabled, resolving will not run arbitrary Python code. The cached wheels of
Can be either set per package or globally.
```toml
[pypi-options]
# No sdists allowed
no-build = true # default is false
```
or:
Expand All @@ -350,6 +351,11 @@ or:
no-build = ["package1", "package2"]
```

When features are merged, the following priority is adhered:
`no-build = true` > `no-build = ["package1", "package2"]` > `no-build = false`
So, to expand: if `no-build = true` is set for *any* feature in the environment, this will be used as the setting for the environment.


### Index Strategy

The strategy to use when resolving against multiple index URLs. Description modified from the [uv](https://docs.astral.sh/uv/reference/settings/#index-strategy) documentation:
Expand Down
6 changes: 6 additions & 0 deletions schema/examples/valid/full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ readme = "README.md"
repository = "https://github.com/author/project"
version = "0.1.0"

[project.pypi-options]
no-build = false

[package]

[package.build]
Expand Down Expand Up @@ -117,6 +120,9 @@ test = "*"
[feature.test2.dependencies]
test = "*"

[feature.yes-build.pypi-options]
no-build = true

[feature.prod]
activation = { scripts = ["activate.sh", "deactivate.sh"] }
channel-priority = "disabled"
Expand Down

0 comments on commit bd126b2

Please sign in to comment.