IGN:Fix calibre_postinstall not respecting the --prefix option and add a --no-compile option to the build command

This commit is contained in:
Kovid Goyal 2009-09-12 14:58:15 -06:00
parent c26f8933a5
commit a4dd30cea5
2 changed files with 8 additions and 1 deletions

View File

@ -186,8 +186,13 @@ class Build(Command):
parser.add_option('-1', '--only', choices=choices, default='all',
help=('Build only the named extension. Available: '+
', '.join(choices)+'. Default:%default'))
parser.add_option('--no-compile', default=False, action='store_true',
help='Skip compiling all C/C++ extensions.')
def run(self, opts):
if opts.no_compile:
self.info('--no-compile specified, skipping compilation')
return
self.obj_dir = os.path.join(os.path.dirname(SRC), 'build', 'objects')
if not os.path.exists(self.obj_dir):
os.makedirs(self.obj_dir)

View File

@ -91,7 +91,9 @@ class Develop(Command):
pass
def run_postinstall(self):
subprocess.check_call(['calibre_postinstall'])
env = dict(**os.environ)
env['DESTDIR'] = self.prefix
subprocess.check_call(['calibre_postinstall', '--use-destdir'], env=env)
def success(self):
self.info('\nDevelopment environment successfully setup')