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

Fix extracting packages from the wheel list/index #619

Merged
merged 1 commit into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions builder/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from builder.apk import install_apks
from builder.infra import (
create_wheels_list,
extract_packages_from_index,
check_available_binary,
create_wheels_folder,
Expand Down Expand Up @@ -111,8 +112,8 @@ def builder(

wheels_dir = create_wheels_folder(output)
wheels_index = create_wheels_index(index)

package_index = extract_packages_from_index(wheels_index)
wheels_list = create_wheels_list(index)
package_index = extract_packages_from_index(wheels_list)

# Setup build helper
if apk:
Expand Down
7 changes: 6 additions & 1 deletion builder/infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,15 @@ def create_wheels_folder(base_folder: Path) -> Path:


def create_wheels_index(base_index: str) -> str:
"""Create wheels specific URL."""
"""Create wheels specific URL with a PEP 503 index."""
return f"{base_index}/{_MUSLLINUX}-index/"


def create_wheels_list(base_index: str) -> str:
"""Create wheels specific URL that has a list of all wheel files."""
return f"{base_index}/{_MUSLLINUX}/"


def create_package_map(packages: List[str]) -> Dict[str, AwesomeVersion]:
"""Create a dictionary from package base name to package and version string."""
results = {}
Expand Down