python-diamond / Diamond

Diamond is a python daemon that collects system metrics and publishes them to Graphite (and others). It is capable of collecting cpu, memory, network, i/o, load and disk metrics. Additionally, it features an API for implementing custom collectors for gathering metrics from almost any source.
http://diamond.readthedocs.org/
MIT License
1.74k stars 602 forks source link

fix setup.py: get and compare distro name and version #763

Closed panzi closed 2 years ago

panzi commented 2 years ago

platform.dist() was removed in recent Python versions -> using the distro module instead if not hasattr(platform, 'dist'). Added distro to .travis.requirements.txt.

Also the case of distribution names wasn't correct everywhere (e.g. there was "fedora", but my system reports "Fedora"), I've run them through lower() to make it case insensitive.

Furthermore the distribution major version comparison was between str and int -> converted the str to int.