Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
new method
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Bruce committed Sep 8, 2012
1 parent fe00dd2 commit 2be5f08
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import os
from setuptools import setup, find_packages

def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def read_file(filename):
"""Read a file into a string"""
path = os.path.abspath(os.path.dirname(__file__))
filepath = os.path.join(path, filename)
try:
return open(filepath).read()
except IOError:
return ''

setup(
name='django-{{ app_name }}',
Expand All @@ -15,12 +21,12 @@ def read(fname):
url='https://github.com/craigbruce/django-oauthlib',
packages=find_packages(),
include_package_data=True,
long_description=read('README.rst'),
long_description=read_file('README.rst'),
install_requires = ['docutils>=0.3'],
test_suite="runtests.runtests",
zip_safe=False,
requires=[
'django(==1.4)',
'django(>=1.4)',
'oauthlib(>=0.3.0)',
],
classifiers=[
Expand All @@ -32,5 +38,5 @@ def read(fname):
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
],
)

0 comments on commit 2be5f08

Please sign in to comment.