DMTF / python-redfish-library

Python3 library for interacting with devices that support a Redfish service
Other
168 stars 181 forks source link

Requirements doesn't list dependencies #129

Closed mrvn closed 8 months ago

mrvn commented 2 years ago

Trying to build I get the following test failures:

redfish (unittest.loader._FailedTest) ... ERROR
tests.discovery.test_discovery (unittest.loader._FailedTest) ... ERROR
tests.rest.test_v1 (unittest.loader._FailedTest) ... ERROR
tests.ris.test_config (unittest.loader._FailedTest) ... ERROR
tests.ris.test_ris (unittest.loader._FailedTest) ... ERROR
tests.ris.test_rmc_helper (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: redfish (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: redfish
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/loader.py", line 470, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/source/brederlo/pkg/ql-debs/python-redfish-library/git/.pybuild/cpython3_3.8_redfish/build/redfish/__init__.py", line 11, in <module>
    from redfish.rest.v1 import redfish_client
  File "/source/brederlo/pkg/ql-debs/python-redfish-library/git/.pybuild/cpython3_3.8_redfish/build/redfish/rest/v1.py", line 26, in <module>
    from requests_toolbelt import MultipartEncoder
ModuleNotFoundError: No module named 'requests_toolbelt'
...

The Requirements in README.rst should list dependencies:

mrvn commented 2 years ago

Debian detects more dependencies: "python3-json-pointer, python3-jsonpath-rw, python3-requests, python3-requests-toolbelt, python3-requests-unixsocket".

mraineri commented 2 years ago

Does installing the dependencies from requirements.txt (pip install -r requirements.txt) solve this? We can certainly update the readme to reflect that, but I'd also like to ensure requirements.txt has everything needed.

Are these Debian packages you need to install rather than pulling things via pip? Does pip install -r requirements.txt not pull everything you need?