-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Add array_record recipe #29033
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
Closed
Closed
Add array_record recipe #29033
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
3d82a86
Add array-record recipe
ehfd 1d4954b
Fix dependency
ehfd cf3e9e4
Comment out crossbuild
ehfd 73c4c69
Fix Bazel
ehfd 976af12
Fix build
ehfd e12e4f0
Fix dependencies
ehfd b95163e
Fix build
ehfd 04caa9f
Fix build
ehfd 8ebafc0
Fix build
ehfd 3ee1638
Fix build
ehfd 9e3bde2
Revert version
ehfd 5dc19cf
Customize build pipeline
ehfd fb7f262
Edit build
ehfd 30fb6c5
Fix build
ehfd eb5abe5
Fix build
ehfd 6cae640
Change official package name
ehfd 0681c8b
Edit build procedures
ehfd 144e8b3
Edit build
ehfd c6b4fd0
Fix build
ehfd 912d857
Fix build pattern
ehfd 7ce1797
Fix recipe
ehfd 9c12e39
Take suggestions
ehfd 499b9b6
Fix build
ehfd e03598e
Fix build
ehfd 9e401b1
Edit build
ehfd da454b1
Add libabseil
ehfd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -exuo pipefail | ||
|
|
||
| # https://github.com/bazelbuild/bazel/issues/14355 | ||
| # Remove or change when upgrading from Bazel 5.4.0 | ||
| rm -rf ${BUILD_PREFIX}/share/bazel/install/* | ||
|
|
||
| source gen-bazel-toolchain | ||
|
|
||
| export CROSSTOOL_TOP="//bazel_toolchain:toolchain" | ||
|
|
||
| if [[ "${target_platform}" == linux-* ]]; then | ||
| export AUDITWHEEL_PLATFORM="manylinux2014_$(uname -m)" | ||
| fi | ||
|
|
||
| export PYTHON_BIN="${PYTHON}" | ||
|
|
||
| PYTHON_MAJOR_VERSION=$(${PYTHON_BIN} -c 'import sys; print(sys.version_info.major)') | ||
| PYTHON_MINOR_VERSION=$(${PYTHON_BIN} -c 'import sys; print(sys.version_info.minor)') | ||
| PYTHON_VERSION="${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION}" | ||
| export PYTHON_VERSION="${PYTHON_VERSION}" | ||
|
|
||
| # Remove .bazelrc if it already exists | ||
| [ -e .bazelrc ] && rm -f .bazelrc | ||
|
|
||
| echo "build -c opt" >> .bazelrc | ||
| echo "build --cxxopt=-std=c++17" >> .bazelrc | ||
| echo "build --host_cxxopt=-std=c++17" >> .bazelrc | ||
| echo "build --linkopt=\"-lrt -lm\"" >> .bazelrc | ||
| echo "build --experimental_repo_remote_exec" >> .bazelrc | ||
| echo "build --python_path=\"${PYTHON_BIN}\"" >> .bazelrc | ||
|
|
||
| echo "build --logging=6" >> .bazelrc | ||
| echo "build --verbose_failures" >> .bazelrc | ||
| echo "build --local_cpu_resources=${CPU_COUNT}" | ||
|
|
||
| if [ -n "${CROSSTOOL_TOP}" ]; then | ||
| echo "build --crosstool_top=${CROSSTOOL_TOP}" >> .bazelrc | ||
| echo "build --cpu=${TARGET_CPU}" >> .bazelrc | ||
| echo "test --crosstool_top=${CROSSTOOL_TOP}" >> .bazelrc | ||
| echo "test --cpu=${TARGET_CPU}" >> .bazelrc | ||
| fi | ||
|
|
||
| bazel clean | ||
| bazel build ... | ||
| bazel test --verbose_failures --test_output=errors ... | ||
|
|
||
| DEST="./all_dist" | ||
| # Create the directory, then do dirname on a non-existent file inside it to | ||
| # give us an absolute paths with tilde characters resolved to the destination | ||
| # directory. | ||
| mkdir -p "${DEST}" | ||
| echo "=== destination directory: ${DEST}" | ||
|
|
||
| TMPDIR=$(mktemp -d -t tmp.XXXXXXXXXX) | ||
|
|
||
| echo $(date) : "=== Using tmpdir: ${TMPDIR}" | ||
| mkdir "${TMPDIR}/array_record" | ||
|
|
||
| echo $(date) : "=== Copy array_record files" | ||
|
|
||
| cp setup.py "${TMPDIR}" | ||
| cp LICENSE "${TMPDIR}" | ||
| rsync -avm -L --exclude="bazel-*/" . "${TMPDIR}/array_record" | ||
| rsync -avm -L --include="*.so" --include="*_pb2.py" \ | ||
| --exclude="*.runfiles" --exclude="*_obj" --include="*/" --exclude="*" \ | ||
| bazel-bin/cpp "${TMPDIR}/array_record" | ||
| rsync -avm -L --include="*.so" --include="*_pb2.py" \ | ||
| --exclude="*.runfiles" --exclude="*_obj" --include="*/" --exclude="*" \ | ||
| bazel-bin/python "${TMPDIR}/array_record" | ||
|
|
||
| pushd ${TMPDIR} | ||
| echo $(date) : "=== Building wheel" | ||
| ${PYTHON_BIN} setup.py bdist_wheel --python-tag py3${PYTHON_MINOR_VERSION} | ||
|
|
||
| if [ -n "${AUDITWHEEL_PLATFORM}" ]; then | ||
| echo $(date) : "=== Auditing wheel" | ||
| auditwheel repair --plat ${AUDITWHEEL_PLATFORM} -w dist dist/*.whl | ||
| fi | ||
|
|
||
| echo $(date) : "=== Listing wheel" | ||
| ls -lrt dist/*.whl | ||
| cp dist/*.whl "${DEST}" | ||
| popd | ||
|
|
||
| echo $(date) : "=== Output wheel file is in: ${DEST}" | ||
|
|
||
| # Install the wheel to Conda prefix | ||
| ${PYTHON} -m pip install -vv --no-deps --no-build-isolation ${DEST}/*.whl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| {% set version = "0.5.0" %} | ||
|
|
||
| package: | ||
| name: array_record | ||
| version: {{ version }} | ||
|
|
||
| source: | ||
| url: https://github.com/google/array_record/archive/v{{ version }}.tar.gz | ||
| sha256: 6294b67f21311034ff8ab81d4192e09a7d0767465a0bf8f49cd4e5559a7e9dcb | ||
|
|
||
| build: | ||
| number: 0 | ||
| skip: true # [win] | ||
|
|
||
| requirements: | ||
| build: | ||
| - {{ compiler('c') }} | ||
| - {{ stdlib('c') }} | ||
| - {{ compiler('cxx') }} | ||
| - python # [build_platform != target_platform] | ||
| - cross-python_{{ target_platform }} # [build_platform != target_platform] | ||
| - bazel 5.4.0 | ||
| - bazel-toolchain | ||
| - git | ||
| - rsync | ||
| host: | ||
| - python | ||
| - pip | ||
| - libabseil | ||
| - absl-py | ||
| - auditwheel # [linux] | ||
| - patchelf | ||
| - setuptools | ||
| - twine | ||
| - wheel | ||
| run: | ||
| - python | ||
| - absl-py | ||
| - etils | ||
| - fsspec | ||
| - importlib_resources | ||
| - typing_extensions | ||
| - zipp | ||
| run_constrained: | ||
| - apache-beam ==2.53.0 | ||
| - google-cloud-storage >=2.11.0 | ||
| - tensorflow >=2.14.0 | ||
| test: | ||
| imports: | ||
| - array_record | ||
| - array_record.python.array_record_data_source | ||
| - array_record.python.array_record_module | ||
| commands: | ||
| - pip check | ||
| requires: | ||
| - pip | ||
|
|
||
| about: | ||
| home: https://pypi.org/project/array-record/ | ||
| summary: A file format that achieves a new frontier of IO efficiency | ||
| license: Apache-2.0 | ||
| license_family: Apache | ||
| license_file: LICENSE | ||
| dev_url: https://github.com/google/array_record | ||
|
|
||
| extra: | ||
| recipe-maintainers: | ||
| - ehfd | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.