mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-23 13:24:17 +08:00
Implement build python template and port python3-yaml
This commit is contained in:
parent
0886d88cd6
commit
2dd0f0f1f2
16
recipes/wip/dev/python/python3-cython/recipe.toml
Normal file
16
recipes/wip/dev/python/python3-cython/recipe.toml
Normal file
@ -0,0 +1,16 @@
|
||||
[source]
|
||||
git = "https://github.com/cython/cython"
|
||||
rev = "3.2.4"
|
||||
shallow_clone = true
|
||||
|
||||
[build]
|
||||
template = "python"
|
||||
dev-dependencies = [
|
||||
"host:python312",
|
||||
"host:python3-setuptools",
|
||||
]
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"python312"
|
||||
]
|
||||
16
recipes/wip/dev/python/python3-setuptools/recipe.toml
Normal file
16
recipes/wip/dev/python/python3-setuptools/recipe.toml
Normal file
@ -0,0 +1,16 @@
|
||||
[source]
|
||||
git = "https://github.com/pypa/setuptools"
|
||||
rev = "v82.0.1"
|
||||
shallow_clone = true
|
||||
|
||||
[build]
|
||||
template = "python"
|
||||
dev-dependencies = [
|
||||
"host:python312",
|
||||
]
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"python312"
|
||||
]
|
||||
|
||||
17
recipes/wip/dev/python/python3-yaml/recipe.toml
Normal file
17
recipes/wip/dev/python/python3-yaml/recipe.toml
Normal file
@ -0,0 +1,17 @@
|
||||
[source]
|
||||
git = "https://github.com/yaml/pyyaml.git"
|
||||
rev = "6.0.3"
|
||||
shallow_clone = true
|
||||
|
||||
[build]
|
||||
template = "python"
|
||||
dev-dependencies = [
|
||||
"host:python312",
|
||||
"host:python3-setuptools",
|
||||
"host:python3-cython",
|
||||
]
|
||||
|
||||
[package]
|
||||
dependencies = [
|
||||
"python312"
|
||||
]
|
||||
11
recipes/wip/net/aws-cli/recipe.toml
Normal file
11
recipes/wip/net/aws-cli/recipe.toml
Normal file
@ -0,0 +1,11 @@
|
||||
# TODO: workout pyproject.toml deps
|
||||
[source]
|
||||
git = "https://github.com/aws/aws-cli.git"
|
||||
rev = "2.15.31"
|
||||
shallow_clone = true
|
||||
|
||||
[build]
|
||||
template = "python"
|
||||
dev-dependencies = [
|
||||
"host:python312"
|
||||
]
|
||||
@ -388,6 +388,7 @@ pub fn build(
|
||||
"DYNAMIC_INIT\n{}cookbook_meson",
|
||||
flags_fn("COOKBOOK_MESON_FLAGS", mesonflags),
|
||||
),
|
||||
BuildKind::Python {} => format!("DYNAMIC_INIT\ncookbook_python"),
|
||||
BuildKind::Custom { script } => script.clone(),
|
||||
BuildKind::Remote => unreachable!(),
|
||||
BuildKind::None => "".to_owned(),
|
||||
|
||||
@ -348,6 +348,15 @@ function cookbook_meson {
|
||||
"${COOKBOOK_NINJA}" -j"${COOKBOOK_MAKE_JOBS}"
|
||||
DESTDIR="${COOKBOOK_STAGE}" "${COOKBOOK_NINJA}" install -j"${COOKBOOK_MAKE_JOBS}"
|
||||
}
|
||||
COOKBOOK_PYTHON="${COOKBOOK_TOOLCHAIN}/bin/python3"
|
||||
function cookbook_python {
|
||||
ARCH="${TARGET%%-*}"
|
||||
OS=$(echo "${TARGET}" | cut -d - -f3-4)
|
||||
export PYTHONPYCACHEPREFIX="${COOKBOOK_BUILD}" _PYTHON_HOST_PLATFORM="$OS-$ARCH"
|
||||
"${COOKBOOK_PYTHON}" -m pip install --prefix="${COOKBOOK_STAGE}/usr" "${COOKBOOK_SOURCE}" \
|
||||
--ignore-installed --no-index --no-build-isolation "$@"
|
||||
rsync -av "${COOKBOOK_BUILD}/${COOKBOOK_STAGE}/usr/" "${COOKBOOK_STAGE}/usr"
|
||||
}
|
||||
"#;
|
||||
|
||||
pub(crate) static BUILD_POSTSCRIPT: &str = r#"
|
||||
|
||||
@ -103,6 +103,9 @@ pub enum BuildKind {
|
||||
#[serde(default)]
|
||||
mesonflags: Vec<String>,
|
||||
},
|
||||
/// Will build and install using python pip
|
||||
#[serde(rename = "python")]
|
||||
Python,
|
||||
/// Will build and install using custom commands
|
||||
#[serde(rename = "custom")]
|
||||
Custom { script: String },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user