diff options
author | PJ Eby <distutils-sig@python.org> | 2005-05-28 23:05:59 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-05-28 23:05:59 +0000 |
commit | e15ee4d46a55e7dbfc823e52edf143b77ce3a978 (patch) | |
tree | 5f9b8785ca916b7ee0dc626bf9d0214a549dccda /setuptools/command/bdist_egg.py | |
parent | 02786fee1045d27499c1e2c60a7985712afb0ab4 (diff) | |
download | external_python_setuptools-e15ee4d46a55e7dbfc823e52edf143b77ce3a978.tar.gz external_python_setuptools-e15ee4d46a55e7dbfc823e52edf143b77ce3a978.tar.bz2 external_python_setuptools-e15ee4d46a55e7dbfc823e52edf143b77ce3a978.zip |
Add experimental 'install_data' support to 'bdist_egg'. The most common
distutils custom command hack in the field is to make 'install_data'
put data in with the target packages by changing the --install-data to
match --install-lib, so this should let bdist_egg work with more packages
"out of the box".
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041016
Diffstat (limited to 'setuptools/command/bdist_egg.py')
-rw-r--r-- | setuptools/command/bdist_egg.py | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py index e8309a71..a3aeb775 100644 --- a/setuptools/command/bdist_egg.py +++ b/setuptools/command/bdist_egg.py @@ -96,35 +96,18 @@ class bdist_egg(Command): f.close() - - - - - - - - - - - - - - - - - - - - - - - - - def run(self): if not self.skip_build: self.run_command('build') + if self.distribution.data_files: + install = self.reinitialize_command('install_data') + install.install_dir = self.bdist_dir + install.force = 0 + install.root = None + log.info("installing package data to %s" % self.bdist_dir) + self.run_command('install_data') + install = self.reinitialize_command('install_lib', reinit_subcommands=1) install.install_dir = self.bdist_dir install.skip_build = self.skip_build @@ -134,9 +117,10 @@ class bdist_egg(Command): install._mutate_outputs(self.distribution.has_ext_modules(), 'build_ext', 'build_lib', '') - log.info("installing to %s" % self.bdist_dir) + log.info("installing library code to %s" % self.bdist_dir) self.run_command('install_lib') + to_compile = [] for ext_name in ext_outputs: filename,ext = os.path.splitext(ext_name) @@ -174,6 +158,10 @@ class bdist_egg(Command): if not self.dry_run: self.distribution.metadata.write_pkg_info(self.egg_info) + + + + native_libs = os.path.join(self.egg_info,"native_libs.txt") if ext_outputs: log.info("writing %s" % native_libs) @@ -193,6 +181,8 @@ class bdist_egg(Command): if os.path.isfile(path): self.copy_file(path,os.path.join(egg_info,filename)) + + # Make the archive make_zipfile(pseudoinstall_root+'.egg', archive_root, verbose=self.verbose, @@ -203,6 +193,16 @@ class bdist_egg(Command): + + + + + + + + + + def make_zipfile (zip_filename, base_dir, verbose=0, dry_run=0): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" |