Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass build parameters correctly, enable dex and macho modules #256

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
tags:
pull_request:
workflow_dispatch:

Expand All @@ -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
Expand All @@ -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

Expand 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
Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@ license_file = LICENSE

[test]
test_suite=tests

[build_ext]
enable_dex = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both dex and macho should be disabled by default. These modules are not stable or tested enough and never have been included in the official build. They are kept for anyone who wants to use them on their own risk.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the configuration in the CI file(publish-to-pypi.yml#L70), I thought these features were enabled by default. The actual situation is that the previous maintainer had the intention to enable it, but because the parameters were not passed correctly (refer to cibuildwheel's documentation), the build did not enable these features, which is as you expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I committed a new commit, disabled dex and macho modules by default.

enable_macho = true

# need libjansson-dev
# enable_cuckoo = true

# need libmagic-dev
# enable_magic = true