UX for constraining build-time and runtime dependencies
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- numpy, python
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu bằng việc xem xét cấu hình pyproject.toml được đề xuất và hỗ trợ mesonpy được mô tả trong issue. Theo dõi cách các dependency khi build, runtime_pinnings và các thay đổi dependency trên nhánh release sẽ tương tác với nhau; báo cáo không nêu tên file nguồn hay test nào. Hoàn thành nghĩa là xác định và triển khai hành vi pinning cho NumPy, các phiên bản chỉ có bugfix và các dependency runtime chính xác, cùng với coverage cho các bản build release.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
There is a practical UX problem with pyproject.toml that we need to solve. A short description would be:
- Any project that builds against the
numpyC API has to deal with API and ABI compatibility (see the numpy docs on that for details). - as a consequence, the dependency specification for local development is different from the one needed for uploading an sdist to PyPI:
- for local development, you want loose dependencies, e.g.
numpy >= 1.19.5(both a build and runtime dep) - in sdist released to PyPI you want:
oldest-supported-numpy(build dep metapackage, contains==pins per platform) andnumpy>='buildtime_dep,<1.25.0' # should beN+3whereN is current minor version.
- for local development, you want loose dependencies, e.g.
That is obviously a complex set of dependencies to express in pyproject.toml, and we can't have two sets in there at the same time. The solution @FFY00 and I just discussed is:
- On the
mainbranch, use the loose development dependencies (numpy>=1.19.5) - In the CI job(s) that produce artifacts for release to PyPI, ensure that the lowest supported dependencies (which may be platform-dependent) are installed.
- In the release branch, replace the dependencies with the build-time deps needed for uploading to PyPI.
- Have support in
mesonpyfor the various kinds of pinnings people need for releases and API/ABI compatibility.
A rough sketch of how (4) could look:
[build-system]
requires = [
"numpy >= 1.19.5", # replace with (e.g.) `oldest-supported-numpy` in a release branch
]
[tool.mesonpy]
runtime_pinnings = [
# if build version detected is 1.20.3, replace with `>=1.20.3` (while preserving the upper bound,
# so end result would be for example `'>=1.20.3,<1.25.0')
"numpy = 'pin_compatible'",
"pythran = 'bugfix_only'", # if build version detected is 0.10.0, override the build dependency with `'>=0.10.0,<0.11.0'`
"torch = 'exact'", # runtime version must equal build-time version (PyTorch has no ABI stability guarantees)
]
Note that this feature is needed for some other packages than just NumPy too (basically every package offering a C/C++ API has to deal with this), but NumPy alone is important enough - every package containing even a single Cython extension which uses NumPy has to deal with this. However, it's probably still a bit too specific to want native support in pyproject.toml via a standard that all tools must implement. Hence the choice to put this in mesonpy.
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mesonbuild/meson-python
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
mesonbuild/meson-python#541 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
mesonbuild/meson-python#473 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation enhancement tests
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
mesonbuild/meson-python#903 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
mesonbuild/meson-python#871 · 7 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pip install overrides existing build configurationCó thể đã có người làm @Alvaro-Kothe đã nhận 113 ngày trước. Đang mởquestion
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
mesonbuild/meson-python#851 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của mesonbuild/meson-python
Issue tương tự
-
defect from-review v0.9.2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
khuisman/mcp-gee-sweet#926 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 84/100
EtanHey/brainlayer#1164 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug security
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
yunaremaia/vibeguard#141 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
PrismorSec/prismor#599 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
iii-hq/iii#2278 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày