1
- from distutils .core import setup , Extension
2
- from distutils .command .build_py import build_py
3
- from distutils .command .build_ext import build_ext
4
-
5
1
import os
6
- import sys
2
+
3
+ from setuptools import setup , Extension
4
+ from distutils .command .build_py import build_py as du_build_py
7
5
8
6
# wow, this is a mixed bag ... I am pretty upset about all of this ...
9
- setuptools_build_py_module = None
10
- try :
11
- # don't pull it in if we don't have to
12
- if 'setuptools' in sys .modules :
13
- import setuptools .command .build_py as setuptools_build_py_module
14
- from setuptools .command .build_ext import build_ext
15
- except ImportError :
16
- pass
7
+ from setuptools .command .build_py import build_py
8
+ from setuptools .command .build_ext import build_ext
17
9
18
10
19
11
class build_ext_nofail (build_ext ):
@@ -65,9 +57,8 @@ def get_data_files(self):
65
57
data .append ((package , src_dir , build_dir , filenames ))
66
58
return data
67
59
68
- build_py .get_data_files = get_data_files
69
- if setuptools_build_py_module :
70
- setuptools_build_py_module .build_py ._get_data_files = get_data_files
60
+ du_build_py .get_data_files = get_data_files
61
+ build_py ._get_data_files = get_data_files
71
62
# END apply setuptools patch too
72
63
73
64
__author__ = "Sebastian Thiel"
@@ -85,17 +76,16 @@ def get_data_files(self):
85
76
author = __author__ ,
86
77
author_email = __contact__ ,
87
78
url = __homepage__ ,
88
- packages = ( pkg ) ,
79
+ packages = [ pkg ] ,
89
80
package_dir = {pkg : pkg },
90
81
ext_modules = [Extension (
91
82
pkg + '._perf' ,
92
83
[pkg + '/_fun.c' , pkg + '/_delta_apply.c' ],
93
- include_dirs = ['gitdb' ],
84
+ include_dirs = [pkg ],
94
85
)],
95
86
license = "BSD License" ,
96
87
zip_safe = False ,
97
- requires = ('smmap (>=0.8.5)' , ),
98
- install_requires = ('smmap >= 0.8.5' ),
88
+ install_requires = ['smmap >= 0.8.5' ],
99
89
long_description = """gitdb-speedups are a pure-c git object database speedups""" ,
100
90
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
101
91
classifiers = [
0 commit comments