Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocs container builds are failing due to bug in setuptools #391

Closed
BrianJKoopman opened this issue Jul 29, 2024 · 0 comments · Fixed by #392
Closed

ocs container builds are failing due to bug in setuptools #391

BrianJKoopman opened this issue Jul 29, 2024 · 0 comments · Fixed by #392
Labels
bug Something isn't working

Comments

@BrianJKoopman
Copy link
Member

Builds currently fail with the following error:

$ docker build --no-cache -t ocs .

...snip....

Step 14/16 : RUN pip3 install .
 ---> Running in 41f49f20402f
Processing /app/ocs
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /tmp/tmpx1r3y0c0 get_requires_for_build_wheel /tmp/tmpya52bdh4
       cwd: /tmp/pip-req-build-8uhb4nj9
  Complete output (49 lines):
  Warning: build in /tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages is using versioneer.py from /tmp/pip-req-build-8uhb4nj9/versioneer.py
  running egg_info
  writing ocs.egg-info/PKG-INFO
  writing dependency_links to ocs.egg-info/dependency_links.txt
  writing entry points to ocs.egg-info/entry_points.txt
  writing requirements to ocs.egg-info/requires.txt
  writing top-level names to ocs.egg-info/top_level.txt
  reading manifest file 'ocs.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE.txt'
  Traceback (most recent call last):
    File "/tmp/tmpx1r3y0c0", line 280, in <module>
      main()
    File "/tmp/tmpx1r3y0c0", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/tmp/tmpx1r3y0c0", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 12, in <module>
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 108, in setup
      return distutils.core.setup(**attrs)
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
      self.run_command(cmd)
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 945, in run_command
      super().run_command(command)
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 310, in run
      self.find_sources()
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 318, in find_sources
      mm.run()
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 544, in run
      self.prune_file_list()
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 610, in prune_file_list
      base_dir = self.distribution.get_fullname()
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/_core_metadata.py", line 266, in get_fullname
      return _distribution_fullname(self.get_name(), self.get_version())
    File "/tmp/pip-build-env-a5hyznc_/overlay/lib/python3.8/site-packages/setuptools/_core_metadata.py", line 284, in _distribution_fullname
      canonicalize_version(version, strip_trailing_zero=False),
  TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /tmp/tmpx1r3y0c0 get_requires_for_build_wheel /tmp/tmpya52bdh4 Check the logs for full command output.
The command '/bin/sh -c pip3 install .' returned a non-zero code: 1

This was reported upstream here: pypa/setuptools#4483

Pinning setuptools below 72.0.0 resolves the issue for now, but we should keep an eye on this getting fixed and unpin when possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant