chore(migration): Migrate code from googleapis/python-crc32c into packages/google-crc32c#16006
chore(migration): Migrate code from googleapis/python-crc32c into packages/google-crc32c#16006
Conversation
This way the point where built is fixed.
Also adding `crc32c_build.py` to actually create the foreign function interface. Unfortunately, this fails currently because `libcrc32c` can't be linked against dynamically.
This "fixes" the relocatable issue so long as I depend on google/crc32c#23.
Also adds a `check.sh` script to make sure the library gets moved correctly.
Also adding a "Verify Wheel" section.
This is actually so I can get the OS X wheel working with `delocate` (see [1]). Also: - Changed `git@...` path to `https://` path for `git clone` instructions - Change mention of Cython for CFFI - Update `check_cffi_crc32c.py` based on new import and also updated `README.md` to reflect new contents of the wheel - Ditched `include_dirs` in `crc32c_build.py` - Used `os.path.join` in `setup.py` to refer to `src/crc32c_build.py`. This way the reference will work on Windows. [1]: matthew-brett/delocate#45
Also adding a "check" script for these built wheels.
Adding a symlink to the Python 3.7 `manylinux` wheel for those that are linking to it.
Also - Moving `check_cffi_crc32c.py` into `scripts/` - Adding a `scripts/manylinux/build.sh` to actually invoke `docker` - Making the `build_on_centos.sh` script put wheels into the `wheels/` subdirectory rather than the root
Used as an install target for the 'libcrc32c.so' shared library, and also maybe as a virtualenv.
Document the steps for installing in development for testing.
- Add license header. - PEP 8 for constant name. - Import 'crc32c' at module scope. - Add a test for multiple 'extend' calls.
- Use 'virtualenv' for portability. - Keep the Python virtual environment separate from the C install target. - Fix unused variable in testcase.
Add tests derived from RFC 3720, section B.4.
- Don't require caller to pass a length to 'extend' / 'value'. - Make arguments to 'extend' / 'value' explicit. - Document arguments, return type for 'extend' / 'value'. - Adjust tests accordingly. - Add a test showing use of 'extend' with 'functools.reduce' and an iterable.
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@59171c8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2ed982f884312e4883e01b5ab8af8b6935f0216a5a2d82928d273081fc3be562 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* feat: add support for python 3.13 * upgrade script dependencies * continue iterating on build scripts * continue iterating on build scripts * continue iterating on build scripts * continue iterating on build scripts * continue iterating on build scripts * continue iterating on build scripts * continue iterating on build scripts --------- Co-authored-by: Andrew Gorcester <andrew.gorcester@gmail.com> Co-authored-by: Andrew Gorcester <gorcester@google.com>
* build: disable logging in publish_python_wheel.sh * apply same fix to scripts/manylinux/publish_python_wheel.sh * clean up
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Source-Link: googleapis/synthtool@450363b Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5581906b957284864632cde4e9c51d1cc66b0094990b27e689132fe5cd036046 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore(deps): update all dependencies * update python version for mypy --------- Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This PR fixes the failing presubmits to build this package in different environments. Note that the presubmits have been failing for a while. A better long term solution is to switch the approach by building and testing against the supported Python versions within a nox session.
Towards googleapis/librarian#2454 --------- Co-authored-by: Anthonios Partheniou <partheniou@google.com>
This PR puts the `version` under the right header. and adds the missing info in pyproject.toml
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v0.7.0 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:e601da6e29c993e14c52867f2c088dfb841beae618d2a4f1e0f7970a888ab020 <details><summary>google-crc32c: 1.8.0</summary> ## [1.8.0](googleapis/python-crc32c@v1.7.1...v1.8.0) (2025-12-15) ### Features * support Python 3.14 (#315) ([49d0a36f](googleapis/python-crc32c@49d0a36f)) ### Bug Fixes * update toml file with setup.cfg content (#319) ([42e5268c](googleapis/python-crc32c@42e5268c)) </details>
Temporarily restore release-please to release googleapis/python-crc32c#315 BEGIN_COMMIT_OVERRIDE feat: add support for Python 3.14 END_COMMIT_OVERRIDE
🤖 I have created a release *beep* *boop* --- ## [1.8.0](googleapis/python-crc32c@v1.7.1...v1.8.0) (2025-12-15) ### Features * Support Python 3.14 ([#315](googleapis/python-crc32c#315)) ([49d0a36](googleapis/python-crc32c@49d0a36)) ### Bug Fixes * Update toml file with setup.cfg content ([#319](googleapis/python-crc32c#319)) ([42e5268](googleapis/python-crc32c@42e5268)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…nto migration.python-crc32c.migration.2026-03-02_16-59-45.migrate
|
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. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request completes the migration of the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request migrates the google-crc32c package into this monorepo. The changes mostly consist of adding new files for the package, including configuration, CI scripts, and the source code as a submodule. My review focuses on ensuring the new package is set up correctly and consistently. I've found a few minor issues in configuration and documentation files, such as outdated URLs in templates and some confusing placeholders. Overall, the migration looks good, but these small fixes would improve clarity and user experience.
Note: Security Review is unavailable for this PR.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/google-crc32c/.github/ISSUE_TEMPLATE/bug_report.md (13)
The issue tracker URL points to the old python-crc32c repository. Since this package is being migrated into the google-cloud-python monorepo, this should be updated to point to the monorepo's issues page, possibly with a filter for this package, to avoid confusion for users.
- Search the issues already opened: https://github.com/googleapis/google-cloud-python/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+crc32c
packages/google-crc32c/.github/PULL_REQUEST_TEMPLATE.md (2)
The link to create a new issue points to the old python-crc32c repository. This should be updated to point to the google-cloud-python monorepo's issue creation page to ensure new issues are filed in the correct repository.
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-cloud-python/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
packages/google-crc32c/.github/header-checker-lint.yml (15)
This file is missing a final newline character. It's a good practice to end files with a newline to follow POSIX standards and avoid issues with some tools.
}
packages/google-crc32c/CHANGELOG.md (7)
The release date for version 1.8.0 appears to be a placeholder set in the future (2025). Please update it to the correct release date or remove it if it's not yet determined. This also applies to other future-dated releases in this file.
packages/google-crc32c/CHANGELOG.md (20-30)
This section for version 1.8.0 is a duplicate of the one on lines 7-18. Please remove this duplicated section to avoid confusion.
packages/google-crc32c/google_crc32c/CMakeLists.txt (143)
The use of /arch:NOTYET is confusing. While it correctly causes the check_cxx_source_compiles to fail for MSVC when checking for ARM64 CRC32C support, it's not explicit. A clearer approach would be to add a specific check for the MSVC compiler and explicitly set HAVE_ARM64_CRC32C to FALSE in that case. This would improve the readability and maintainability of the build script.
See #11005.
This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.