diff --git a/MANIFEST.in b/MANIFEST.in index 0497df0..a66e7fa 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -15,8 +15,6 @@ exclude tools exclude CONTRIBUTING.md exclude .editorconfig -graft setupext - graft scripts # Load main dir but exclude things we don't want in the distro diff --git a/setupbase.py b/setupbase.py index 1100985..ecea9e7 100644 --- a/setupbase.py +++ b/setupbase.py @@ -24,7 +24,6 @@ from setuptools.command.build_py import build_py from setuptools.command.install import install from setuptools.command.install_scripts import install_scripts -from setupext import install_data_ext #------------------------------------------------------------------------------- # Useful globals and utility functions @@ -65,7 +64,6 @@ setup_args = dict( author = author, author_email = author_email, license = license, - cmdclass = {'install_data': install_data_ext}, ) diff --git a/setupext/__init__.py b/setupext/__init__.py deleted file mode 100644 index 3933cb5..0000000 --- a/setupext/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# load extended setup modules for distutils - -from .install_data_ext import install_data_ext diff --git a/setupext/install_data_ext.py b/setupext/install_data_ext.py deleted file mode 100644 index ce6623b..0000000 --- a/setupext/install_data_ext.py +++ /dev/null @@ -1,80 +0,0 @@ -# install_data_ext.py -# -# Subclass of normal distutils install_data command to allow more -# configurable installation of data files. - -import os -from distutils.command.install_data import install_data -from distutils.util import change_root, convert_path - -class install_data_ext(install_data): - - def initialize_options(self): - self.install_base = None - self.install_platbase = None - self.install_purelib = None - self.install_headers = None - self.install_lib = None - self.install_scripts = None - self.install_data = None - - self.outfiles = [] - self.root = None - self.force = 0 - self.data_files = self.distribution.data_files - self.warn_dir = 1 - - - def finalize_options(self): - self.set_undefined_options('install', - ('root', 'root'), - ('force', 'force'), - ('install_base', 'install_base'), - ('install_platbase', - 'install_platbase'), - ('install_purelib', - 'install_purelib'), - ('install_headers', - 'install_headers'), - ('install_lib', 'install_lib'), - ('install_scripts', - 'install_scripts'), - ('install_data', 'install_data')) - - - def run(self): - """ - This is where the meat is. Basically the data_files list must - now be a list of tuples of 3 entries. The first - entry is one of 'base', 'platbase', etc, which indicates which - base to install from. The second entry is the path to install - too. The third entry is a list of files to install. - """ - for lof in self.data_files: - if lof[0]: - base = getattr(self, 'install_' + lof[0]) - else: - base = getattr(self, 'install_base') - dir = convert_path(lof[1]) - if not os.path.isabs(dir): - dir = os.path.join(base, dir) - elif self.root: - dir = change_root(self.root, dir) - self.mkpath(dir) - - files = lof[2] - if len(files) == 0: - # If there are no files listed, the user must be - # trying to create an empty directory, so add the - # directory to the list of output files. - self.outfiles.append(dir) - else: - # Copy files, adding them to the list of output files. - for f in files: - f = convert_path(f) - (out, _) = self.copy_file(f, dir) - #print "DEBUG: ", out # dbg - self.outfiles.append(out) - - - return self.outfiles