cmake: Improve Python robustness and test usability #31233

pull hebasto wants to merge 2 commits into bitcoin:master from hebasto:241106-python changing 4 files +13 −14
  1. hebasto commented at 1:45 PM on November 6, 2024: member

    This PR:

    1. Switches to a modern CMake approach by using the Python3::Interpreter imported target, which is more robust than using variables.

    2. Disables the util_rpcauth_test test explicitly instead of silently ignoring it.

    A build and test log for the case when Python is unavailable is provided below:

    $ cmake -B build
    $ cmake --build build -j 16
    $ ctest --test-dir build -j $(nproc) -R "^util"
    Internal ctest changing into directory: /bitcoin/build
    Test project /bitcoin/build
        Start 115: util_tests
        Start 117: util_trace_tests
        Start 114: util_string_tests
        Start 116: util_threadnames_tests
        Start   1: util_rpcauth_test
    1/5 Test   [#1](/bitcoin-bitcoin/1/): util_rpcauth_test ................***Not Run (Disabled)   0.00 sec
    2/5 Test [#114](/bitcoin-bitcoin/114/): util_string_tests ................   Passed    0.11 sec
    3/5 Test [#117](/bitcoin-bitcoin/117/): util_trace_tests .................   Passed    0.11 sec
    4/5 Test [#116](/bitcoin-bitcoin/116/): util_threadnames_tests ...........   Passed    0.11 sec
    5/5 Test [#115](/bitcoin-bitcoin/115/): util_tests .......................   Passed    0.13 sec
    
    100% tests passed, 0 tests failed out of 4
    
    Total Test time (real) =   0.13 sec
    
    The following tests did not run:
    	  1 - util_rpcauth_test (Disabled)
    
  2. hebasto added the label Build system on Nov 6, 2024
  3. hebasto added the label Tests on Nov 6, 2024
  4. DrahtBot commented at 1:45 PM on November 6, 2024: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31233.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK purpleKarrot, janb84
    Stale ACK lucasbalieiro, BrandonOdiwuor

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. hebasto commented at 3:35 PM on November 6, 2024: member

    My Guix build:

    aarch64
    b4bd41285ec597b50489a3e3bf8ffde5e557d514ad5860fa3cfdd04da2144839  guix-build-4b6a842c2801/output/aarch64-linux-gnu/SHA256SUMS.part
    3222cf16fe93c3df73efc360150b384bf968f18ce929875bf384c9833e6411e7  guix-build-4b6a842c2801/output/aarch64-linux-gnu/bitcoin-4b6a842c2801-aarch64-linux-gnu-debug.tar.gz
    68cb1589be0fe45c8d9bd2dfa96b2610d49fcec5621b678a952db857493fdae9  guix-build-4b6a842c2801/output/aarch64-linux-gnu/bitcoin-4b6a842c2801-aarch64-linux-gnu.tar.gz
    9e289ec70fff76b6f6079ea852bb192bb97976618460404d46570992e6416964  guix-build-4b6a842c2801/output/arm-linux-gnueabihf/SHA256SUMS.part
    5c26ca52d1b93ac1356ee002fcdc772262dd8d7611da0b4295a286d512702e24  guix-build-4b6a842c2801/output/arm-linux-gnueabihf/bitcoin-4b6a842c2801-arm-linux-gnueabihf-debug.tar.gz
    6b2c340d82b641c58b956e27b8b034a72e791435cbc6c9de6551d6d359495cc7  guix-build-4b6a842c2801/output/arm-linux-gnueabihf/bitcoin-4b6a842c2801-arm-linux-gnueabihf.tar.gz
    351619f4e964f8d2b7c8e22d1ddd6b1d0db0cf27c3e1be36c489a9962388a8b2  guix-build-4b6a842c2801/output/arm64-apple-darwin/SHA256SUMS.part
    ea99f4078880f5233dd0e46666611839d52a9ffaf35fa4d85471f09e320da519  guix-build-4b6a842c2801/output/arm64-apple-darwin/bitcoin-4b6a842c2801-arm64-apple-darwin-unsigned.tar.gz
    8b78963b310762d2e0068bc8ba0b643ba4cae110d2942d659387fea807297718  guix-build-4b6a842c2801/output/arm64-apple-darwin/bitcoin-4b6a842c2801-arm64-apple-darwin-unsigned.zip
    92ac17a362ec939c33498179371224d60daeb0338ea482edffb7ce0cbea551d0  guix-build-4b6a842c2801/output/arm64-apple-darwin/bitcoin-4b6a842c2801-arm64-apple-darwin.tar.gz
    fece3efc27e98b0e163e79adf8e965cbff67037a6e73c217fb58bc40d19f7f1d  guix-build-4b6a842c2801/output/dist-archive/bitcoin-4b6a842c2801.tar.gz
    f9383706e867737e69cc6853487d88dcf92c5a1b1e350e27e69115a0853e8d4f  guix-build-4b6a842c2801/output/powerpc64-linux-gnu/SHA256SUMS.part
    c3a3a578d64a2721e1be9b92dd42d787c270a0fe5a16c9c4821abf833f2020e4  guix-build-4b6a842c2801/output/powerpc64-linux-gnu/bitcoin-4b6a842c2801-powerpc64-linux-gnu-debug.tar.gz
    fa2df5e6902c846657aa57d75d900010e2cc3f00ad946785fb6afb961b72b132  guix-build-4b6a842c2801/output/powerpc64-linux-gnu/bitcoin-4b6a842c2801-powerpc64-linux-gnu.tar.gz
    df2f59f8d71094fa4d2aa5eab39dce5136f004813746c5773bb793460d94cb45  guix-build-4b6a842c2801/output/riscv64-linux-gnu/SHA256SUMS.part
    92f62e9650540ac8cdb44b7cd24998e038dfcac69d9db17bfe6d09cd8df02c71  guix-build-4b6a842c2801/output/riscv64-linux-gnu/bitcoin-4b6a842c2801-riscv64-linux-gnu-debug.tar.gz
    ba982ed663b82f143b82807c873697eeea90aa99812d4663cd36d80dd66d2664  guix-build-4b6a842c2801/output/riscv64-linux-gnu/bitcoin-4b6a842c2801-riscv64-linux-gnu.tar.gz
    cf98209feab437849d8bf48839ae303310cd4b89fe4117556ff303a3f119471c  guix-build-4b6a842c2801/output/x86_64-apple-darwin/SHA256SUMS.part
    923859ff858ae7c521aea4a211752623133d52a38b475e335b66241aa97f5193  guix-build-4b6a842c2801/output/x86_64-apple-darwin/bitcoin-4b6a842c2801-x86_64-apple-darwin-unsigned.tar.gz
    6398753ab5dc7a7976a7a109be9b5ed71259b4c9fc68d8312e936009f5c9ace8  guix-build-4b6a842c2801/output/x86_64-apple-darwin/bitcoin-4b6a842c2801-x86_64-apple-darwin-unsigned.zip
    13c6f9050ee33e1324b3cf65f97d5ab2540644953a1c7ce94c053e6395c9508a  guix-build-4b6a842c2801/output/x86_64-apple-darwin/bitcoin-4b6a842c2801-x86_64-apple-darwin.tar.gz
    fee8c5bf60d56acfd6cdaed763ac841e132eea3cfc839b0bc8d824bc5d554cb6  guix-build-4b6a842c2801/output/x86_64-linux-gnu/SHA256SUMS.part
    f92482e905e2949c1f34d60d4a895b2fafe09825ed00e5aa5401ae30d0976757  guix-build-4b6a842c2801/output/x86_64-linux-gnu/bitcoin-4b6a842c2801-x86_64-linux-gnu-debug.tar.gz
    d958174725702e4be7162c2b8ad93afd600ad10e9e82598e8584914bbea9fe5d  guix-build-4b6a842c2801/output/x86_64-linux-gnu/bitcoin-4b6a842c2801-x86_64-linux-gnu.tar.gz
    49a7b22039c44c4ed1c6324811d9043944665320560bc12dcbc7d3ae1321807a  guix-build-4b6a842c2801/output/x86_64-w64-mingw32/SHA256SUMS.part
    33c90eb5a0393e35418dcb1ddf333f90df35804c6a2ae1352aacdf5908fc1e3f  guix-build-4b6a842c2801/output/x86_64-w64-mingw32/bitcoin-4b6a842c2801-win64-debug.zip
    4a24314797582e87ffdb7c36d248cd248682ceec62e7f419b39beb464ce6200a  guix-build-4b6a842c2801/output/x86_64-w64-mingw32/bitcoin-4b6a842c2801-win64-setup-unsigned.exe
    7f1c314c88d858976f7c0c5f0fb49540d758ef585c41b8dcd884fd5e981dd941  guix-build-4b6a842c2801/output/x86_64-w64-mingw32/bitcoin-4b6a842c2801-win64-unsigned.tar.gz
    4e7c8a0c6770b18072d7dd641cd4d1904e03728196e5c3c2a9a84a82fc27cdf1  guix-build-4b6a842c2801/output/x86_64-w64-mingw32/bitcoin-4b6a842c2801-win64.zip
    
  6. lucasbalieiro approved
  7. lucasbalieiro commented at 3:48 AM on November 19, 2024: none

    Hi, @hebasto!

    tACK Commit 4b6a842

    I have successfully run the build modifications on my machine:

    Distributor: Ubuntu
    Version: 22.04.5 LTS
    Release: 22.04
    Codename: Jammy

    The build completed without any warnings or errors. I also ran the tests both with and without Python, and the console responses were as expected. Please see the attached images for further details.

    1. Without Python
      image

    2. With Python
      image

    3. With -DBUILD_TX=OFF
      image

    For the "no Python" simulation, I commented out the following line in CMakeLists.txt:

    #find_package(Python3 3.10 COMPONENTS Interpreter)
    

    Minor Recommendations (Really minor):

    1. Verbosity for Missing Python:
      Consider adding more verbosity when Python is not found. For example, in tests.cmake:

      if(NOT TARGET Python3::Interpreter)
        message(WARNING "Python3 interpreter not found. Some tests will be disabled.")
      endif()
      

      This could help clarify the situation when Python is missing. Example output:

      image

    2. Improving Readability with Variables:
      For better readability, it might be beneficial to replace TARGET_EXISTS checks with variables. For example:

      set(PYTHON_AVAILABLE $<TARGET_EXISTS:Python3::Interpreter>)
      set(UTIL_AND_TX_AVAILABLE $<AND:$<TARGET_EXISTS:bitcoin-util>,$<TARGET_EXISTS:bitcoin-tx>>)
      

      This would enhance clarity and make the conditions easier to follow.


    This is my first PR review, and I want to ensure I'm doing it correctly. If there's anything I missed or could improve in my testing approach, feel free to let me know.
    Thanks for the contribution!

  8. BrandonOdiwuor approved
  9. BrandonOdiwuor commented at 12:28 PM on November 19, 2024: contributor

    tACK 4b6a842c28010a00e121fd36cc0b4e1fa658d249 on Ubuntu 24.04

    Was able to successfully test that util_test_runner and util_rpcauth_test are correctly disabled when Python3 interpreter is not found (screenshots below)

    Overally this is an improvement, using the Python3::Interpreter target defined directly by find_package(...) is cleaner than relying on the ${PYTHON_COMMAND} variable we define

    without Python3 Screenshot from 2024-11-19 15-24-13

    With Python3 Screenshot from 2024-11-19 15-26-39

  10. DrahtBot added the label Needs rebase on Feb 12, 2025
  11. hebasto force-pushed on Feb 12, 2025
  12. hebasto commented at 12:41 PM on February 12, 2025: member

    Rebased due to the conflict with the merged bitcoin/bitcoin#31818.

  13. DrahtBot removed the label Needs rebase on Feb 12, 2025
  14. DrahtBot added the label Needs rebase on Feb 18, 2025
  15. hebasto force-pushed on Feb 18, 2025
  16. hebasto commented at 4:10 PM on February 18, 2025: member

    Rebased due to the conflict with the merged bitcoin/bitcoin#31892.

  17. DrahtBot removed the label Needs rebase on Feb 18, 2025
  18. DrahtBot added the label Needs rebase on Apr 2, 2025
  19. hebasto force-pushed on Apr 2, 2025
  20. hebasto commented at 2:58 PM on April 2, 2025: member

    Rebased due to a conflict with the merged bitcoin/bitcoin#30997.

  21. DrahtBot removed the label Needs rebase on Apr 2, 2025
  22. in cmake/tests.cmake:10 in 0f64a9d968 outdated
      15 | +    BITCOINUTIL=set:$<$<TARGET_EXISTS:bitcoin-util>:$<TARGET_FILE:bitcoin-util>>
      16 | +    BITCOINTX=set:$<$<TARGET_EXISTS:bitcoin-tx>:$<TARGET_FILE:bitcoin-tx>>
      17 | +)
      18 | +set_tests_properties(util_test_runner PROPERTIES
      19 | +  DISABLED $<NOT:$<AND:$<TARGET_EXISTS:Python3::Interpreter>,$<TARGET_EXISTS:bitcoin-util>,$<TARGET_EXISTS:bitcoin-tx>>>
      20 | +)
    


    maflcko commented at 10:00 AM on April 3, 2025:

    I've asked this previously in #32183 (review), but the question also applies here. Especially, given that this is moving code around, which could just be deleted?

    At least locally, on current master, this is passing:

    diff --git a/cmake/tests.cmake b/cmake/tests.cmake
    index 2791329800..c1d9bb31cf 100644
    --- a/cmake/tests.cmake
    +++ b/cmake/tests.cmake
    @@ -4,7 +4,7 @@
     
     if(TARGET bitcoin-util AND TARGET bitcoin-tx AND PYTHON_COMMAND)
       add_test(NAME util_test_runner
    -    COMMAND ${CMAKE_COMMAND} -E env BITCOINUTIL=$<TARGET_FILE:bitcoin-util> BITCOINTX=$<TARGET_FILE:bitcoin-tx> ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/test_runner.py
    +    COMMAND ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/test_runner.py
       )
     endif()
     
    

    hebasto commented at 10:27 AM on April 22, 2025:

    Answered in #32183 (review).

  23. DrahtBot added the label CI failed on Apr 11, 2025
  24. DrahtBot removed the label CI failed on Apr 11, 2025
  25. hebasto force-pushed on Apr 22, 2025
  26. hebasto commented at 12:54 PM on April 22, 2025: member

    Rebased on top of #32324, which addresses #31233 (review), and drafted.

  27. hebasto marked this as a draft on Apr 22, 2025
  28. DrahtBot added the label Needs rebase on May 12, 2025
  29. fanquake commented at 4:04 PM on June 18, 2025: member

    Rebased on top of #32324,

    That PR has now been closed, in favour of #32697.

    Is this PR still an alternative to #31669.

  30. in cmake/module/Maintenance.cmake:42 in fee2ccfb67 outdated
      39 |    add_custom_target(check-security
      40 |      COMMAND ${CMAKE_COMMAND} -E echo "Checking binary security..."
      41 | -    COMMAND ${PYTHON_COMMAND} ${PROJECT_SOURCE_DIR}/contrib/devtools/security-check.py ${executables}
      42 | +    COMMAND Python3::Interpreter ${PROJECT_SOURCE_DIR}/contrib/devtools/security-check.py ${executables}
      43 |      VERBATIM
      44 |    )
    


    purpleKarrot commented at 11:27 AM on June 28, 2025:

    Maybe those two custom commands should also be turned into tests and disabled when python is not available?


    hebasto commented at 10:12 AM on July 1, 2025:

    These custom targets are meaningful and run only within the context of the Guix environment. Currently, no tests are run there.

  31. in cmake/tests.cmake:7 in 350210774e outdated
       3 | @@ -4,7 +4,7 @@
       4 |  
       5 |  if(TARGET bitcoin-util AND TARGET bitcoin-tx AND PYTHON_COMMAND)
       6 |    add_test(NAME util_test_runner
       7 | -    COMMAND ${CMAKE_COMMAND} -E env BITCOINUTIL=$<TARGET_FILE:bitcoin-util> BITCOINTX=$<TARGET_FILE:bitcoin-tx> ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/test_runner.py
    


    purpleKarrot commented at 11:51 AM on June 28, 2025:

    If the test requires environment variables to be set, setting them in the github workflow is not a good approach. How are developers expected to reproduce that locally?

    Better use the ENVIRONMENT property:

    set_property(TEST util_test_runner PROPERTY ENVIRONMENT
      BITCOINUTIL=$<TARGET_FILE:bitcoin-util>
      BITCOINTX=$<TARGET_FILE:bitcoin-tx>
    ) 
    

    hebasto commented at 10:14 AM on July 1, 2025:

    Sure. However, this is no longer relevant following the recent branch update.

  32. cmake, refactor: Switch to `Python3::Interpreter` imported target
    Imported targets are more robust than using variables.
    bb9157db5d
  33. cmake, test: Disable tests instead of ignoring them 67dc7523f3
  34. hebasto force-pushed on Jul 1, 2025
  35. hebasto marked this as ready for review on Jul 1, 2025
  36. hebasto commented at 10:43 AM on July 1, 2025: member

    Rebased and undrafted. The PR description has been updated as well.

    Friendly ping @maflcko and @purpleKarrot :)

  37. hebasto commented at 10:46 AM on July 1, 2025: member

    Is this PR still an alternative to #31669.

    It's related, but I wouldn't consider it an alternative.

  38. purpleKarrot commented at 11:02 AM on July 1, 2025: contributor

    ACK 67dc7523f3e103c8359b546d38f28c1feb2b9b34

    The issue is specific to python. I leave it up to you and other reviewers whether that should be reworded or not.

  39. DrahtBot requested review from BrandonOdiwuor on Jul 1, 2025
  40. DrahtBot requested review from lucasbalieiro on Jul 1, 2025
  41. janb84 commented at 11:52 AM on July 1, 2025: contributor

    tACK 67dc7523f3e103c8359b546d38f28c1feb2b9b34

    The PR changes the usage of the Python3_EXECUTABLE to the (indeed) more modern target-based approach of TARGET Python3::Interpreter

    test outcome:

    <details>

    no python installed:

    cmake -S . -B build output gives warning:

    CMake Warning at CMakeLists.txt:710 (message):
      Minimum required Python not found.  Rpcauth tests are disabled.
    

    ctest --test-dir build -j 8 skips / disables util_rpcauth_test (as intended):

    Start   1: util_rpcauth_test
      1/139 Test   [#1](/bitcoin-bitcoin/1/): util_rpcauth_test ....................***Not Run (Disabled)   0.00 sec
    
    137/139 Test   [#4](/bitcoin-bitcoin/4/): secp256k1_noverify_tests .............   Passed   15.44 sec
    138/139 Test [#126](/bitcoin-bitcoin/126/): coinselector_tests ...................   Passed   11.16 sec
    139/139 Test   [#5](/bitcoin-bitcoin/5/): secp256k1_tests ......................   Passed   29.23 sec
    
    100% tests passed, 0 tests failed out of 138
    
    Total Test time (real) =  29.24 sec
    
    The following tests did not run:
              1 - util_rpcauth_test (Disabled)
    

    </details>

    (small) NIT maybe include python in the pr title because the PR has morphed to more a python robustness and usability PR. But no strong feelings.

  42. DrahtBot removed the label Needs rebase on Jul 1, 2025
  43. hebasto renamed this:
    cmake: Improve robustness and usability
    cmake: Improve Python robustness and test usability
    on Jul 1, 2025
  44. hebasto commented at 11:57 AM on July 1, 2025: member

    Updated the PR title.

  45. fanquake commented at 2:27 PM on July 2, 2025: member

    Guix Build:

    cc67459424a62c706895f382cff677c1e0c0ecd7ee7f43429d64d1f5d872f151  guix-build-67dc7523f3e1/output/aarch64-linux-gnu/SHA256SUMS.part
    3c1eb6f629cc3b00d7e3803fc33383aea1f7cf6646d4de3e5c96d30923a1a795  guix-build-67dc7523f3e1/output/aarch64-linux-gnu/bitcoin-67dc7523f3e1-aarch64-linux-gnu-debug.tar.gz
    494c55c6843e0d1f8aa133ee4c7685f06f04ca4c3dcb8ccee02aa11686a64350  guix-build-67dc7523f3e1/output/aarch64-linux-gnu/bitcoin-67dc7523f3e1-aarch64-linux-gnu.tar.gz
    e12c0167012af21d9b49f2c9593f49eaf75f2f1a9dea30df9b498a75562ac00d  guix-build-67dc7523f3e1/output/arm-linux-gnueabihf/SHA256SUMS.part
    46c4a276bcb676a853e40d80e40495068333cef6389dec3b8fb324e62633c169  guix-build-67dc7523f3e1/output/arm-linux-gnueabihf/bitcoin-67dc7523f3e1-arm-linux-gnueabihf-debug.tar.gz
    31a3fd642a393b91030e2a6ff329091eb9cb8698a954fec335ea8a955bcb4968  guix-build-67dc7523f3e1/output/arm-linux-gnueabihf/bitcoin-67dc7523f3e1-arm-linux-gnueabihf.tar.gz
    18c2aec9b8ef2de41e517850782ce6fff47c9a27a208cfa233f957899330d825  guix-build-67dc7523f3e1/output/arm64-apple-darwin/SHA256SUMS.part
    93cf0d273ababea20ff1891e5523c34aa49db99fafa700c36d1384f3014b1aa7  guix-build-67dc7523f3e1/output/arm64-apple-darwin/bitcoin-67dc7523f3e1-arm64-apple-darwin-codesigning.tar.gz
    a96ce467e74222633f9d2dc1ce03f7a71f56545fe9618fc5ccfb26fdbe6bfc0c  guix-build-67dc7523f3e1/output/arm64-apple-darwin/bitcoin-67dc7523f3e1-arm64-apple-darwin-unsigned.tar.gz
    6bafa4ceee017a00235aeb1af5e470900d0a657d7f16d85f2d65bf84e55099db  guix-build-67dc7523f3e1/output/arm64-apple-darwin/bitcoin-67dc7523f3e1-arm64-apple-darwin-unsigned.zip
    c974c8f7989adbf894b833e32d4441cca8b0edaa317ce851b6f511fe37377b3f  guix-build-67dc7523f3e1/output/dist-archive/bitcoin-67dc7523f3e1.tar.gz
    87dc02ed9c5b2a3e139afcc73b192dc21c1f9f275f65265c0158e01690aece43  guix-build-67dc7523f3e1/output/powerpc64-linux-gnu/SHA256SUMS.part
    88565d48b79941d1932783466620947c042a4f74449b607494a99c4306b1ddd0  guix-build-67dc7523f3e1/output/powerpc64-linux-gnu/bitcoin-67dc7523f3e1-powerpc64-linux-gnu-debug.tar.gz
    d04dffc416cd3cb617086a0c48361ccc2407d1d92520c836362fa9a051d0f779  guix-build-67dc7523f3e1/output/powerpc64-linux-gnu/bitcoin-67dc7523f3e1-powerpc64-linux-gnu.tar.gz
    89f171e0cb62956a53dfa09d0a30de600d1982455358348c4626a8ef5d09951a  guix-build-67dc7523f3e1/output/riscv64-linux-gnu/SHA256SUMS.part
    f281e4e30db28d38c19b60e4e4e6331c9efaabebe9deb5400042359c1d24bc7d  guix-build-67dc7523f3e1/output/riscv64-linux-gnu/bitcoin-67dc7523f3e1-riscv64-linux-gnu-debug.tar.gz
    8e01bfff50f5b5e3c3149171d9a29c971dfeb29ce4462aaa64e8c3020e8162ae  guix-build-67dc7523f3e1/output/riscv64-linux-gnu/bitcoin-67dc7523f3e1-riscv64-linux-gnu.tar.gz
    751f807f7b5836d09a9533b4da5d1ae5e51d4aeba044ed617a2ac5a8bbb76f31  guix-build-67dc7523f3e1/output/x86_64-apple-darwin/SHA256SUMS.part
    300b8bce42ed4b3ff7306ffba671c1ebf753d6bfb0a3dcca3c9c78162ab84d87  guix-build-67dc7523f3e1/output/x86_64-apple-darwin/bitcoin-67dc7523f3e1-x86_64-apple-darwin-codesigning.tar.gz
    eff432177d074dfb45042cb04a9e2eb73f7b7ae556c61ab3ce86cbe90125435c  guix-build-67dc7523f3e1/output/x86_64-apple-darwin/bitcoin-67dc7523f3e1-x86_64-apple-darwin-unsigned.tar.gz
    5c792873cffc31b6f0b43b7a010e166748f77fca2a0bc5c8060d7d858dbbad19  guix-build-67dc7523f3e1/output/x86_64-apple-darwin/bitcoin-67dc7523f3e1-x86_64-apple-darwin-unsigned.zip
    e791bc57cb6a8d64085309eb9a11505e547140129e771666ee25e2fc5010f3b4  guix-build-67dc7523f3e1/output/x86_64-linux-gnu/SHA256SUMS.part
    f2ca0521a9a241cce0d150999015f7379c42c80466bc50186eba0afca49fa280  guix-build-67dc7523f3e1/output/x86_64-linux-gnu/bitcoin-67dc7523f3e1-x86_64-linux-gnu-debug.tar.gz
    d5130d4215cd48a3a30c2ad65868edbdb715cc6526a9fe2cebca92da2a129660  guix-build-67dc7523f3e1/output/x86_64-linux-gnu/bitcoin-67dc7523f3e1-x86_64-linux-gnu.tar.gz
    79270f33123495325ea59b67f8ada022a593bce8402ce41cef7b99c219c405a6  guix-build-67dc7523f3e1/output/x86_64-w64-mingw32/SHA256SUMS.part
    efd18ffb494c2eb32f4deaf326d76fbee88d3f5d77f84939d3e48e3a67f41970  guix-build-67dc7523f3e1/output/x86_64-w64-mingw32/bitcoin-67dc7523f3e1-win64-codesigning.tar.gz
    a4523b2b33c552ac9104664ecb4a503f39eeef55bcbd3d2933e317ea2de8cb40  guix-build-67dc7523f3e1/output/x86_64-w64-mingw32/bitcoin-67dc7523f3e1-win64-debug.zip
    4ddd9f94695e6f5590fa3f36a402e586b079facdf4ace7fd6b0ef9b3c1200a8d  guix-build-67dc7523f3e1/output/x86_64-w64-mingw32/bitcoin-67dc7523f3e1-win64-setup-unsigned.exe
    3431db0566364e7074d0b0982ba998ba2dd8d008de27f334bc6ae891a1d1fc15  guix-build-67dc7523f3e1/output/x86_64-w64-mingw32/bitcoin-67dc7523f3e1-win64-unsigned.zip
    
  46. hebasto commented at 4:13 PM on July 2, 2025: member

    My Guix build:

    aarch64
    cc67459424a62c706895f382cff677c1e0c0ecd7ee7f43429d64d1f5d872f151  guix-build-67dc7523f3e1/output/aarch64-linux-gnu/SHA256SUMS.part
    3c1eb6f629cc3b00d7e3803fc33383aea1f7cf6646d4de3e5c96d30923a1a795  guix-build-67dc7523f3e1/output/aarch64-linux-gnu/bitcoin-67dc7523f3e1-aarch64-linux-gnu-debug.tar.gz
    494c55c6843e0d1f8aa133ee4c7685f06f04ca4c3dcb8ccee02aa11686a64350  guix-build-67dc7523f3e1/output/aarch64-linux-gnu/bitcoin-67dc7523f3e1-aarch64-linux-gnu.tar.gz
    e12c0167012af21d9b49f2c9593f49eaf75f2f1a9dea30df9b498a75562ac00d  guix-build-67dc7523f3e1/output/arm-linux-gnueabihf/SHA256SUMS.part
    46c4a276bcb676a853e40d80e40495068333cef6389dec3b8fb324e62633c169  guix-build-67dc7523f3e1/output/arm-linux-gnueabihf/bitcoin-67dc7523f3e1-arm-linux-gnueabihf-debug.tar.gz
    31a3fd642a393b91030e2a6ff329091eb9cb8698a954fec335ea8a955bcb4968  guix-build-67dc7523f3e1/output/arm-linux-gnueabihf/bitcoin-67dc7523f3e1-arm-linux-gnueabihf.tar.gz
    18c2aec9b8ef2de41e517850782ce6fff47c9a27a208cfa233f957899330d825  guix-build-67dc7523f3e1/output/arm64-apple-darwin/SHA256SUMS.part
    93cf0d273ababea20ff1891e5523c34aa49db99fafa700c36d1384f3014b1aa7  guix-build-67dc7523f3e1/output/arm64-apple-darwin/bitcoin-67dc7523f3e1-arm64-apple-darwin-codesigning.tar.gz
    a96ce467e74222633f9d2dc1ce03f7a71f56545fe9618fc5ccfb26fdbe6bfc0c  guix-build-67dc7523f3e1/output/arm64-apple-darwin/bitcoin-67dc7523f3e1-arm64-apple-darwin-unsigned.tar.gz
    6bafa4ceee017a00235aeb1af5e470900d0a657d7f16d85f2d65bf84e55099db  guix-build-67dc7523f3e1/output/arm64-apple-darwin/bitcoin-67dc7523f3e1-arm64-apple-darwin-unsigned.zip
    c974c8f7989adbf894b833e32d4441cca8b0edaa317ce851b6f511fe37377b3f  guix-build-67dc7523f3e1/output/dist-archive/bitcoin-67dc7523f3e1.tar.gz
    87dc02ed9c5b2a3e139afcc73b192dc21c1f9f275f65265c0158e01690aece43  guix-build-67dc7523f3e1/output/powerpc64-linux-gnu/SHA256SUMS.part
    88565d48b79941d1932783466620947c042a4f74449b607494a99c4306b1ddd0  guix-build-67dc7523f3e1/output/powerpc64-linux-gnu/bitcoin-67dc7523f3e1-powerpc64-linux-gnu-debug.tar.gz
    d04dffc416cd3cb617086a0c48361ccc2407d1d92520c836362fa9a051d0f779  guix-build-67dc7523f3e1/output/powerpc64-linux-gnu/bitcoin-67dc7523f3e1-powerpc64-linux-gnu.tar.gz
    89f171e0cb62956a53dfa09d0a30de600d1982455358348c4626a8ef5d09951a  guix-build-67dc7523f3e1/output/riscv64-linux-gnu/SHA256SUMS.part
    f281e4e30db28d38c19b60e4e4e6331c9efaabebe9deb5400042359c1d24bc7d  guix-build-67dc7523f3e1/output/riscv64-linux-gnu/bitcoin-67dc7523f3e1-riscv64-linux-gnu-debug.tar.gz
    8e01bfff50f5b5e3c3149171d9a29c971dfeb29ce4462aaa64e8c3020e8162ae  guix-build-67dc7523f3e1/output/riscv64-linux-gnu/bitcoin-67dc7523f3e1-riscv64-linux-gnu.tar.gz
    751f807f7b5836d09a9533b4da5d1ae5e51d4aeba044ed617a2ac5a8bbb76f31  guix-build-67dc7523f3e1/output/x86_64-apple-darwin/SHA256SUMS.part
    300b8bce42ed4b3ff7306ffba671c1ebf753d6bfb0a3dcca3c9c78162ab84d87  guix-build-67dc7523f3e1/output/x86_64-apple-darwin/bitcoin-67dc7523f3e1-x86_64-apple-darwin-codesigning.tar.gz
    eff432177d074dfb45042cb04a9e2eb73f7b7ae556c61ab3ce86cbe90125435c  guix-build-67dc7523f3e1/output/x86_64-apple-darwin/bitcoin-67dc7523f3e1-x86_64-apple-darwin-unsigned.tar.gz
    5c792873cffc31b6f0b43b7a010e166748f77fca2a0bc5c8060d7d858dbbad19  guix-build-67dc7523f3e1/output/x86_64-apple-darwin/bitcoin-67dc7523f3e1-x86_64-apple-darwin-unsigned.zip
    e791bc57cb6a8d64085309eb9a11505e547140129e771666ee25e2fc5010f3b4  guix-build-67dc7523f3e1/output/x86_64-linux-gnu/SHA256SUMS.part
    f2ca0521a9a241cce0d150999015f7379c42c80466bc50186eba0afca49fa280  guix-build-67dc7523f3e1/output/x86_64-linux-gnu/bitcoin-67dc7523f3e1-x86_64-linux-gnu-debug.tar.gz
    d5130d4215cd48a3a30c2ad65868edbdb715cc6526a9fe2cebca92da2a129660  guix-build-67dc7523f3e1/output/x86_64-linux-gnu/bitcoin-67dc7523f3e1-x86_64-linux-gnu.tar.gz
    79270f33123495325ea59b67f8ada022a593bce8402ce41cef7b99c219c405a6  guix-build-67dc7523f3e1/output/x86_64-w64-mingw32/SHA256SUMS.part
    efd18ffb494c2eb32f4deaf326d76fbee88d3f5d77f84939d3e48e3a67f41970  guix-build-67dc7523f3e1/output/x86_64-w64-mingw32/bitcoin-67dc7523f3e1-win64-codesigning.tar.gz
    a4523b2b33c552ac9104664ecb4a503f39eeef55bcbd3d2933e317ea2de8cb40  guix-build-67dc7523f3e1/output/x86_64-w64-mingw32/bitcoin-67dc7523f3e1-win64-debug.zip
    4ddd9f94695e6f5590fa3f36a402e586b079facdf4ace7fd6b0ef9b3c1200a8d  guix-build-67dc7523f3e1/output/x86_64-w64-mingw32/bitcoin-67dc7523f3e1-win64-setup-unsigned.exe
    3431db0566364e7074d0b0982ba998ba2dd8d008de27f334bc6ae891a1d1fc15  guix-build-67dc7523f3e1/output/x86_64-w64-mingw32/bitcoin-67dc7523f3e1-win64-unsigned.zip
    
  47. fanquake merged this on Jul 3, 2025
  48. fanquake closed this on Jul 3, 2025

  49. hebasto deleted the branch on Jul 3, 2025
  50. in cmake/tests.cmake:10 in 67dc7523f3
      10 | +add_test(NAME util_rpcauth_test
      11 | +  COMMAND Python3::Interpreter ${PROJECT_BINARY_DIR}/test/util/rpcauth-test.py
      12 | +)
      13 | +set_tests_properties(util_rpcauth_test PROPERTIES
      14 | +  DISABLED $<NOT:$<TARGET_EXISTS:Python3::Interpreter>>
      15 | +)
    


    maflcko commented at 10:23 AM on July 3, 2025:

    i guess unrelated to the changes here, but i still don't think this is the correct fix. it seems odd to special-case a single python test and silently disable it when cmake fails to detect python (in the ci or otherwise). This is brittle, inconsistent and just adds maintenance overhead.

    the correct fix would be to just remove the cmake stuff here and move this test to the python test runner, so that it is run like all other python unit/util/functional tests.


    fanquake commented at 10:25 AM on July 3, 2025:

    Yes I agree.


    hebasto commented at 10:29 AM on July 3, 2025:

    ... and silently disable it...

    ctest reports about disabled tests.


    maflcko commented at 10:41 AM on July 3, 2025:

    ... and silently disable it...

    ctest reports about disabled tests.

    I know. The warning is unchanged by this pull request. However, this doesn't help in the context of CI, see https://github.com/bitcoin/bitcoin/issues/31476


    maflcko commented at 9:10 AM on July 4, 2025:

    (Actually, while testing, a missing python is now a hard error already when -DBUILD_GUI=ON. So I don't think the wording "refactor" accurately represents the changes here.)


    maflcko commented at 3:41 PM on July 5, 2025:

    the correct fix would be to just remove the cmake stuff here and move this test to the python test runner, so that it is run like all other python unit/util/functional tests.

    Fixed in #32881

    (Actually, while testing, a missing python is now a hard error already when -DBUILD_GUI=ON. So I don't think the wording "refactor" accurately represents the changes here.)

    To clarify, either the changes here in this pull need to be reverted/fixed up, or the docs should be updated to clarify that python is now required to build the gui.


    maflcko commented at 2:40 PM on August 6, 2025:

    (Actually, while testing, a missing python is now a hard error already when -DBUILD_GUI=ON. So I don't think the wording "refactor" accurately represents the changes here.)

    To clarify, either the changes here in this pull need to be reverted/fixed up, or the docs should be updated to clarify that python is now required to build the gui.

    This bug still exists. rm -rf ./bld-cmake && cmake -B ./bld-cmake -DBUILD_GUI=ON now fails with:

    CMake Error at src/qt/CMakeLists.txt:348 (add_custom_target):
      Error evaluating generator expression:
    
        $<TARGET_FILE:Python3::Interpreter>
    
      No target "Python3::Interpreter"
    
    

    So it would be good to revert this pull, or adjust the docs:

    diff --git a/doc/dependencies.md b/doc/dependencies.md
    index bc8cc7fb20..39dcd265d4 100644
    --- a/doc/dependencies.md
    +++ b/doc/dependencies.md
    @@ -35,7 +35,7 @@ Bitcoin Core requires one of the following compilers.
     
     | Dependency | Releases | Minimum required |
     | --- | --- | --- |
    -| Python (scripts, tests) | [link](https://www.python.org) | [3.10](https://github.com/bitcoin/bitcoin/pull/30527) |
    +| Python (gui, scripts, tests) | [link](https://www.python.org) | [3.10](https://github.com/bitcoin/bitcoin/pull/30527) |
     | [Qt](../depends/packages/qt.mk) (gui) | [link](https://download.qt.io/archive/qt/) | [6.2](https://github.com/bitcoin/bitcoin/pull/30997) |
     | [qrencode](../depends/packages/qrencode.mk) (gui) | [link](https://fukuchi.org/works/qrencode/) | N/A |
     | [SQLite](../depends/packages/sqlite.mk) (wallet) | [link](https://sqlite.org) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) |
    
    

    fanquake commented at 3:31 PM on August 6, 2025:

    Opened #33146


    hebasto commented at 12:55 PM on August 8, 2025:

    Apologies for the delay in responding to the comments. I've submitted a fix in #33156.

  51. stringintech referenced this in commit f19e7819e9 on Jul 19, 2025
  52. alexanderwiederin referenced this in commit 9997c3d993 on Jul 25, 2025
  53. alexanderwiederin referenced this in commit 8d6ebb9c4e on Jul 28, 2025
  54. alexanderwiederin referenced this in commit 533a4585b5 on Jul 28, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 18:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me