Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apple-bundle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ homepage = "https://github.com/indygreg/PyOxidizer"
repository = "https://github.com/indygreg/PyOxidizer.git"
readme = "README.md"

[dependencies]
[target.'cfg(target_vender="apple")'.dependencies]
anyhow = "1.0"
plist = "1.2"
walkdir = "2.3"

[dependencies.tugger-file-manifest]
[target.'cfg(target_vender="apple")'.dependencies.tugger-file-manifest]
version = "0.5.0-pre"
path = "../tugger-file-manifest"
4 changes: 2 additions & 2 deletions pyoxidizer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ path = "../python-packed-resources"
version = "0.5.0-pre"
path = "../starlark-dialect-build-targets"

[dependencies.tugger-apple]
[target.'cfg(target_vendor="apple")'.dependencies.tugger-apple]
version = "0.4.0-pre"
path = "../tugger-apple"

Expand Down Expand Up @@ -101,7 +101,7 @@ path = "../tugger-licensing"
version = "0.4.0-pre"
path = "../tugger-rust-toolchain"

[dependencies.tugger-windows]
[target.'cfg(target_os="windows")'.dependencies.tugger-windows]
version = "0.6.0-pre"
path = "../tugger-windows"

Expand Down
7 changes: 6 additions & 1 deletion pyoxidizer/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ use {
path::{Path, PathBuf},
sync::{Arc, RwLock},
},
tugger_apple::{find_command_line_tools_sdks, find_default_developer_sdks, AppleSdk},
tugger_rust_toolchain::install_rust_toolchain,
};

#[cfg(target_os = "macos")]
use tugger_apple::{find_command_line_tools_sdks, find_default_developer_sdks, AppleSdk};


/// Version string of PyOxidizer's crate from its Cargo.toml.
const PYOXIDIZER_CRATE_VERSION: &str = env!("CARGO_PKG_VERSION");

Expand Down Expand Up @@ -426,6 +429,7 @@ impl Environment {
}

/// Attempt to resolve an appropriate Apple SDK to use given settings.
#[cfg(target_os = "macos")]
pub fn resolve_apple_sdk(
&self,
logger: &slog::Logger,
Expand Down Expand Up @@ -486,6 +490,7 @@ pub struct RustEnvironment {
/// Given an Apple `platform`, locate an Apple SDK that is of least
/// `minimum_version` and supports targeting `deployment_target`, which is likely
/// an OS version string.
#[cfg(target_os = "macos")]
pub fn resolve_apple_sdk(
logger: &slog::Logger,
platform: &str,
Expand Down
1 change: 1 addition & 0 deletions pyoxidizer/src/project_building.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ impl BuildEnvironment {
// Here, we validate that the local SDK being used is >= the version used
// by the Python distribution.
// TODO validate minimum Clang/linker version as well.
#[cfg(target_os = "macos")]
if target_triple.contains("-apple-") {
let sdk_info = apple_sdk_info.ok_or_else(|| {
anyhow!("targeting Apple platform but Apple SDK info not available")
Expand Down
1 change: 1 addition & 0 deletions pyoxidizer/src/py_packaging/libpython.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ pub fn link_libpython(
// between it and what we want. For example, if we're building for aarch64 but the default
// SDK is a 10.15 SDK that doesn't support ARM. We attempt to mitigate this by resolving
// a compatible Apple SDK and pointing the compiler invocation at it via compiler flags.
#[cfg(target_os = "macos")]
if target_triple.contains("-apple-") {
let sdk_info = apple_sdk_info.ok_or_else(|| {
anyhow!("Apple SDK info should be defined when targeting Apple platforms")
Expand Down
2 changes: 1 addition & 1 deletion text-stub-library/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ rand = "0.8"
rayon = "1.5"
walkdir = "2.3"

[dev-dependencies.tugger-apple]
[target.'cfg(target_vender="apple")'.dev-dependencies.tugger-apple]
version = "0.4.0-pre"
path = "../tugger-apple"
6 changes: 3 additions & 3 deletions tugger-apple-codesign/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ readme = "README.md"
name = "rcodesign"
path = "src/main.rs"

[dependencies]
[target.'cfg(target_vender="apple")'.dependencies]
anyhow = "1.0"
base64 = "0.13"
bcder = "0.6"
Expand All @@ -37,15 +37,15 @@ slog-term = "2.8"
thiserror = "1.0"
yasna = "0.3"

[dependencies.apple-bundle]
[target.'cfg(target_vender="apple")'.dependencies.apple-bundle]
path = "../apple-bundle"
version = "0.5.0-pre"

[dependencies.cryptographic-message-syntax]
path = "../cryptographic-message-syntax"
version = "0.4.0-pre"

[dependencies.tugger-apple]
[target.'cfg(target_vender="apple")'.dependencies.tugger-apple]
path = "../tugger-apple"
version = "0.4.0-pre"

Expand Down
2 changes: 1 addition & 1 deletion tugger-apple/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage = "https://github.com/indygreg/PyOxidizer"
repository = "https://github.com/indygreg/PyOxidizer.git"
readme = "README.md"

[dependencies]
[target.'cfg(target_vender="apple")'.dependencies]
anyhow = "1.0"
duct = "0.13"
goblin = "0.4"
Expand Down
6 changes: 3 additions & 3 deletions tugger-code-signing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ tempfile = "3.2"
thiserror = "1.0"
yasna = "0.3"

[dependencies.apple-bundle]
[target.'cfg(target_vender="apple")'.dependencies.apple-bundle]
version = "0.5.0-pre"
path = "../apple-bundle"

[dependencies.cryptographic-message-syntax]
version = "0.4.0-pre"
path = "../cryptographic-message-syntax"

[dependencies.tugger-apple-codesign]
[target.'cfg(target_vender="apple")'.dependencies.tugger-apple-codesign]
version = "0.5.0-pre"
path = "../tugger-apple-codesign"

[dependencies.tugger-file-manifest]
version = "0.5.0-pre"
path = "../tugger-file-manifest"

[dependencies.tugger-windows-codesign]
[target.'cfg(target_os="windows")'.dependencies.tugger-windows-codesign]
version = "0.4.0-pre"
path = "../tugger-windows-codesign"

Expand Down
Loading