Unable to add package with poetry
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 28/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- build-system
Hướng nghiên cứu
Reproduce the failure with poetry add systemd-python and pip wheel --use-pep517 "systemd-python (==235)", then inspect the package's pyproject.toml and build configuration around the missing pkg-config dependency. Done means the package can be installed through the documented Poetry or PEP 517 path on the reported Ubuntu and Python versions.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I get the following error when trying add this package as a dependency from pypi using poetry add systemd-python.
$ poetry add systemd-python
Using version ^235 for systemd-python
Updating dependencies
Resolving dependencies... (0.1s)
Package operations: 1 install, 0 updates, 0 removals
• Installing systemd-python (235): Failed
ChefBuildError
Backend subprocess exited when trying to invoke get_requires_for_build_wheel
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/user/.local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/user/.local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/tmpj5mp5g_u/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/tmpj5mp5g_u/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "/tmp/tmpj5mp5g_u/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "/tmp/tmpj5mp5g_u/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 55, in <module>
File "<string>", line 40, in lib
File "<string>", line 18, in pkgconfig
File "<string>", line 6, in call
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'
at ~/.local/lib/python3.10/site-packages/poetry/installation/chef.py:147 in _prepare
143│
144│ error = ChefBuildError("\n\n".join(message_parts))
145│
146│ if error is not None:
→ 147│ raise error from None
148│
149│ return path
150│
151│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with systemd-python (235) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "systemd-python (==235)"'.
The same issue occurs when trying to build a wheel pip wheel "systemd-python (==235)" as the command above describes.
I also can't add this dependency directly via git:
$ poetry add https://github.com/systemd/python-systemd
file could not be opened successfully:
- method gz: ReadError('not a gzip file')
- method bz2: ReadError('not a bzip2 file')
- method xz: ReadError('not an lzma file')
- method tar: ReadError('invalid header')
I'm not familiar with details as to why this is occuring, but all I want to do is add this package as a dependency for my project, preferably with poetry. I am not sure if there are other methods of adding this as a dependency to pyproject.toml that would require its installation.
OS: 22.04.1-Ubuntu
Python version: Python 3.10.12
Pip version: pip 23.2.1
Poetry version: Version: 1.6.1 Poetry-Core Version: 1.7.0
- Ngôn ngữ chính
- C
- Star
- 522
- Fork
- 79
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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
- Đọ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 systemd/python-systemd
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
systemd/python-systemd#177 · 1 bình luận · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
systemd/python-systemd#169 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
systemd/python-systemd#167 · 19 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
systemd/python-systemd#152 · 1 bình luận · 13 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
systemd/python-systemd#146 · 2 bình luận ·
Tất cả issue của systemd/python-systemd
Issue tương tự
-
internal.h中,漏掉了1个定义。 Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Broadcast Documentation Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
kovidgoyal/kitty#10516 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
zephyrproject-rtos/zephyr#120011 ·