claws / aioprometheus

A Prometheus Python client library for asyncio-based applications
175 stars 21 forks source link

prometheus_metrics_proto not present in requirements.txt #8

Closed tchap closed 7 years ago

tchap commented 7 years ago

Hi,

aioprometheus imports prometheus_metrics_proto yet the package is not present in requirements.txt. A colleague of mine has spent some time finding out what is wrong, so it would be cool to fix this. Not sure what version to put there, so just opening an issue, not sending a pull request...

Cheers!

claws commented 7 years ago

Hi,

The prometheus_metrics_proto package is built and created by this project when it installs. This project makes use of the pyrobuf dependency to build the prometheus_metrics_proto package. pyrobuf creates a package for each .proto file. This is why the pyrobuf_modules="proto", line is in the setup.py file. It's a little weird but that's what it does. So there is no need for it to be listed in the requirements.txt file.

The prometheus_metrics_proto is used to provide an efficient binary format. Currently this pacakge is tightly coupled into the project. However, the text format is likely fine for most use cases. I am planning to eventually make the prometheus_metrics_proto package an optional extra because of these kinds of issues that people seem to encounter when trying to use pyrobuf package. However, I'm really busy at work right now so not much time at the moment to make the necessary changes.

claws commented 7 years ago

I have updated the library to remove the dependency on pyrobuf. This should simplify the installation. Try to install it again from pip if you are still interested.

tchap commented 7 years ago

Thanks!