Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

relocate-once.py is not compatible with Python 3 #16

@jhpalmieri

Description

@jhpalmieri

On systems where /usr/bin/env python runs Python 3, relocate-once.py breaks. The immediate fix is error checking when running relocate-once.py (see https://trac.sagemath.org/ticket/25668), but longer term, the script should be made compatible with Python 3.

There are two types of incompatibility:

  1. the line starting p('local/lib/libflint-13.5.2.dylib').patch(1552, 1684)... is very long, and more to the point (I think) has over 1500 method/attribute calls. In any case, that line yields

RecursionError: maximum recursion depth exceeded during compilation

  1. After removing that line, we get:
Traceback (most recent call last):
  File "/Users/jpalmier/Downloads/SageMath/relocate-once.py", line 145, in <module>
    p('build/make/Makefile-auto').substitute().save()
  File "/Users/jpalmier/Downloads/SageMath/relocate-once.py", line 133, in __call__
    filename = os.path.join(self.root_path, filename)
  File "/anaconda3/lib/python3.6/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/anaconda3/lib/python3.6/genericpath.py", line 151, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions