Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: remove hacky auto-reshim and use official one #9444

Open
2 tasks
humitos opened this issue Jul 21, 2022 · 0 comments
Open
2 tasks

Build: remove hacky auto-reshim and use official one #9444

humitos opened this issue Jul 21, 2022 · 0 comments
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code

Comments

@humitos
Copy link
Member

humitos commented Jul 21, 2022

(context for this issue #9150 (comment))

The PR that auto-reshims asdf Python when calling pip commands got merged, asdf-community/asdf-python#136. Now, we are able to remove our own code for this and rely on asdf-python plugin to do this in a smarter way than ourselves.

To do this, it's required:

  • update the asdf version of our Docker images (https://github.com/rtfd/readthedocs-docker-images/blob/788fd20be1619f25eebce40f7103c02bc016fcd0/Dockerfile#L115)
  • remove the hacky code from our builder (
    # Execute ``asdf reshim python`` if the user is installing a
    # package since the package may contain an executable
    # See https://github.com/readthedocs/readthedocs.org/pull/9150#discussion_r882849790
    for reshim_command in reshim_commands:
    # Convert tuple/list into set to check reshim command is a
    # subset of the command itself. This is to find ``pip install``
    # but also ``pip -v install`` and ``python -m pip install``
    if reshim_command.issubset(command.split()):
    environment.run(
    *["asdf", "reshim", "python"],
    escape_command=False,
    cwd=cwd,
    record=False,
    )
    )
@humitos humitos added Improvement Minor improvement to code Accepted Accepted issue on our roadmap labels Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

1 participant