From 523fec7a6d43cadeab1d89c169acee7f83c7362a Mon Sep 17 00:00:00 2001 From: foundkey <469456770@qq.com> Date: Wed, 20 Mar 2024 12:57:06 +0800 Subject: [PATCH 1/2] update ci --- .github/workflows/publish-to-pypi.yml | 18 ++++++++++++++---- setup.cfg | 10 ++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 171cd7a..dc8a365 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -4,7 +4,6 @@ on: push: branches: - master - tags: pull_request: workflow_dispatch: @@ -21,6 +20,7 @@ jobs: include: - os: ubuntu-22.04 arch: x86_64 + build-sdist: true - os: ubuntu-22.04 arch: i686 - os: ubuntu-22.04 @@ -43,7 +43,7 @@ jobs: - name: Set up QEMU if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: all @@ -67,9 +67,8 @@ jobs: fi CIBW_BEFORE_ALL_WINDOWS: ${{ matrix.before }} CIBW_BUILD_FRONTEND: build - CIBW_CONFIG_SETTINGS: --enable-cuckoo --enable-magic --enable-dex --enable-macho --enable-openssl CIBW_ENVIRONMENT: ${{ matrix.env }} - CIBW_SKIP: cp36-* + CIBW_SKIP: cp36-* *-macosx_universal2:arm64 CIBW_TEST_COMMAND: python {package}/tests.py - name: Store the distribution packages @@ -78,6 +77,17 @@ jobs: name: python-package-distributions-${{ matrix.os }}-${{ matrix.arch }} path: dist/*.whl + - name: Build Sdist + if: ${{ matrix.build-sdist }} + run: pipx run build --sdist + + - name: Store the source distribution package + if: ${{ matrix.build-sdist }} + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions-source + path: dist/*.tar.gz + publish-to-pypi: needs: [build] runs-on: ubuntu-latest diff --git a/setup.cfg b/setup.cfg index 8616118..9c4f7f0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,3 +4,13 @@ license_file = LICENSE [test] test_suite=tests + +[build_ext] +enable_dex = true +enable_macho = true + +# need libjansson-dev +# enable_cuckoo = true + +# need libmagic-dev +# enable_magic = true From 33eaa7ac5b165ae36adf65122d7868ed5e9fb232 Mon Sep 17 00:00:00 2001 From: foundkey <469456770@qq.com> Date: Mon, 25 Mar 2024 22:31:45 +0800 Subject: [PATCH 2/2] disable dex and macho by default --- setup.cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9c4f7f0..02a93d2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,8 +6,9 @@ license_file = LICENSE test_suite=tests [build_ext] -enable_dex = true -enable_macho = true +# These modules are not stable or tested enough +# enable_dex = true +# enable_macho = true # need libjansson-dev # enable_cuckoo = true