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

Wheel build is broken in a clean Python environment #46

Open
TimotheusBachinger opened this issue Jan 17, 2024 · 2 comments
Open

Wheel build is broken in a clean Python environment #46

TimotheusBachinger opened this issue Jan 17, 2024 · 2 comments

Comments

@TimotheusBachinger
Copy link

Hi NetApp,

we need to build and compile from source and using netapp_ontap-9.14.1.0.tar.gz for that which fails with:

╭─ /tmp/netapp_original/netapp_ontap-9.14.1.0 
╰─$ python -m pip install --no-binary=":all:" --no-deps --compile --isolated --prefix=$PWD .
Processing /tmp/netapp_original/netapp_ontap-9.14.1.0
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      Traceback (most recent call last):
        File "/home/timotheus/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/timotheus/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/timotheus/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-1qdt_rr5/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-1qdt_rr5/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-1qdt_rr5/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-1qdt_rr5/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 9, in <module>
        File "/tmp/netapp_original/netapp_ontap-9.14.1.0/netapp_ontap/__init__.py", line 1889, in <module>
          from netapp_ontap.error import NetAppRestError
        File "/tmp/netapp_original/netapp_ontap-9.14.1.0/netapp_ontap/error.py", line 11, in <module>
          from netapp_ontap.response import NetAppResponse
        File "/tmp/netapp_original/netapp_ontap-9.14.1.0/netapp_ontap/response.py", line 8, in <module>
          import requests
      ModuleNotFoundError: No module named 'requests'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel 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.

[notice] A new release of pip is available: 23.3.1 -> 23.3.2
[notice] To update, run: pip install --upgrade pip

The setup.py defines correctly the needed build dependency with:

    install_requires=["marshmallow>=3.2.1", "requests>=2.26.0", "requests-toolbelt>=0.9.1", "urllib3>=1.26.7","certifi>=2022.12.7"],

but the build fails as it already needs requests during import netapp_ontap.

Here a simple workaround:

9d8
< import netapp_ontap
13c12
<     version=netapp_ontap.__version__,
---
>     version="9.14.1.0",
17c16
<     long_description=netapp_ontap.__doc__,
---
>     long_description="see netapp_ontap.__doc__",

Which results in a successful build without having requests installed beforehand.

Could you fix this on your side?

Regards
Timi

Copy link

Thank you for reporting an issue! If you haven't already joined our Discord community,
then we invite you to do so. This is a great place to get help and ask questions from our community.

@TimotheusBachinger
Copy link
Author

I have currently a work around in place by using a fork in our build process in case any body needs a quick solution:
Checkmk/checkmk@36ae1e1
and
Checkmk/netapp-ontap-cmk@e38ce4c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant