|
6 | 6 | # arzaroth@arzaroth.com |
7 | 7 | # |
8 | 8 |
|
| 9 | +import os |
| 10 | +import io |
| 11 | + |
9 | 12 | from setuptools import setup, find_packages |
10 | 13 | from setuptools import Extension |
11 | 14 |
|
12 | | -VERSION = ("2", "1", "0") |
| 15 | +long_descr = 'Python bindings for RapidXml, a C++ XML parsing library' |
| 16 | +try: |
| 17 | + import pypandoc |
| 18 | + long_descr = pypandoc.convert('README.md', 'rst') |
| 19 | + long_descr = long_descr.replace("\r", "") |
| 20 | +except (ImportError, OSError): |
| 21 | + if os.path.exists('README.md'): |
| 22 | + with io.open('README.md', encoding="utf-8") as f: |
| 23 | + long_descr = f.read() |
| 24 | + |
| 25 | +VERSION = ("2", "1", "1") |
13 | 26 |
|
14 | 27 | rapidxml = Extension("rapidxml.c_ext", |
15 | 28 | define_macros=[('MAJOR_VERSION', VERSION[0]), |
|
43 | 56 | author_email='lekva@arzaroth.com', |
44 | 57 |
|
45 | 58 | description='Python RapidXml Library', |
46 | | - long_description='python bindings for RapidXml, a C++ XML parsing library', |
| 59 | + long_description=long_descr, |
47 | 60 | keywords='rapidxml xml parsing', |
48 | 61 |
|
49 | 62 | packages=find_packages('.'), |
|
0 commit comments