pub struct PipSyncArgs {Show 33 fields
pub src_file: Vec<PathBuf>,
pub constraints: Vec<Maybe<PathBuf>>,
pub build_constraints: Vec<Maybe<PathBuf>>,
pub extra: Option<Vec<ExtraName>>,
pub all_extras: bool,
pub no_all_extras: bool,
pub group: Vec<PipGroupName>,
pub installer: InstallerArgs,
pub refresh: RefreshArgs,
pub require_hashes: bool,
pub no_require_hashes: bool,
pub verify_hashes: bool,
pub no_verify_hashes: bool,
pub python: Option<Maybe<String>>,
pub system: bool,
pub no_system: bool,
pub break_system_packages: bool,
pub no_break_system_packages: bool,
pub target: Option<PathBuf>,
pub prefix: Option<PathBuf>,
pub no_build: bool,
pub build: bool,
pub no_binary: Option<Vec<PackageNameSpecifier>>,
pub only_binary: Option<Vec<PackageNameSpecifier>>,
pub allow_empty_requirements: bool,
pub no_allow_empty_requirements: bool,
pub python_version: Option<PythonVersion>,
pub python_platform: Option<TargetTriple>,
pub strict: bool,
pub no_strict: bool,
pub dry_run: bool,
pub torch_backend: Option<TorchMode>,
pub compat_args: PipSyncCompatArgs,
}Fields§
§src_file: Vec<PathBuf>Include the packages listed in the given files.
The following formats are supported: requirements.txt, .py files with inline metadata,
pylock.toml, pyproject.toml, setup.py, and setup.cfg.
If a pyproject.toml, setup.py, or setup.cfg file is provided, uv will
extract the requirements for the relevant project.
If - is provided, then requirements will be read from stdin.
constraints: Vec<Maybe<PathBuf>>Constrain versions using the given requirements files.
Constraints files are requirements.txt-like files that only control the version of a
requirement that’s installed. However, including a package in a constraints file will not
trigger the installation of that package.
This is equivalent to pip’s --constraint option.
build_constraints: Vec<Maybe<PathBuf>>Constrain build dependencies using the given requirements files when building source distributions.
Constraints files are requirements.txt-like files that only control the version of a
requirement that’s installed. However, including a package in a constraints file will not
trigger the installation of that package.
extra: Option<Vec<ExtraName>>Include optional dependencies from the specified extra name; may be provided more than once.
Only applies to pylock.toml, pyproject.toml, setup.py, and setup.cfg sources.
all_extras: boolInclude all optional dependencies.
Only applies to pylock.toml, pyproject.toml, setup.py, and setup.cfg sources.
no_all_extras: bool§group: Vec<PipGroupName>Install the specified dependency group from a pylock.toml or pyproject.toml.
If no path is provided, the pylock.toml or pyproject.toml in the working directory is
used.
May be provided multiple times.
installer: InstallerArgs§refresh: RefreshArgs§require_hashes: boolRequire a matching hash for each requirement.
By default, uv will verify any available hashes in the requirements file, but will not require that all requirements have an associated hash.
When --require-hashes is enabled, all requirements must include a hash or set of hashes,
and all requirements must either be pinned to exact versions (e.g., ==1.0.0), or be
specified via direct URL.
Hash-checking mode introduces a number of additional constraints:
- Git dependencies are not supported.
- Editable installations are not supported.
- Local dependencies are not supported, unless they point to a specific wheel (
.whl) or source archive (.zip,.tar.gz), as opposed to a directory.
no_require_hashes: bool§verify_hashes: bool§no_verify_hashes: boolDisable validation of hashes in the requirements file.
By default, uv will verify any available hashes in the requirements file, but will not
require that all requirements have an associated hash. To enforce hash validation, use
--require-hashes.
python: Option<Maybe<String>>The Python interpreter into which packages should be installed.
By default, syncing requires a virtual environment. A path to an alternative Python can be provided, but it is only recommended in continuous integration (CI) environments and should be used with caution, as it can modify the system Python installation.
See uv help python for details on Python discovery and supported request formats.
system: boolInstall packages into the system Python environment.
By default, uv installs into the virtual environment in the current working directory or any
parent directory. The --system option instructs uv to instead use the first Python found
in the system PATH.
WARNING: --system is intended for use in continuous integration (CI) environments and
should be used with caution, as it can modify the system Python installation.
no_system: bool§break_system_packages: boolAllow uv to modify an EXTERNALLY-MANAGED Python installation.
WARNING: --break-system-packages is intended for use in continuous integration (CI)
environments, when installing into Python installations that are managed by an external
package manager, like apt. It should be used with caution, as such Python installations
explicitly recommend against modifications by other package managers (like uv or pip).
no_break_system_packages: bool§target: Option<PathBuf>Install packages into the specified directory, rather than into the virtual or system Python environment. The packages will be installed at the top-level of the directory.
Unlike other install operations, this command does not require discovery of an existing Python
environment and only searches for a Python interpreter to use for package resolution.
If a suitable Python interpreter cannot be found, uv will install one.
To disable this, add --no-python-downloads.
prefix: Option<PathBuf>Install packages into lib, bin, and other top-level folders under the specified
directory, as if a virtual environment were present at that location.
In general, prefer the use of --python to install into an alternate environment, as
scripts and other artifacts installed via --prefix will reference the installing
interpreter, rather than any interpreter added to the --prefix directory, rendering them
non-portable.
Unlike other install operations, this command does not require discovery of an existing Python
environment and only searches for a Python interpreter to use for package resolution.
If a suitable Python interpreter cannot be found, uv will install one.
To disable this, add --no-python-downloads.
no_build: boolDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
Alias for --only-binary :all:.
build: bool§no_binary: Option<Vec<PackageNameSpecifier>>Don’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
Multiple packages may be provided. Disable binaries for all packages with :all:. Clear
previously specified packages with :none:.
only_binary: Option<Vec<PackageNameSpecifier>>Only use pre-built wheels; don’t build source distributions.
When enabled, resolving will not run code from the given packages. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
Multiple packages may be provided. Disable binaries for all packages with :all:. Clear
previously specified packages with :none:.
allow_empty_requirements: boolAllow sync of empty requirements, which will clear the environment of all packages.
no_allow_empty_requirements: bool§python_version: Option<PythonVersion>The minimum Python version that should be supported by the requirements (e.g., 3.7 or
3.7.9).
If a patch version is omitted, the minimum patch version is assumed. For example, 3.7 is
mapped to 3.7.0.
python_platform: Option<TargetTriple>The platform for which requirements should be installed.
Represented as a “target triple”, a string that describes the target platform in terms of
its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or
aarch64-apple-darwin.
When targeting macOS (Darwin), the default minimum version is 13.0. Use
MACOSX_DEPLOYMENT_TARGET to specify a different minimum version, e.g., 14.0.
When targeting iOS, the default minimum version is 13.0. Use
IPHONEOS_DEPLOYMENT_TARGET to specify a different minimum version, e.g., 14.0.
When targeting Android, the default minimum Android API level is 24. Use
ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
WARNING: When specified, uv will select wheels that are compatible with the target
platform; as a result, the installed distributions may not be compatible with the current
platform. Conversely, any distributions that are built from source may be incompatible with
the target platform, as they will be built for the current platform. The
--python-platform option is intended for advanced use cases.
strict: boolValidate the Python environment after completing the installation, to detect packages with missing dependencies or other issues.
no_strict: bool§dry_run: boolPerform a dry run, i.e., don’t actually install anything but resolve the dependencies and print the resulting plan.
torch_backend: Option<TorchMode>The backend to use when fetching packages in the PyTorch ecosystem (e.g., cpu, cu126, or auto).
When set, uv will ignore the configured index URLs for packages in the PyTorch ecosystem, and will instead use the defined backend.
For example, when set to cpu, uv will use the CPU-only PyTorch index; when set to cu126,
uv will use the PyTorch index for CUDA 12.6.
The auto mode will attempt to detect the appropriate PyTorch index based on the currently
installed CUDA drivers.
This option is in preview and may change in any future release.
compat_args: PipSyncCompatArgsTrait Implementations§
Source§impl Args for PipSyncArgs
impl Args for PipSyncArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for PipSyncArgs
impl FromArgMatches for PipSyncArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for PipSyncArgs
impl RefUnwindSafe for PipSyncArgs
impl Send for PipSyncArgs
impl Sync for PipSyncArgs
impl Unpin for PipSyncArgs
impl UnwindSafe for PipSyncArgs
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more