From ee1d6340d1cb81ba73cfb2b2bf7e96c3f5f0a3ee Mon Sep 17 00:00:00 2001 From: MistEO Date: Wed, 18 Dec 2024 17:27:44 +0800 Subject: [PATCH 1/3] build: try remove python binding from release --- source/binding/CMakeLists.txt | 4 +--- tools/pip_pack/pip_pack.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/source/binding/CMakeLists.txt b/source/binding/CMakeLists.txt index 7fbd156a7..0eade5a6f 100644 --- a/source/binding/CMakeLists.txt +++ b/source/binding/CMakeLists.txt @@ -6,6 +6,4 @@ if(BUILD_NODEJS_BINDING) endif() endif() -install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/Python" DESTINATION binding) - -# install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/cpp" DESTINATION binding) +# install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/Python" DESTINATION binding) diff --git a/tools/pip_pack/pip_pack.py b/tools/pip_pack/pip_pack.py index f2f3de09a..790bc0441 100644 --- a/tools/pip_pack/pip_pack.py +++ b/tools/pip_pack/pip_pack.py @@ -174,15 +174,18 @@ def pack_whl(whl_tag: str): def copy_base(): print("Copying base...", end="") - asset_dir = os.listdir(ASSETS_PATH)[0] - asset_path = os.path.join(ASSETS_PATH, asset_dir) - src_path = os.path.join(asset_path, "binding", "Python") + PROJECT_PATH = os.path.join(__file__, os.pardir, os.pardir, os.pardir) + + src_path = os.path.join(PROJECT_PATH, "source", "binding", "Python") shutil.copytree(src_path, SRC_DIR) - readme_path = os.path.join(asset_path, "README.md") + readme_path = os.path.join(PROJECT_PATH, "README.md") shutil.copy(readme_path, "README.md") - license_path = os.path.join(asset_path, "LICENSE.md") + readme_path = os.path.join(PROJECT_PATH, "README_en.md") + shutil.copy(readme_path, "README_en.md") + + license_path = os.path.join(PROJECT_PATH, "LICENSE.md") shutil.copy(license_path, "LICENSE.md") print("done") From 1482bd8ab8c6956d8e297cf55a91c29ea33ad5f7 Mon Sep 17 00:00:00 2001 From: MistEO Date: Wed, 18 Dec 2024 17:34:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?ci:=20=E5=93=AA=E6=9D=A5=E7=9A=84=E5=A5=87?= =?UTF-8?q?=E6=80=AA=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 979d8cefe..022abe9c5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -541,7 +541,7 @@ jobs: prerelease: ${{ needs.meta.outputs.is_pre_release == 'true' }} - name: Create issue if failed to release - if: failure() || steps.nuget.outputs.failed || steps.pip.outputs.failed || ${{ steps.nodejs.outputs.id == 'undefined' }} + if: steps.nuget.outputs.failed || steps.pip.outputs.failed || ${{ steps.nodejs.outputs.id == 'undefined' }} uses: actions-cool/issues-helper@v3 with: actions: "create-issue" @@ -551,5 +551,3 @@ jobs: ${{ steps.nuget.outputs.failed && '- nuget @moomiji' || '' }} ${{ steps.pip.outputs.failed && '- pip @MistEO' || '' }} ${{ steps.nodejs.outputs.id == 'undefined' && '- nodejs @neko-para' || '' }} - - cc @MistEO From 590238144f50646331f8ed54929a772d403fc251 Mon Sep 17 00:00:00 2001 From: MistEO Date: Wed, 18 Dec 2024 17:47:19 +0800 Subject: [PATCH 3/3] ci: fix dirname --- tools/pip_pack/pip_pack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pip_pack/pip_pack.py b/tools/pip_pack/pip_pack.py index 790bc0441..136cc2d4f 100644 --- a/tools/pip_pack/pip_pack.py +++ b/tools/pip_pack/pip_pack.py @@ -174,7 +174,7 @@ def pack_whl(whl_tag: str): def copy_base(): print("Copying base...", end="") - PROJECT_PATH = os.path.join(__file__, os.pardir, os.pardir, os.pardir) + PROJECT_PATH = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir) src_path = os.path.join(PROJECT_PATH, "source", "binding", "Python") shutil.copytree(src_path, SRC_DIR)