Skip to content

Commit

Permalink
Add AUTHORS file MANIFEST.in and fixed setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
synasius committed Jun 3, 2013
1 parent 00baa10 commit 5a550e2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 29 deletions.
8 changes: 8 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Authors
=======

Massimiliano Pippi
Federico Frenguelli

Contributors
============
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include README.rst LICENSE
recursive-include oauth2_provider/templates *.html
33 changes: 4 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from setuptools import setup
from setuptools import setup, find_packages
import os
import re

Expand All @@ -14,31 +14,6 @@ def get_version(package):
return re.match("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)


def get_packages(package):
"""
Return root package and all sub-packages.
"""
return [dirpath
for dirpath, dirnames, filenames in os.walk(package)
if os.path.exists(os.path.join(dirpath, '__init__.py'))]


def get_package_data(package):
"""
Return all files under the root package, that are not in a
package themselves.
"""
walk = [(dirpath.replace(package + os.sep, '', 1), filenames)
for dirpath, dirnames, filenames in os.walk(package)
if not os.path.exists(os.path.join(dirpath, '__init__.py'))]

filepaths = []
for base, filenames in walk:
filepaths.extend([os.path.join(base, filename)
for filename in filenames])
return {package: filepaths}


version = get_version('oauth2_provider')


Expand All @@ -61,10 +36,10 @@ def get_package_data(package):
keywords='django oauth oauth2 oauthlib',
author="Federico Frenguelli, Massimiliano Pippi",
author_email='[email protected], [email protected]',
url='http://github.com/pydanny/django-admin2',
url='https://github.com/evonove/django-oauth-toolkit',
license='BSD',
packages=get_packages('oauth2_provider'),
package_data=get_package_data('oauth2_provider'),
packages=find_packages(),
include_package_data=True,
test_suite='runtests',
install_requires=[
'django>=1.5.0',
Expand Down

0 comments on commit 5a550e2

Please sign in to comment.