3

I'm trying to set my pyversion icon to my github README, similar to this:

expected badge

I've been trying to reverse engineer the setup from the coveralls-python project.

My .travis.yaml file looks like this:

language: python
python:
  - "2.7"
  - "3.3"
  - "3.4"
  - "3.5"
  - "3.6"
install: 
  - pip install tox-travis
  - pip install python-coveralls

script:
  - tox
  - coverage run --source ibm_analytics_engine -m ibm_analytics_engine.iae
  - coverage report -m

after_success:
  - coveralls

And my README has:

[![Pyversions](https://img.shields.io/pypi/pyversions/ibm-analytics-engine-python.svg?style=flat-square)](https://pypi.python.org/pypi/ibm-analytics-engine-python)

However, my output looks like this:

actual badge

Where does the pyversions information get taken from? Is it from the pypi page? If not, how do I get shields.io to reflect the versions of python my library supports?

Pyves
  • 6,333
  • 7
  • 41
  • 59
Chris Snow
  • 23,813
  • 35
  • 144
  • 309

1 Answers1

7

Ok, the python versions is read from PyPi.

I just needed to add this to my setup.py trove classifiers:

Programming Language :: Python
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Chris Snow
  • 23,813
  • 35
  • 144
  • 309