Having trouble re-packaging SL1 Library
Hi All, hoping someone here can help me out. I recently have been trying to make a small tweak to the python code for the out of the box silo_cisco_meraki_api Library from the Cisco: Meraki Powerpack (literally just changing one variable)
I was able to get the Library downloaded, unpacked, extracted the individual .py file using 'wheel unpack [file]', made the change, and ran 'wheel pack [directory]'. The final step as outlined in this SL document is to re-package the python project using the command 'python3 -m pip download --find-links=. silo_cisco_meraki_api==0.6.10'. However, when I run this I'm getting the error:
Does anyone know what I'm doing wrong here? I'm guessing there's a very obvious step I'm missing.
Hi Jeff!
To answer your main question about the error and the point of that step: you can skip it. That step is for a python package you own, or a 3rd party package from the python community. In other words, it needs to be a package that pip knows about. Since silo_cisco_meraki_api is a privately hosted ScienceLogic library, pip cannot find it in the official PYPI repo.
If you were using your own library, or one from PYPI, then that step would download any dependencies of the package so that you could include them the in the library tar bundle. Then during the collection process those dependencies would support the main package in the python virtual environment on the Collector Unit.
In summary, you can skip the pip download step. The best thing would be to include all the dependencies that came with the original silo_cisco_meraki_api library. So during the tar step, include the python packages that came with the original. Also, don't forget to adjust the version of the new package, and include it in the Execution Environment so it gets used in place of the original.