Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unable to add package with poetry

オープン
#131 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
c, python
領域
build-system

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
C
スター
522
フォーク
79
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

systemd/python-systemd のほかの issue

systemd/python-systemd の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。