diff --git a/CLAUDE.md b/CLAUDE.md index 88d6819..f96a86f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -25,6 +25,7 @@ ARCADEDB_TAG=26.11.1-SNAPSHOT ./scripts/build.sh # pin the arcadedata/arcaded - Linux builds use `scripts/Dockerfile.build`; macOS/Windows use `scripts/build-native.sh` with a native JDK 25+ (jlink). - Jars come from the `arcadedata/arcadedb` Docker image, filtered by `scripts/jar_exclusions.txt`, staged by `scripts/stage_jars.sh` (always re-pulled; stale jars from a previous build are removed). +- `JAR_LIB_DIR` (third argument) may be a symlink, and so may any jar in it: `build.sh` follows both and stages real files into `local-jars/`. - The package version is derived from the `arcadedb-engine-.jar` (`scripts/extract_version.py`): `26.11.1-SNAPSHOT` → `26.11.1.devN`. The `version = "0.0.0"` in `pyproject.toml` is a placeholder overwritten at build time. - `src/java/com/arcadedb/python/*.java` is compiled during the build into `arcadedb-python-bridge.jar` (both in `Dockerfile.build` and `build-native.sh`). Changing Java code requires a rebuild. - Output: `dist/*.whl`. `setup.py` only exists to force a platform-specific wheel tag. diff --git a/scripts/build.sh b/scripts/build.sh index 407f0c5..f2542ec 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -168,7 +168,9 @@ if [[ -n "$JAR_LIB_DIR" ]]; then exit 1 fi - if ! find "$JAR_LIB_DIR" -maxdepth 1 -name "*.jar" -print -quit | grep -q .; then + # -H: find does not follow a symlinked starting point on its own, so a JAR_LIB_DIR that is + # a symlink to a directory looked empty and failed with "No JAR files found". + if ! find -H "$JAR_LIB_DIR" -maxdepth 1 -name "*.jar" -print -quit | grep -q .; then echo -e "${RED}❌ No JAR files found in: ${JAR_LIB_DIR}${NC}" exit 1 fi @@ -183,7 +185,9 @@ if [[ -n "$JAR_LIB_DIR" ]]; then echo -e "${CYAN}📦 Using provided JAR directory: ${YELLOW}${JAR_LIB_DIR}${NC}" rm -rf "$LOCAL_JARS_DIR" mkdir -p "$LOCAL_JARS_DIR" - cp -a "$JAR_LIB_DIR"/*.jar "$LOCAL_JARS_DIR"/ + # -L: a jar that is itself a symlink is staged as a file. A copied link would dangle in the + # Docker build context and the hash below (find -type f) would skip it. + cp -aL "$JAR_LIB_DIR"/*.jar "$LOCAL_JARS_DIR"/ JAR_SOURCE_DESC="${JAR_LIB_DIR} (staged into local-jars)" fi