Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Unable to add package with poetry

Abierto
#131 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
28/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
c, python
Área
build-system

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
C
Estrellas
522
Forks
79
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de systemd/python-systemd

Todos los issues de systemd/python-systemd

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.