Skip to content

Wheel build is broken in a clean Python environment #46

@TimotheusBachinger

Description

@TimotheusBachinger

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions