Library recipes: a recipe for libpq, so psycopg2 can be built (design first)
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
- 15/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, python
- Lĩnh vực
- build-system, databases
Hướng nghiên cứu
This is design work, not a first patch: read the README's "Library recipes" and "Adding a recipe" sections, then the NEEDS mapping in scripts/library_recipes.py that skips psycopg2 for lack of a libpq recipe. Post a design in the issue covering whether to ship at all, licences (LGPL-3.0 psycopg2, PostgreSQL, OpenSSL), static libpq build, PATH for pg_config, and the import check. Done when a maintainer agrees to the design or closes the issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
psycopg2 is one of the best-known source builds in Python: pip install psycopg2 on a new Python fails with Error: pg_config executable not found. unless PostgreSQL's development files are installed. For Linux and macOS the project publishes wheels only under another name (psycopg2-binary); psycopg2 itself has Windows wheels and nothing else. So every lockfile that pins psycopg2 has this gap on every Linux target, on every Python: the tracker's scan of 2026-11-20 has psycopg2 2.9.13 as source on 3.15 linux-x86_64.
The pipeline can't build it: NEEDS in scripts/library_recipes.py lists "psycopg2": "libpq", so the plan skips it with "needs libpq, and there is no library recipe for this target". PyYAML has the only recipe so far (libyaml, #33).
libpq is a much bigger step than libyaml, and a wrong choice here ships in a database driver. Please post a design in this issue before writing code. Read the README's "Library recipes" and "Adding a recipe" sections first: the bar there applies in full.
What the design should settle
- Should we do this at all? psycopg2's maintainers ship
psycopg2-binaryand say in their docs that it is meant for development and that production should buildpsycopg2from source against the system's libpq. A gap wheel ofpsycopg2is a third thing: thepsycopg2name with a bundled libpq. Read their install docs, link them, and say what the page would have to tell users. If the honest answer is "don't", say so; that is a useful outcome. - Licences. psycopg2 is LGPL-3.0-or-later with an OpenSSL exception. PostgreSQL's licence is OSI-approved. The recipe rule today is a static library linked into the extension: say whether static linking libpq into an LGPL extension, redistributed by us, is acceptable, and what texts the wheel must carry. If libpq needs OpenSSL for TLS (it does, for any real use), that is a second recipe with its own licence (Apache-2.0) and its own security-update duty.
- Static or bundled. Recipes must leave a static library and no shared one, so auditwheel has nothing to graft.
psycopg2-binarybundles shared libraries instead. Can libpq be built static and position-independent from the PostgreSQL source archive with fixed argument lists (./configure --without-readline --without-zlib ...,make -C src/interfaces/libpq, pluslibpgcommonandlibpgport)? Which features are left out, and what does a user lose (GSSAPI, LDAP, SCRAM needs OpenSSL)? pg_config. psycopg2'ssetup.pyrunspg_configfromPATH. A recipe'senvcan only set variables (ENV_NAMEallowsPATH). The build would need the recipe's{prefix}/binonPATHfor the package's build. Is that acceptable for the build's isolation, or should the recipe pass--pg-configsome other way?- The switch and the check. A missing libpq already fails psycopg2's build, so there's no silent fallback to guard. The
import_checkmust prove the bundled libpq is the one in use, without a database:psycopg2.extensions.libpq_version()equals the pinned version, andpsycopg2.__libpq_version__matches. - Security updates. PostgreSQL has minor releases every quarter, often with libpq fixes. Who notices, and how fast is a wheel rebuilt or withdrawn? The threat model's "A malicious library source, or a mistake in a recipe" paragraph needs a line on this.
- Targets. Linux x86_64 glibc first (the only place recipes run today).
First step after the design
- The recipe for one target, built twice in the pinned image with matching sha256s, with tests in
tests/test_gap_wheels.pycovering the new entry.
Done when:
- The design is posted here, and a maintainer has agreed to it or closed the issue with the reason.
- If it goes ahead: the recipe meets every point of "Adding a recipe", the README table has its row, and
uvx --python 3.14 [email protected]passes, offline.
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 1
- Merge trung bình
- 5 giờ 59 phút
- Pull request đã merge (30 ngày)
- 19
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 wheelgap/wheels
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của wheelgap/wheels
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ActivityWatch/docs#223 ·
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier captureCó thể đã có người làm @jianyx1 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
volcengine/OpenViking#8354 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
comp/tools P2 tool/skills type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-agent#159541 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
multilabel_margin_loss returns an unwritten scalar for an empty CPU batch with reduction='sum'Đang mởbot-triaged module: correctness (silent) module: cpu module: empty tensor module: loss triage review
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
request-theme
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
LizardByte/ThemerrDB#10167 · 1 bình luận ·