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-
51import os
6- import sys
2+
3+ from setuptools import setup , Extension
4+ from distutils .command .build_py import build_py as du_build_py
75
86# 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
179
1810
1911class build_ext_nofail (build_ext ):
@@ -65,9 +57,8 @@ def get_data_files(self):
6557 data .append ((package , src_dir , build_dir , filenames ))
6658 return data
6759
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
7162# END apply setuptools patch too
7263
7364__author__ = "Sebastian Thiel"
@@ -85,17 +76,16 @@ def get_data_files(self):
8576 author = __author__ ,
8677 author_email = __contact__ ,
8778 url = __homepage__ ,
88- packages = ( pkg ) ,
79+ packages = [ pkg ] ,
8980 package_dir = {pkg : pkg },
9081 ext_modules = [Extension (
9182 pkg + '._perf' ,
9283 [pkg + '/_fun.c' , pkg + '/_delta_apply.c' ],
93- include_dirs = ['gitdb' ],
84+ include_dirs = [pkg ],
9485 )],
9586 license = "BSD License" ,
9687 zip_safe = False ,
97- requires = ('smmap (>=0.8.5)' , ),
98- install_requires = ('smmap >= 0.8.5' ),
88+ install_requires = ['smmap >= 0.8.5' ],
9989 long_description = """gitdb-speedups are a pure-c git object database speedups""" ,
10090 # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
10191 classifiers = [
0 commit comments