diff options
| author | Paul Ganssle <paul@ganssle.io> | 2018-03-24 14:51:53 -0400 |
|---|---|---|
| committer | Paul Ganssle <paul@ganssle.io> | 2018-03-24 15:02:11 -0400 |
| commit | df0618323bcba68b5d21ca5b67d5f8bbcd612715 (patch) | |
| tree | 163e1cc88dd87c301438634da3715f12ba249949 /setup.py | |
| parent | c0ea860be9b5005d38f20a0ab6b137e7b5edb2af (diff) | |
| download | dateutil-git-df0618323bcba68b5d21ca5b67d5f8bbcd612715.tar.gz | |
Fix RST renderer for PyPI
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -28,7 +28,19 @@ PACKAGES = find_packages(where='.', exclude=['dateutil.test']) def README(): with open('README.rst') as f: - return f.read() + readme_lines = f.readlines() + + # The .. doctest directive is not supported by PyPA + lines_out = [] + doctest_line_found = False + for line in readme_lines: + if line.startswith('.. doctest'): + doctest_line_found = True + lines_out.append('.. code-block:: python3\n') + else: + lines_out.append(line) + + return ''.join(lines_out) README = README() setup(name="python-dateutil", |
