Skip to content

Commit

Permalink
Change some python to python3
Browse files Browse the repository at this point in the history
- bazel 0.27 will default to python3 in this context
- I removed the "hackish" print statement, it does not crash. I assume
  the issue is fixed.
- list > int is not valid in python3 (it was always True in python 2)
  • Loading branch information
guibou committed Jun 25, 2019
1 parent 62d01a1 commit e04016f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 1 addition & 3 deletions debug/linking_utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ def contains_error(error):
return f
# output should have some runpaths
assert \
ldd(identity, sys.argv[1])['runpath_dirs']\
> 0
assert len(ldd(identity, sys.argv[1])['runpath_dirs']) > 0
# some of the dependencies are implicit and not in NEEDED flags
assert ldd(contains_error(LDD_UNKNOWN), sys.argv[1])
Expand Down
5 changes: 0 additions & 5 deletions tests/cc_haskell_import/python_add_one.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,5 @@

foreignlib = ctypes.cdll.LoadLibrary(path)

# ATTN: If you remove this print *statement* hs_init will segfault!
# If you use the python3 print *function*, it will segfault as well!
# TODO: wtf?
print foreignlib

foreignlib.hs_init()
assert(str(foreignlib.add_one_hs(1)) == "2")

0 comments on commit e04016f

Please sign in to comment.