1
1
#!/usr/bin/env python
2
2
# -*- coding: utf-8 -*-
3
3
4
- from setuptools import setup
4
+ from setuptools import setup , find_packages
5
5
import os
6
6
import re
7
7
@@ -14,31 +14,6 @@ def get_version(package):
14
14
return re .match ("__version__ = ['\" ]([^'\" ]+)['\" ]" , init_py ).group (1 )
15
15
16
16
17
- def get_packages (package ):
18
- """
19
- Return root package and all sub-packages.
20
- """
21
- return [dirpath
22
- for dirpath , dirnames , filenames in os .walk (package )
23
- if os .path .exists (os .path .join (dirpath , '__init__.py' ))]
24
-
25
-
26
- def get_package_data (package ):
27
- """
28
- Return all files under the root package, that are not in a
29
- package themselves.
30
- """
31
- walk = [(dirpath .replace (package + os .sep , '' , 1 ), filenames )
32
- for dirpath , dirnames , filenames in os .walk (package )
33
- if not os .path .exists (os .path .join (dirpath , '__init__.py' ))]
34
-
35
- filepaths = []
36
- for base , filenames in walk :
37
- filepaths .extend ([os .path .join (base , filename )
38
- for filename in filenames ])
39
- return {package : filepaths }
40
-
41
-
42
17
version = get_version ('oauth2_provider' )
43
18
44
19
@@ -61,10 +36,10 @@ def get_package_data(package):
61
36
keywords = 'django oauth oauth2 oauthlib' ,
62
37
author = "Federico Frenguelli, Massimiliano Pippi" ,
63
38
64
- url = 'http ://github.com/pydanny /django-admin2 ' ,
39
+ url = 'https ://github.com/evonove /django-oauth-toolkit ' ,
65
40
license = 'BSD' ,
66
- packages = get_packages ( 'oauth2_provider' ),
67
- package_data = get_package_data ( 'oauth2_provider' ) ,
41
+ packages = find_packages ( ),
42
+ include_package_data = True ,
68
43
test_suite = 'runtests' ,
69
44
install_requires = [
70
45
'django>=1.5.0' ,
0 commit comments