diff --git a/.github/workflows/build-wheels-publish.yml b/.github/workflows/build-wheels-publish.yml index 15abe92c..ce24aa8f 100644 --- a/.github/workflows/build-wheels-publish.yml +++ b/.github/workflows/build-wheels-publish.yml @@ -251,9 +251,10 @@ jobs: - name: Build SDist run: | - cd bindings/python python3 -m pip install -U pip build - python3 -m build --sdist + python3 -m build --sdist bindings/python + python3 -m pip install bindings/python/dist/*.tar.gz + python3 -c 'import capstone; print(f"Capstone version installed from sdist: {capstone.__version__}")' - uses: actions/upload-artifact@v4 with: diff --git a/bindings/python/setup.py b/bindings/python/setup.py index f3e4593f..b98dfbef 100755 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -82,14 +82,17 @@ def copy_sources(): shutil.copytree(os.path.join(BUILD_DIR, "arch"), os.path.join(SRC_DIR, "arch")) shutil.copytree(os.path.join(BUILD_DIR, "include"), os.path.join(SRC_DIR, "include")) + shutil.copytree(os.path.join(BUILD_DIR, "LICENSES"), os.path.join(SRC_DIR, "LICENSES")) src.extend(glob.glob(os.path.join(BUILD_DIR, "*.[ch]"))) src.extend(glob.glob(os.path.join(BUILD_DIR, "*.m[dk]"))) src.extend(glob.glob(os.path.join(BUILD_DIR, "*.in"))) - src.extend(glob.glob(os.path.join(BUILD_DIR, "LICENSES/*"))) - src.extend(glob.glob(os.path.join(BUILD_DIR, "*.TXT"))) + src.extend(glob.glob(os.path.join(BUILD_DIR, "SPONSORS.TXT"))) + src.extend(glob.glob(os.path.join(BUILD_DIR, "CREDITS.TXT"))) src.extend(glob.glob(os.path.join(BUILD_DIR, "ChangeLog"))) src.extend(glob.glob(os.path.join(BUILD_DIR, "CMakeLists.txt"))) + src.extend(glob.glob(os.path.join(BUILD_DIR, "CPackConfig.txt"))) + src.extend(glob.glob(os.path.join(BUILD_DIR, "CPackConfig.cmake"))) for filename in src: outpath = os.path.join(SRC_DIR, os.path.basename(filename))