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

Conversation

foundkey
Copy link
Contributor

Fix for #254

According to the discussion under this PR, build parameters should be added via the setup.cfg file.

Enabling modules cuckoo and magic requires the build machine to install additional libraries. To avoid major CI changes, keep them disabled.

The openssl part will be automatically enabled based on whether there is openssl in the build environment, so there is no need to configure and enable it.
If oepnssl is manually configured and enabled, an error will occur when building the -macosx_universal2 wheel. Because the macos build environment cannot provide the arm version of openssl dependent libraries. Due to parameter passing issues in previous builds, the -macosx_universal2 version of the package did not enable openssl and did not include the hash module.

I kept the -macosx_universal2 version of the build, but it still doesn't have openssl enabled, and it still doesn't include the hash module. This may cause confusion for arm64 macos users, so according to #253 , a build of sdist was added. This allows advanced users to use local build installations if necessary.

In addition, according to the instructions in the CI log:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
I upgraded the version of docker/setup-qemu-action.

Copy link

google-cla bot commented Mar 20, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@foundkey foundkey closed this Mar 20, 2024
@foundkey foundkey reopened this Mar 20, 2024
setup.cfg Outdated
@@ -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.

@plusvic plusvic merged commit f9c17a0 into VirusTotal:master Mar 26, 2024
7 of 8 checks passed
@foundkey foundkey deleted the fix-ci branch March 26, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants