aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authoragronholm <none@none>2009-10-20 02:55:01 +0300
committeragronholm <none@none>2009-10-20 02:55:01 +0300
commita858356a4e28396a0828573d9a5074da67f6dc62 (patch)
tree1d3b323b39c71f06a052cf155e4dbdf1fd893554 /setup.py
parentb2c722a3a23d81a02ec0bd58b91c26e7b9b2fedf (diff)
downloadexternal_python_setuptools-a858356a4e28396a0828573d9a5074da67f6dc62.tar.gz
external_python_setuptools-a858356a4e28396a0828573d9a5074da67f6dc62.tar.bz2
external_python_setuptools-a858356a4e28396a0828573d9a5074da67f6dc62.zip
Readded the custom build_py command for safely upgrading from older distribute versions
--HG-- branch : distribute extra : rebase_source : 74f1706957dbe79303581f21947d17b06b74ef61
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index e57cf5cf..07cfcd5e 100755
--- a/setup.py
+++ b/setup.py
@@ -39,8 +39,30 @@ SETUP_COMMANDS = d['__all__']
VERSION = "0.6.7"
from setuptools import setup, find_packages
+from setuptools.command.build_py import build_py as _build_py
scripts = []
+# specific command that is used to generate windows .exe files
+class build_py(_build_py):
+ def build_package_data(self):
+ """Copy data files into build directory"""
+ lastdir = None
+ for package, src_dir, build_dir, filenames in self.data_files:
+ for filename in filenames:
+ target = os.path.join(build_dir, filename)
+ self.mkpath(os.path.dirname(target))
+ srcfile = os.path.join(src_dir, filename)
+ outf, copied = self.copy_file(srcfile, target)
+ srcfile = os.path.abspath(srcfile)
+
+ # avoid a bootstrapping issue with easy_install -U (when the
+ # previous version doesn't have convert_2to3_doctests)
+ if not hasattr(self.distribution, 'convert_2to3_doctests'):
+ continue
+
+ if copied and srcfile in self.distribution.convert_2to3_doctests:
+ self.__doctests_2to3.append(outf)
+
# if we are installing Distribute using "python setup.py install"
# we need to get setuptools out of the way
def _easy_install_marker():