From 7a85f13f23faf83950434aa34e999c0782a55ddf Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 18 Sep 2023 15:31:40 +0200 Subject: [PATCH] Workaround to ensure that the pkg is installed under dist-packages. --- .drone.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.drone.yml b/.drone.yml index 740b6a2bb..267046e83 100644 --- a/.drone.yml +++ b/.drone.yml @@ -275,6 +275,7 @@ steps: - echo "--- Parsing metadata" - git config --global --add safe.directory $PWD - git pull --rebase origin master --tags + - export PY_VERSION=$(python3 --version | awk '{print $2}' | sed -re 's/^([0-9]+\.[0-9]+).*/\1/') - export VERSION=$(python3 setup.py --version) - export HEAD=$(git log --pretty=format:%h HEAD...HEAD~1) - export TAG_URL="https://git.platypush.tech/platypush/platypush/archive/v$VERSION.tar.gz" @@ -285,6 +286,7 @@ steps: - echo "--- Building git package" - pip install --prefix="$GIT_BUILD_DIR/usr" --no-cache --no-deps . + - mv "$GIT_BUILD_DIR/usr/lib/python$${PY_VERSION}/site-packages" "$GIT_BUILD_DIR/usr/lib/python$${PY_VERSION}/dist-packages" - mkdir -p "$GIT_BUILD_DIR/DEBIAN" - | @@ -332,6 +334,7 @@ steps: - echo "--- Parsing metadata" - git config --global --add safe.directory $PWD - git pull --rebase origin master --tags + - export PY_VERSION=$(python3 --version | awk '{print $2}' | sed -re 's/^([0-9]+\.[0-9]+).*/\1/') - export VERSION=$(python3 setup.py --version) - export HEAD=$(git log --pretty=format:%h HEAD...HEAD~1) - export TAG_URL="https://git.platypush.tech/platypush/platypush/archive/v$VERSION.tar.gz" @@ -342,6 +345,7 @@ steps: - echo "--- Building git package" - pip install --prefix="$GIT_BUILD_DIR/usr" --no-cache --no-deps . + - mv "$GIT_BUILD_DIR/usr/lib/python$${PY_VERSION}/site-packages" "$GIT_BUILD_DIR/usr/lib/python$${PY_VERSION}/dist-packages" - mkdir -p "$GIT_BUILD_DIR/DEBIAN" - |