mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:Fix calibre_postinstall not respecting the --prefix option and add a --no-compile option to the build command
This commit is contained in:
parent
c26f8933a5
commit
a4dd30cea5
@ -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)
|
||||
|
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user