Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Document meson-pythons requirements for the "install_dir" option of e.g. configure_file

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

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
48/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu bằng cách tìm tài liệu về các đường dẫn cài đặt Python, get_install_dir và tùy chọn install_dir của configure_file. Ghi lại rằng meson-python yêu cầu truyền thư mục con thông qua get_install_dir(subdir: ...) thay vì nối thư mục đó vào kết quả của nó, đồng thời bao gồm ví dụ được hiển thị và hành vi lỗi của wheel-mapping.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

documentation

This issue is somewhat similar to https://github.com/mesonbuild/meson-python/issues/233, but different.

I had the following problem: I tried to configure an __init__.py file and install it into a subdirectory of the python install_dir using the pymod.get_install_dir function:

pymod = import('python').find_installation(pure: false)
configure_file(input : '__init__.py',
                output : '__init__.py',
                configuration : conf_data,
                install_dir : pymod.get_install_dir() + 'some_subdirectory/', 
                )

This works with meson, but from meson-python I get an error: "Could not map installation path to an equivalent wheel directory: ...". The problem seems to be the "+ 'some_subdirectory/'" because the solution is to put the subdirectory name INTO the get_install_dir command using the subdir keyword_argument:

pymod = import('python').find_installation(pure: false)
configure_file(input : '__init__.py',
                output : '__init__.py',
                configuration : conf_data,
                install_dir : pymod.get_install_dir(subdir: 'some_subdirectory'), 
                )

I think this behavior should be documented.
If you tell me where to add this, I can create a pull request.

Ngôn ngữ chính
Python
Star
180
Fork
93
Merge trung bình
20 giờ 58 phút
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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.

Issue khác của mesonbuild/meson-python

Tất cả issue của mesonbuild/meson-python

Issue tương tự

Thêm issue về Python

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.