@@ -379,6 +379,20 @@ class IgnoreRunExports(StrictBaseModel):
379379 )
380380
381381
382+ class StagingRequirements (StrictBaseModel ):
383+ build : ConditionalList [MatchSpec ] | None = Field (
384+ None ,
385+ description = "Dependencies to install on the build platform architecture for the staging build." ,
386+ )
387+ host : ConditionalList [MatchSpec ] | None = Field (
388+ None ,
389+ description = "Dependencies to install on the host platform architecture for the staging build." ,
390+ )
391+ ignore_run_exports : IgnoreRunExports | None = Field (
392+ None , description = "Ignore run-exports by name or from certain packages"
393+ )
394+
395+
382396class LinkOptions (StrictBaseModel ):
383397 post_link_script : NonEmptyStr | None = Field (
384398 None ,
@@ -604,19 +618,64 @@ class About(StrictBaseModel):
604618class OutputBuild (Build ):
605619 cache_only : bool = Field (
606620 default = False ,
621+ deprecated = "Use staging outputs instead." ,
607622 description = "Do not output a package but use this output as an input to others." ,
608623 )
609624 cache_from : ConditionalList [NonEmptyStr ] | None = Field (
610625 None ,
626+ deprecated = "Use staging outputs instead." ,
611627 description = "Take the output of the specified outputs and copy them in the working directory." ,
612628 )
613629
614630
631+ class StagingBuild (StrictBaseModel ):
632+ script : str | Script | ConditionalList [NonEmptyStr ] | None = Field (
633+ None ,
634+ description = "The script to execute to invoke the staging build." ,
635+ )
636+
637+
638+ class StagingMeta (StrictBaseModel ):
639+ name : NonEmptyStr = Field (..., description = "Unique name for this staging cache." )
640+
641+
642+ class StagingOutput (StrictBaseModel ):
643+ staging : StagingMeta = Field (
644+ ..., description = "Marks this output as a staging output with the given name."
645+ )
646+ source : ConditionalList [Source ] | None = Field (
647+ None , description = "The source items to be downloaded and used for the staging build."
648+ )
649+ requirements : StagingRequirements | None = Field (
650+ None , description = "The dependencies needed for the staging build."
651+ )
652+ build : StagingBuild | None = Field (
653+ None , description = "Build configuration for the staging output."
654+ )
655+
656+
657+ class CacheInherit (StrictBaseModel ):
658+ from_ : NonEmptyStr = Field (
659+ ...,
660+ alias = "from" ,
661+ description = "Name of the staging cache to inherit from." ,
662+ )
663+ run_exports : bool = Field (
664+ default = True ,
665+ description = "Whether to inherit run_exports from the staging cache." ,
666+ )
667+
668+
615669class Output (StrictBaseModel ):
616670 package : ComplexPackage | None = Field (
617671 None , description = "The package name and version, this overwrites any top-level fields."
618672 )
619673
674+ inherit : NonEmptyStr | CacheInherit | None = Field (
675+ None ,
676+ description = "Name of the staging cache to inherit from, or an object with `from` and `run_exports` options." ,
677+ )
678+
620679 source : ConditionalList [Source ] | None = Field (
621680 None , description = "The source items to be downloaded and used for the build."
622681 )
@@ -692,10 +751,12 @@ class ComplexRecipe(BaseRecipe):
692751 recipe : ComplexPackage | None = Field (None , description = "The package version." )
693752
694753 cache : Cache | None = Field (
695- None , description = "The cache build that can be used as a common build step for all output."
754+ None ,
755+ deprecated = "Use staging outputs instead." ,
756+ description = "The cache build that can be used as a common build step for all output." ,
696757 )
697758
698- outputs : ConditionalList [Output ] = Field (
759+ outputs : ConditionalList [Output | StagingOutput ] = Field (
699760 ..., description = "A list of outputs that are generated for this recipe."
700761 )
701762
0 commit comments