Skip to content
New issue

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

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

Already on GitHub? # to your account

One-deploy 'make requirements' errors out on installing Enum. #103

Closed
3 tasks
ntrcessor opened this issue Dec 1, 2024 · 3 comments
Closed
3 tasks

One-deploy 'make requirements' errors out on installing Enum. #103

ntrcessor opened this issue Dec 1, 2024 · 3 comments

Comments

@ntrcessor
Copy link

Description
After cloning GH one-deploy repository,

cd one-deploy
make requirements

Produces the error:
...
~/one-deploy# make requirements
poetry update --directory /root/one-deploy/
Updating dependencies
Resolving dependencies... (2.8s)

Package operations: 4 installs, 0 updates, 0 removals

  • Installing enum (0.4.7): Failed

ChefBuildError

Backend subprocess exited when trying to invoke get_requires_for_build_wheel

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmp4w7p3ra4/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmp4w7p3ra4/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "/tmp/tmp4w7p3ra4/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/tmp4w7p3ra4/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "", line 24, in
AttributeError: module 'enum' has no attribute 'version'

at /usr/lib/python3/dist-packages/poetry/installation/chef.py:164 in _prepare
160│
161│ error = ChefBuildError("\n\n".join(message_parts))
162│
163│ if error is not None:
→ 164│ raise error from None
165│
166│ return path
167│
168│ 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 enum (0.4.7) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "enum (==0.4.7)"'.

make: *** [Makefile:41: requirements-poetry] Error 1
...

To Reproduce

  1. Clone either Master Repository, on 6.10 branch.
  2. change to the one-deploy directory
  3. type 'make requirements'

Expected behavior
For One Deploy to make/install requirements.

Details

  • Ansible version: [e.g. 2.14.2 or output from ansible-playbook --version]

  • ansible-playbook --version
    ansible-playbook [core 2.16.3]
    config file = /root/one-deploy/ansible.cfg
    configured module search path = ['/root/one-deploy/vendor/ceph-ansible/library']
    ansible python module location = /usr/lib/python3/dist-packages/ansible
    ansible collection location = /root/one-deploy/ansible_collections
    executable location = /usr/bin/ansible-playbook
    python version = 3.12.3 (main, Nov 6 2024, 18:32:19) [GCC 13.2.0] (/usr/bin/python3)
    jinja version = 3.1.2
    libyaml = True

  • Linux OS distro in your cluster: [e.g. Ubuntu-22.04 or AlmaLinux-9.2]

  • Ubuntu-24.04

  • Version: [e.g. 35383c1 - tag or commit hash]

  • Not sure where to find this info. I just cloned the master, and 6.10 branches today. (11/30/2024, 20:00 Eastern Time)

Additional context
Freshly deployed Ubuntu 24.04 VMs. Following the guide for one-deploy here:
https://docs.opennebula.io/6.10/installation_and_configuration/automatic_deployment/one_deploy_tutorial_local_ds.html

Upon researching the issue online, it seems one-deploy is trying to install enum which is now a built-in for python3, and no longer requires being installed. I have tried adding the 2 or 3 enum packages I found for ubuntu, (first just one at a time, then 2, then all 3) All produce the exact same output. Even removed the enum packages altogether as this was a suggestion for other platforms. (MacOS).

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
@ntrcessor
Copy link
Author

Was able to reproduce the same issue on ubuntu 22.04.

@francismendes
Copy link

There's any known workarounds for this issue?

@sk4zuzu
Copy link
Contributor

sk4zuzu commented Jan 29, 2025

We've just merged this PR #112 which replaces poetry with hatch completely, maybe you'll have more luck with it.. Closing this issue for now. 🙏🤗

@sk4zuzu sk4zuzu closed this as completed Jan 29, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants