Permalink
Browse files

Added ability to use README.rst for pypi

  • Loading branch information...
robnagler committed Aug 28, 2015
1 parent 8b5311b commit 8d690c29192ba092fdc3959b8aec917fa13c9f4b
Showing with 11 additions and 14 deletions.
  1. +0 −8 README.md
  2. +1 −1 README.rst
  3. +10 −5 pykern/pksetup.py
View

This file was deleted.

Oops, something went wrong.
View
@@ -6,4 +6,4 @@ Python programs and servers.
PyKern defines policies, which make it easy to eliminate boiler-plate.
`API Docs <http://pykern.readthedocs.org>`_
For more info, `read the API Docs <http://pykern.readthedocs.org>`_
View
@@ -201,7 +201,7 @@ def main():
name = kwargs['name']
assert type(name) == str, \
'name must be a str; remove __future__ import unicode_literals in setup.py'
long_description = _read('README.md')
long_description = _read('README.rst', 'README.md')
reqs = pip.req.parse_requirements(
'requirements.txt', session=pip.download.PipSession())
install_requires = [str(i.req) for i in reqs]
@@ -324,10 +324,15 @@ def _fullsplit(path, result=None):
return res
def _read(filename):
"""Read a file"""
with open(filename, 'r') as f:
return f.read()
def _read(*args):
"""Read a files until find one that works"""
for filename in args:
try:
with open(filename, 'r') as f:
return f.read()
except OSError:
pass
raise AssertionError('{}: one of these files must exist'.format(args))
def _remove(path):

0 comments on commit 8d690c2

Please sign in to comment.