Tests: Use portable #! in python scripts (/usr/bin/env) #8270

pull ChoHag wants to merge 2 commits into bitcoin:master from ChoHag:master changing 10 files +10 −10
  1. ChoHag commented at 1:55 PM on June 26, 2016: contributor

    These changes should also be backported to the stable releases so that they build and test on systems which don't install python to /usr

    It also changes python scripts which are not related to tests because it was easier not to have grep discriminate.

  2. Use portable #! in python scripts (/usr/bin/env) 873e81f89b
  3. in contrib/devtools/security-check.py:None in 873e81f89b outdated
       0 | @@ -1,4 +1,4 @@
       1 | -#!/usr/bin/python2
       2 | +#!/usr/bin/env python2
    


    MarcoFalke commented at 2:07 PM on June 26, 2016:

    Couldn't this say #!/usr/bin/env python, since #7723?


    laanwj commented at 10:14 AM on June 27, 2016:

    Yes, security-check works with python 3 too. The build system calls all these scripts by passing them to the python interpreter, so it doesn't care what is on the first line.


    ChoHag commented at 6:29 AM on June 28, 2016:

    I made no attempt to check for portability of the python scripts between python releases, just a straight s/// on all *.py files


    MarcoFalke commented at 7:00 AM on June 28, 2016:

    Can you remove the trailing 2's according to the pull request I linked above?


    ChoHag commented at 10:00 AM on June 28, 2016:

    There are 5 files using python2, only security-check.py and symbol-check.py (notably not test-security-check.py) have been changed in #7723. Accordingly I've changed only the same two files.

    contrib/devtools/security-check.py:#!/usr/bin/env python2 contrib/devtools/symbol-check.py:#!/usr/bin/env python2 contrib/devtools/test-security-check.py:#!/usr/bin/env python2 contrib/zmq/zmq_sub.py:#!/usr/bin/env python2 share/rpcuser/rpcuser.py:#!/usr/bin/env python2

    I'm happy to abandon this PR in favour of incorporating the changes directly in #7723 if it simplifies things.

  4. MarcoFalke added the label Build system on Jun 26, 2016
  5. MarcoFalke added the label Tests on Jun 26, 2016
  6. MarcoFalke added the label Dev Scripts on Jun 26, 2016
  7. Favour python over python2 as per PR #7723 7b01ce254c
  8. in contrib/devtools/security-check.py:None in 7b01ce254c
       0 | @@ -1,4 +1,4 @@
       1 | -#!/usr/bin/python2
    


    petertodd commented at 6:18 PM on July 5, 2016:

    Did we actually test that this works on python3?


    fanquake commented at 10:11 AM on July 6, 2016:
  9. petertodd commented at 5:00 PM on July 6, 2016: contributor

    utACK 7b01ce254cfa0e8ae7e57a72c57e8ae89f3c1829

  10. fanquake commented at 3:33 AM on August 8, 2016: member

    utACK 7b01ce2

  11. MarcoFalke commented at 7:07 AM on August 8, 2016: member

    utACK 7b01ce2

  12. MarcoFalke merged this on Aug 15, 2016
  13. MarcoFalke closed this on Aug 15, 2016

  14. MarcoFalke referenced this in commit 6e5e5abba6 on Aug 15, 2016
  15. codablock referenced this in commit b4feccfa59 on Sep 19, 2017
  16. codablock referenced this in commit 542507a32b on Dec 29, 2017
  17. codablock referenced this in commit bc659c3e6e on Jan 8, 2018
  18. zkbot referenced this in commit fdd40d5b9c on Jun 5, 2018
  19. zkbot referenced this in commit 006089029e on Jun 7, 2018
  20. zkbot referenced this in commit 22a64ba990 on Jun 7, 2018
  21. zkbot referenced this in commit 7ace9f962c on Jun 18, 2018
  22. zkbot referenced this in commit 4e3ff06507 on Jun 19, 2018
  23. andvgal referenced this in commit 7016e131ac on Jan 6, 2019
  24. MarcoFalke locked this on Sep 8, 2021

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-04-22 03:15 UTC

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