AnandInguva commented on code in PR #29609: URL: https://github.com/apache/beam/pull/29609#discussion_r1419140300
########## sdks/python/container/run_generate_requirements.sh: ########## @@ -30,14 +30,18 @@ # You will need Python interpreters for all versions supported by Beam, see: # https://s.apache.org/beam-python-dev-wiki -if ! [[ "$(expr substr $(uname -s) 1 5)" == "Linux" ]]; then - echo This script needs to be executed in a Linux environment. - exit 1 -fi - -if ! dpkg -s libsnappy-dev >/dev/null ; then - echo You must install libsnappy-dev to run this script. Run: - echo sudo apt install libsnappy-dev +if [[ "$(expr substr $(uname -s) 1 5)" == "Linux" ]]; then + if ! dpkg -s libsnappy-dev >/dev/null ; then + echo You must install libsnappy-dev to run this script. Run: + echo sudo apt install libsnappy-dev + exit 1 + fi +elif [[ "$(expr substr $(uname -s) 1 6)" == "Darwin" ]]; then + if ! brew list snappy >/dev/null ; then + echo You must install snappy to run this script. Run: + echo brew install snappy Review Comment: I ran > Task :sdks:python:container:py311:generatePythonRequirements FAILED It failed for me. ``` Building wheel for python-snappy (setup.py): started Building wheel for python-snappy (setup.py): finished with status 'error' error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [25 lines of output] running bdist_wheel running build running build_py creating build Running setup.py clean for python-snappy creating build/lib.macosx-14.1-arm64-cpython-311 creating build/lib.macosx-14.1-arm64-cpython-311/snappy copying src/snappy/snappy.py -> build/lib.macosx-14.1-arm64-cpython-311/snappy copying src/snappy/snappy_cffi.py -> build/lib.macosx-14.1-arm64-cpython-311/snappy copying src/snappy/__init__.py -> build/lib.macosx-14.1-arm64-cpython-311/snappy copying src/snappy/hadoop_snappy.py -> build/lib.macosx-14.1-arm64-cpython-311/snappy copying src/snappy/snappy_formats.py -> build/lib.macosx-14.1-arm64-cpython-311/snappy copying src/snappy/__main__.py -> build/lib.macosx-14.1-arm64-cpython-311/snappy copying src/snappy/snappy_cffi_builder.py -> build/lib.macosx-14.1-arm64-cpython-311/snappy running build_ext building 'snappy._snappy' extension creating build/temp.macosx-14.1-arm64-cpython-311 creating build/temp.macosx-14.1-arm64-cpython-311/src creating build/temp.macosx-14.1-arm64-cpython-311/src/snappy clang -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/anandinguva/Desktop/projects/beam/build/python311_requirements_gen/include -I/Users/anandinguva/.pyenv/versions/3.11.5/include/python3.11 -c src/snappy/crc32c.c -o build/temp.macosx-14.1-arm64-cpython-311/src/snappy/crc32c.o clang -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/anandinguva/Desktop/projects/beam/build/python311_requirements_gen/include -I/Users/anandinguva/.pyenv/versions/3.11.5/include/python3.11 -c src/snappy/snappymodule.cc -o build/temp.macosx-14.1-arm64-cpython-311/src/snappy/snappymodule.o src/snappy/snappymodule.cc:33:10: fatal error: 'snappy-c.h' file not found #include <snappy-c.h> ^~~~~~~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for python-snappy Successfully built bs4 future google-cloud-profiler Failed to build python-snappy ERROR: Could not build wheels for python-snappy, which is required to install pyproject.toml-based projects ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
