Skip to content

wip: use pypa/installer to install wheels#7031

Closed
abn wants to merge 1 commit intopython-poetry:masterfrom
abn:wheel-use-installer
Closed

wip: use pypa/installer to install wheels#7031
abn wants to merge 1 commit intopython-poetry:masterfrom
abn:wheel-use-installer

Conversation

@abn
Copy link
Copy Markdown
Member

@abn abn commented Nov 15, 2022

An initial step towards dropping pip to install packages. Once there is a more performant iteration of #5650 we should be able to replace PipInstaller with a NativeInstaller that uses a combination of build (to build wheels from source), EditableBuilder to install editable sources and installer to install wheels. The editable installs should already be doable.

In the interim, this is an experimentation for early feedback on using installer to install already available wheels. The initial results are quite promising. On my development environment, once the cache is populated, the following times were recorded for 10 iterations for the following command and pyproject.toml.

time for i in {1..10}; do rm -rf .venv/; poetry install; done
pyproject.toml

[tool.poetry]
name = "foobar"
version = "0.1.0"
description = ""
authors = ["Some One <some.one@somewhere.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
aiohttp = "^3.8.3"
poetry-core = "^1.3.2"
tomlkit = "^0.11.6"
httpx = "^0.23.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

Without patch

real    0m37.136s
user    2m37.909s
sys     0m13.516s

With patch

real    0m11.295s
user    0m10.434s
sys     0m2.567s

If enabling this we should allow for experimental as there could be edge cases around how platform wheels will be installed.

@abn
Copy link
Copy Markdown
Member Author

abn commented Nov 15, 2022

@neersighted think we briefly talked about this one a while ago.

@abn abn force-pushed the wheel-use-installer branch from cd489a1 to a942e62 Compare November 15, 2022 00:50
@abn abn force-pushed the wheel-use-installer branch from a942e62 to 01b6b9e Compare November 15, 2022 00:53
@abn
Copy link
Copy Markdown
Member Author

abn commented Nov 15, 2022

Missed the changes added in #6205.

@sdispater you still actively working on that one?

@abn
Copy link
Copy Markdown
Member Author

abn commented Nov 15, 2022

I am going to drop this one in favour of #6205 as that is more comprehensive.

@abn abn closed this Nov 15, 2022
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant