- do not try java things when building for docs.rs

This commit is contained in:
Wim Pomp
2025-02-03 16:17:14 +01:00
parent 3c22cf743a
commit b612d33a35
4 changed files with 11 additions and 7 deletions

2
.gitignore vendored
View File

@@ -1,5 +1,5 @@
/target
/Cargo.lock
Cargo.lock
# Byte-compiled / optimized / DLL files
__pycache__/

View File

@@ -1,6 +1,6 @@
[package]
name = "ndbioimage"
version = "2025.1.0"
version = "2025.1.1"
edition = "2021"
authors = ["Wim Pomp <w.pomp@nki.nl>"]
license = "GPL-3.0-or-later"

View File

@@ -6,10 +6,14 @@ use retry::{delay, delay::Exponential, retry};
fn main() -> anyhow::Result<()> {
println!("cargo:rerun-if-changed=build.rs");
Ok(retry(
Exponential::from_millis(1000).map(delay::jitter).take(4),
deploy_java_artifacts,
)?)
if std::env::var("DOCS_RS").is_ok() {
Ok(retry(
Exponential::from_millis(1000).map(delay::jitter).take(4),
deploy_java_artifacts,
)?)
} else {
Ok(())
}
}
fn deploy_java_artifacts() -> Result<(), J4RsError> {

View File

@@ -4,7 +4,7 @@ build-backend = "maturin"
[project]
name = "ndbioimage_rs"
requires-python = ">=3.8"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",