Closed parmentelat closed 1 year ago
fyi I've gone ahead and did the job on a slightly larger scale with the 6 commands that I'm likely to use most, this can be found in the commands
branch in my fork
note that the global variables used in the main part, now a function, need to be declared global
, otherwise the logic is broken
Hi @parmentelat
Did you setup test pypi and confirm this works, installs individual python scripts when running pip to install IdracRedfishSupport? I was trying it today and no luck getting it to work.
I can confirm that
pip install -e .
(in the folder where is setup.py
of course) does the job to expose the commands in my path, I've been using this all day already
I have not uploaded on pypi though, this will trigger issues of its own for sure, but in my experience it should be no big deal
I got it working but only need to make changes to setup.py (no changes needed to each individual script adding main()), added line below:
scripts=["AssignHotSpareREDFISH.py","BiosChangePasswordREDFISH.py"]
Example after running pip the scripts are located in same directory.
Let me know if this works for you, i can make the code changes so it will upload all scripts from Python directory (example above i just ran it to test out pypi, confirm it works installing scripts from Python directory).
Hey, thanks for looking into this my only concern is to be able to use the scripts with an easy installation step, so whatever method is best for you, fine by me I guess I could have done with a more finger-friendly (read, lowercase only) naming scheme, but that's another story entirely...
this is no longer relevant as of 0.0.8 see also #245 closing
as a proof of concept regarding issue #245, here's a change that would expose the script
InsertEjectVirtualMediaREDFISH.py
as a properly installed command that I arbitrarily chose to nameredfish-insert-eject-virtual-media
(the naming can be adapted of course)the first commit is about cleaning up the .py script in terms of trailing spaces and extra empty lines at the end of the file; it brings no change at all, but makes the next move (introduce a
main()
function) less confusingof course this would need to be applied on all the scripts, but it is something that can be relatively easily automated
let me know what you think of this approach