8000 Inject readme.md to long_description so it will show up on the pypi p… · rwky/client_python@db04b10 · GitHub
[go: up one dir, main page]

Skip to content

Commit db04b10

Browse files
asherfbrian-brazil
authored andcommitted
Inject readme.md to long_description so it will show up on the pypi project page. (prometheus#482)
* Inject readme.md to long_description so it will show up on the pypi project page. See: https://packaging.python.org/guides/making-a-pypi-friendly-readme/ Signed-off-by: Asher Foa <asher@asherfoa.com>
1 parent ab3ca4b commit db04b10

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

setup.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
from setuptools import setup
2+
import sys
3+
from os import path
4+
5+
if sys.version_info >= (2, 7):
6+
with open(path.join(path.abspath(path.dirname(__file__)), 'README.md')) as f:
7+
long_description = f.read()
8+
else: # Assuming we don't run setup in order to publish under python 2.6
9+
long_description = "NA"
10+
211

312
setup(
413
name="prometheus_client",
514
version="0.7.1",
615
author="Brian Brazil",
716
author_email="brian.brazil@robustperception.io",
817
description="Python client for the Prometheus monitoring system.",
9-
long_description=(
10-
"See https://github.com/prometheus/client_python/blob/master/README.md"
11-
" for documentation."),
18+
long_description=long_description,
19+
long_description_content_type='text/markdown',
1220
license="Apache Software License 2.0",
1321
keywords="prometheus monitoring instrumentation client",
1422 3AFB
url="https://github.com/prometheus/client_python",

0 commit comments

Comments
 (0)
0