NH-14860 Fix sdist and wheel creation#24
NH-14860 Fix sdist and wheel creation#24tammy-baylis-swi merged 7 commits intoNH-14368-add-metrics-span-processorfrom
Conversation
cheempz
left a comment
There was a problem hiding this comment.
LGTM, thanks @tammy-baylis-swi! I tried a pip install <generated sdist> on my little test stack and appears to all work! Example trace: https://my.dc-01.dev-ssp.solarwinds.com/138094000386806784/traces/BE56E52C856D6CF155A9893529112C50/BF978382E95F9E65/details
Left a few minor comments which can be addressed in follow-on PR.
|
|
||
|
|
||
| def python_version_supported(): | ||
| if sys.version_info[0] == 3 and sys.version_info[1] > 3: |
There was a problem hiding this comment.
Should the second (minor?) version check be 5 since NH python only supports 3.6+?
There was a problem hiding this comment.
Yes, correct! This is a remnant from AO I forgot about. Will fix.
Speaking of! OTel Python may stop supporting 3.6, if this gets approved and released: open-telemetry/opentelemetry-python#2763 That's for us later though.
There was a problem hiding this comment.
Nice find, I'm glad you're keeping eyes on the new OTel happenings :)
|
|
||
| if not (python_version_supported() and os_supported()): | ||
| logger.warn( | ||
| "[SETUP] This package supports only Python 3.5 and above on Linux. " |
| The src_lib parameter is the name of the library file under solarwinds_apm/extension the above mentioned symlinks will | ||
| point to. If a file with the provided name does not exist, no symlinks will be created.""" | ||
|
|
||
| logger.info("Create links to platform specific liboboe library file") |
There was a problem hiding this comment.
Minor but I don't get these messages anymore when running pip install -v, maybe distutils.log was somehow able to know when pip verbose logging was specified while the (setuptools recommended) standard logging doesn't. It's not a blocker for this PR but would be good to know how to enable this for future troubleshooting.
There was a problem hiding this comment.
Yes I think you're right. logging has limited reach. I'll take a look.
|
Thanks @cheempz ! Yep, I'll merge this then address the minor suggestions in next PR. |
This PR covers some of the changes required for NH Python packaging and distribution. I will be switching from
setup.pytopyproject.tomluse in a separate PR.Summary:
ImportErrorfrommake sdist, probably becausesetup.pywas missingCustomBuildhelper method.make manylinux-wheels, usingmanylinux2014_x86_64PyPA image (same as AO).distutilstosetuptoolsusage.decoratorandsixdependencies.As we chatted separately, this removes the
setup.cfgand puts more responsibility insetup.py. It’s not the best solution since it’s now a biggersetup.pythan before and I think I read somewhere that the preferred pattern is a loadedsetup.cfgwhile allsetup.pydoes is make thesetup()call. But a switch topyproject.tomlsurpasses importance of doing a cleanup of this so I'm leaving it this way for now.Quick test doc outlining how NH agent
make sdistworks and is no longer full of extra fluff:https://swicloud.atlassian.net/wiki/spaces/NIT/pages/3138683446/2022-06-30+sdist+generation
make manylinux-wheelsends inDone.after creating and auditing wheels in build container e.g.