Unable to add package with poetry
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- build-system
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- C
- Stars
- 522
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from systemd/python-systemd
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
systemd/python-systemd#177 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
systemd/python-systemd#169 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
systemd/python-systemd#167 · 19 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
systemd/python-systemd#152 · 1 comment · 13 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
systemd/python-systemd#146 · 2 comments ·
All issues in systemd/python-systemd
Similar issues
-
internal.h中,漏掉了1个定义。 Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
kovidgoyal/kitty#10516 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
zephyrproject-rtos/zephyr#120011 ·