From fdb9a0c5d67ac7353fe129bf21c883a19761666e Mon Sep 17 00:00:00 2001 From: MistEO Date: Thu, 19 Dec 2024 14:28:36 +0800 Subject: [PATCH] build: remove python binding from release (#476) --- .github/workflows/build.yml | 4 +--- source/binding/CMakeLists.txt | 4 +--- tools/pip_pack/pip_pack.py | 13 ++++++++----- 3 files changed, 10 insertions(+), 11 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 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..136cc2d4f 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(os.path.dirname(__file__), 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")