awslabs / collectd-cloudwatch

A collectd plugin for sending data to Amazon CloudWatch
MIT License
199 stars 131 forks source link

remove python2.6 dependencies if possible #100

Closed pxaws closed 3 years ago

pxaws commented 3 years ago

Issue #, if available: Remove the dependency on the deprecated python2.6

Description of changes: Python with version >= 2.7 should be ship with pip and setuptools by default. In that case, we should not use the python2.6 packages python-pip and python-setuptools. First we check if pip and setuptools are installed and if not we fallback to use the old packages (This should not happen as we assume that all the Amazon Linux should already use python2.7 as the default python).

Test I did a simple manual test on Amazon Linux and confirmed the package can be installed successfully and no python2.6 dependencies are installed. The metrics can also be published correctly to cloudwatch console.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.