SuffolkLITLab / ALActions

A github repo with all of the shared actions used in Assembly Line Projects
1 stars 0 forks source link

issue with python-augeas from the certbot upgrade in Docassemble 1.4.82 #16

Closed michaelhofrichter closed 11 months ago

michaelhofrichter commented 11 months ago

In the step that is installing everything from the requirements.txt file, I get:

Collecting python-augeas (from certbot-apache==2.7.1->docassemble.webapp>=1.4.54->-r ./docassemble/LSDocassembleLink/requirements.txt (line 2))
  Downloading python-augeas-1.1.0.tar.gz (93 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.7/93.7 kB 27.4 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Running command python setup.py egg_info
  /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
    warnings.warn(
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-v81nx0nx/python-augeas_098ef54cb5f04d48a31c1c0c7fcfffe1/setup.py", line 16, in <module>
      setup(name=name,
    File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 147, in setup
      _setup_distribution = dist = klass(attrs)
    File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/setuptools/dist.py", line 476, in __init__
      _Distribution.__init__(
    File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 282, in __init__
      self.finalize_options()
    File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/setuptools/dist.py", line 900, in finalize_options
      ep(self)
    File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/setuptools/dist.py", line 920, in _finalize_setup_keywords
      ep.load()(self, ep.name, value)
    File "/tmp/pip-install-v81nx0nx/python-augeas_098ef54cb5f04d48a31c1c0c7fcfffe1/.eggs/cffi-1.16.0-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py", line 216, in cffi_modules
      add_cffi_module(dist, cffi_module)
    File "/tmp/pip-install-v81nx0nx/python-augeas_098ef54cb5f04d48a31c1c0c7fcfffe1/.eggs/cffi-1.16.0-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module
      execfile(build_file_name, mod_vars)
    File "/tmp/pip-install-v81nx0nx/python-augeas_098ef54cb5f04d48a31c1c0c7fcfffe1/.eggs/cffi-1.16.0-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
      exec(code, glob, glob)
    File "augeas/ffi.py", line 47, in <module>
      lib = ffi.dlopen("augeas")
    File "/tmp/pip-install-v81nx0nx/python-augeas_098ef54cb5f04d48a31c1c0c7fcfffe1/.eggs/cffi-1.16.0-py3.10-linux-x86_64.egg/cffi/api.py", line 150, in dlopen
      lib, function_cache = _make_ffi_library(self, name, flags)
    File "/tmp/pip-install-v81nx0nx/python-augeas_098ef54cb5f04d48a31c1c0c7fcfffe1/.eggs/cffi-1.16.0-py3.10-linux-x86_64.egg/cffi/api.py", line 832, in _make_ffi_library
      backendlib = _load_backend_lib(backend, libname, flags)
    File "/tmp/pip-install-v81nx0nx/python-augeas_098ef54cb5f04d48a31c1c0c7fcfffe1/.eggs/cffi-1.16.0-py3.10-linux-x86_64.egg/cffi/api.py", line 827, in _load_backend_lib
      raise OSError(msg)
  OSError: ctypes.util.find_library() did not manage to locate a library called 'augeas'
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /opt/hostedtoolcache/Python/3.10.13/x64/bin/python -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize

  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
          "the build environment.",
          file=sys.stderr,
      )
      sys.exit(1)

  __file__ = %r
  sys.argv[0] = __file__

  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"

  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'/tmp/pip-install-v81nx0nx/python-augeas_098ef54cb5f04d48a31c1c0c7fcfffe1/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' egg_info --egg-base /tmp/pip-pip-egg-info-sefyz5pc
  cwd: /tmp/pip-install-v81nx0nx/python-augeas_098ef54cb5f04d48a31c1c0c7fcfffe1/
  Preparing metadata (setup.py): finished with status 'error'
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Notice:  A new release of pip is available: 23.0.1 -> 23.2.1
Notice:  To update, run: pip install --upgrade pip
Error: Process completed with exit code 1.

My requirements.txt file:

docassemble.base>=1.4.54
docassemble.webapp>=1.4.54
mypy
requests>=2.31.0
pycountry>=22.3.5
lxml>=4.9.3
defusedxml>=0.7.1
michaelhofrichter commented 11 months ago

When it was pulling 1.4.81 yesterday there was no problem. When it pulled 1.4.82 this morning it errored.

BryceStevenWilley commented 11 months ago

I think we ran into the same thing at the same time, https://github.com/SuffolkLITLab/ALActions/commit/c2d216999730dd28338f0d965e703f610166cbfa fixed it for me, if you're running on main it should pass automatically (feel free to repoen if you're still having issues).

michaelhofrichter commented 11 months ago

Yeah. That fixed it for me too. I've got a separate package that uses a copy of this that combines this with bandit and had to update that one. I only needed to add libaugeas0 to get it fixed. Thanks @BryceStevenWilley