python / python/pymanager

Feature Suggestion: Support Direct Installation from ZIP Package or Directory

Đang mở
#165 2 bình luận 2 reaction 1 người được giao Xem trên GitHub

@zooba đang làm issue này rồi.

Từ ngày 15/9/2025.

enhancement help wanted
Ngôn ngữ chính
Python
Star
344
Fork
74
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
7

Mô tả

Background

Currently, for offline installation of a Python version using pymanager, the recommended workflow is as follows:

  1. Use the --download option to download the ZIP package into a directory.
  2. Generate an index.json file in that directory.
  3. When installing, use the --source option to specify the corresponding index.json.

While this method works, it introduces unnecessary steps, especially since the ZIP package or directory often contains all the information needed for installation.

Proposed Improvement

Why can't we install a Python version directly from a ZIP package or directory, without requiring an index.json?

For modern Python packages generated from PC/layout (with the --include-install-json parameter enabled) they already have __install__.json, and the resulting ZIP or directory already includes everything necessary for installation. In these cases, pymanager should be able to install directly from the package or directory.

Use Case

For example, when I compiled a CPython version by myself and packaged it using PC/layout, the output result would either be a directory or a ZIP file package. To install using pymanager, I had to manually create an index.json file, which was neither convenient nor beneficial for users.

Another typical scenario is when I use the --download command to fetch a Python package ZIP file on a device with internet access, and then copy that ZIP file to a target device that cannot connect to the internet.

On the target device, the local directory only contains this specific ZIP file package. Even if there are multiple packages, they are all stored in a unified naming format of pythoncore-3.xx-(32|64)-3.xx.xx. In this case, the user does not care about the different Python versions in the directory, and does not need to use index.json for indexing or matching version tag from command-line parameters. The intention is clear: I only want to install the contents of this ZIP file package

Requiring the use of index.json in such a case introduces unnecessary complexity and steps for a straightforward, single-package installation. Supporting direct installation from the ZIP package would greatly improve the user experience, especially for offline and isolated environments.

Suggestion

Please consider supporting direct installation from a ZIP package or directory, especially when it already contains all required installation files (including __install__.json). This will simplify the workflow for offline installations and make it easier for users compiling their own Python builds.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.