Skip to content

Commit

Permalink
use python for platform independent cp
Browse files Browse the repository at this point in the history
  • Loading branch information
samansmink committed Oct 14, 2024
1 parent 82cd296 commit efb9e87
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ target/debug/$(EXTENSION_FILENAME): target/debug/$(EXTENSION_LIB_FILENAME)
-p $(DUCKDB_PLATFORM)

build/debug/$(EXTENSION_FILENAME): target/debug/$(EXTENSION_LIB_FILENAME)
$(shell $(PYTHON_VENV_BIN) -c "from pathlib import Path;Path('./build/debug/extension/$(EXTENSION_NAME)').mkdir(parents=True, exist_ok=True)")
cp target/debug/$(EXTENSION_LIB_FILENAME) build/debug/$(EXTENSION_FILENAME)
cp target/debug/$(EXTENSION_LIB_FILENAME) build/debug/extension/$(EXTENSION_NAME)/$(EXTENSION_FILENAME)
$(PYTHON_VENV_BIN) -c "from pathlib import Path;Path('./build/debug/extension/$(EXTENSION_NAME)').mkdir(parents=True, exist_ok=True)"
$(PYTHON_VENV_BIN) -c "import shutil;shutil.copyfile('target/debug/$(EXTENSION_LIB_FILENAME)', 'build/debug/$(EXTENSION_FILENAME)')"
$(PYTHON_VENV_BIN) -c "import shutil;shutil.copyfile('target/debug/$(EXTENSION_LIB_FILENAME)', 'build/debug/extension/$(EXTENSION_NAME)/$(EXTENSION_FILENAME)')"

debug: target/debug/$(EXTENSION_FILENAME) build/debug/$(EXTENSION_FILENAME)

Expand All @@ -78,9 +78,9 @@ target/release/$(EXTENSION_FILENAME): target/release/$(EXTENSION_LIB_FILENAME)
-p $(DUCKDB_PLATFORM)

build/release/$(EXTENSION_FILENAME): target/release/$(EXTENSION_LIB_FILENAME)
$(shell $(PYTHON_VENV_BIN) -c "from pathlib import Path;Path('./build/release/extension/$(EXTENSION_NAME)').mkdir(parents=True, exist_ok=True)")
cp target/release/$(EXTENSION_LIB_FILENAME) build/release/$(EXTENSION_FILENAME)
cp target/release/$(EXTENSION_LIB_FILENAME) build/release/extension/$(EXTENSION_NAME)/$(EXTENSION_FILENAME)
$(PYTHON_VENV_BIN) -c "from pathlib import Path;Path('./build/release/extension/$(EXTENSION_NAME)').mkdir(parents=True, exist_ok=True)"
$(PYTHON_VENV_BIN) -c "import shutil;shutil.copyfile('target/release/$(EXTENSION_LIB_FILENAME)', 'build/release/$(EXTENSION_FILENAME)')"
$(PYTHON_VENV_BIN) -c "import shutil;shutil.copyfile('target/release/$(EXTENSION_LIB_FILENAME)', 'build/release/extension/$(EXTENSION_NAME)/$(EXTENSION_FILENAME)')"

release: target/release/$(EXTENSION_FILENAME) build/release/$(EXTENSION_FILENAME)

Expand Down

0 comments on commit efb9e87

Please sign in to comment.