Skip to content

Commit

Permalink
Pre-process README.rst so that PyPi renders it.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbrzt committed Aug 7, 2012
1 parent 193683a commit 49e44d9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import sys
import re
from setuptools import setup
import httpie

Expand All @@ -22,11 +23,20 @@
requirements.append('colorama>=0.2.4')


def long_description():
"""Pre-process the README so that PyPi can render it properly."""
with open('README.rst') as f:
rst = f.read()
code_block = '(:\n\n)?\.\. code-block::.*'
rst = re.sub(code_block, '::', rst)
return rst


setup(
name='httpie',
version=httpie.__version__,
description=httpie.__doc__.strip(),
long_description=open('README.rst').read(),
long_description=long_description(),
url='http://httpie.org/',
download_url='https://github.com/jkbr/httpie',
author=httpie.__author__,
Expand Down

0 comments on commit 49e44d9

Please sign in to comment.