HewlettPackard / python-redfish-utility

Python-based utility for interacting with devices supporting a Redfish Service
Other
86 stars 41 forks source link

Cray-HPE Update #52

Closed rustydb closed 1 year ago

rustydb commented 2 years ago

—–Synopsis of Commits Above—–

Status

Description

This change brings in changes Cray used for facilitating building ilorest for SLES15. This brings in some optimizations for the `Makefile`, with some trivial changes such as auto-updating the Sphinx documents. This was only tested on SLES. If someone could help test this on Ubuntu then this would be a complete change. I was unsure if all of the `Makefile` functions were actually used. This also updates the codebase to use Python3.8, making the 3.8 the default version for `.travis.yml`. Additionally, `requirements.txt` was yanked out in-favor of `setup.py` to make it easier to use setuptools and future versions of pip. **NOTE** We have to build this with `setuptools==56`, using newer setuptools results in an error. The current layout of this python module does not satisfy the `src-layout`: ```bash /usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning: is an invalid version and will not be supported in a future release warnings.warn( error: Setup script exited with error: Multiple top-level packages discovered in a flat-layout: ['temp', 'setuptools']. To avoid accidental inclusion of unwanted files or directories, setuptools will not proceed with this build. If you are trying to create a single distribution with multiple packages on purpose, you should not rely on automatic discovery. Instead, consider the following options: 1. set up custom discovery (`find` directive with `include` or `exclude`) 2. use a `src-layout` 3. explicitly set `py_modules` or `packages` with a list of names ``` This also adds a `tox.ini` for invoking a virtualenv when running tests or lint, as well as several linter updates to some of the source files (such as optimized imports). I think this change would do upstream well, but it should be tested with the upstream owner's build process first for RPMs and DEBs. We build the RPM by simply running: ```bash make rpmprep make rdmc.spec python3 -m pip install setuptools==56 make rpm ``` > **NOTE** This could be built with less commands, but we have a step to add metadata for the Git commit into the SPEC file (not shown). If we didn't add metadata into the spec file during the build then our build would look like this: > ```bash > make rpmprep > python3 -m pip install setuptools==56 > make rpm > ``` > Our buildenv uses a newer setuptools, so we have to add `python3 -m pip install setuptools==56` during buildtime.

rustydb commented 2 years ago

I am working on an integration PR to fixup the conflict in src/rdmc.py, when that's ready I'll merge it into our master branch so it'll show up in this PR.

rajeevkallur commented 2 years ago

@rustydb , makefile does not seem to be working. It is giving /Makefile:65: *** recipe commences before first target. Stop. Could you check at your end if anything is missing?

rajeevkallur commented 2 years ago

image

rajeevkallur commented 2 years ago

Please check the Makefile for any errors.

rustydb commented 2 years ago

I am working on an integration PR to fixup the conflict in src/rdmc.py, when that's ready I'll merge it into our master branch so it'll show up in this PR.

I pulled in the conflict resolution but there's new conflicts, looking/fixing.

rustydb commented 2 years ago

I am working on an integration PR to fixup the conflict in src/rdmc.py, when that's ready I'll merge it into our master branch so it'll show up in this PR.

I pulled in the conflict resolution but there's new conflicts, looking/fixing.

Actually it looks like GitHub is glitching.

rustydb commented 2 years ago

@rustydb , makefile does not seem to be working. It is giving /Makefile:65: *** recipe commences before first target. Stop. Could you check at your end if anything is missing?

@rajeevkallur I'll checkout the makefile.

rustydb commented 2 years ago

I think I see why the Makefile is broken here, there's lines I left in by mistake: https://github.com/HewlettPackard/python-redfish-utility/blob/master/Makefile#L105-L109

rustydb commented 2 years ago

@rajeevkallur I'll fix the makefile this week, today is a bit busy.

rustydb commented 2 years ago

@rajeevkallur getting to this today or tomorrow, sorry for the delay.

rustydb commented 2 years ago

@rajeevkallur this has a new Make and Spec file, do these work any better for you? The expect Python at /usr/bin/python.

rajeevkallur commented 1 year ago

@rustydb , Please rebase your changes by pulling the latest source. There are 33 files changed with this PR and I am not able to review or merge them. I just need the changes which you have done for review. Please open a new PR.

rustydb commented 1 year ago

@rustydb , Please rebase your changes by pulling the latest source. There are 33 files changed with this PR and I am not able to review or merge them. I just need the changes which you have done for review. Please open a new PR.

I'll rebase, I have some new changes too. Might be a short while before I can do that.

rustydb commented 1 year ago

Closing.

We changed our build to just source your RPM, and we are no longer maintaining our fork.