setup.py
def run(self):
        """Peform build."""
        for (package, source, target, extra_args) in self.meteor_builds:
            src_dir = self.get_package_dir(package)
            # convert UNIX-style paths to directory names
            project_dir = self.path_to_dir(src_dir, source)
            target_dir = self.path_to_dir(src_dir, target)
            output_dir = self.path_to_dir(
                os.path.abspath(SETUP_DIR if self.inplace else self.build_lib),
                target_dir,
            )
            # construct command line.
            cmdline = [self.meteor, 'build', '--directory', output_dir]
            no_prune_npm = self.no_prune_npm
            if extra_args[:1] == ['--no-prune-npm']:
                no_prune_npm = True
                extra_args[:1] = []
            if self.meteor_debug and '--debug' not in cmdline:
                cmdline.append('--debug')
            cmdline.extend(extra_args)
            # execute command
            log.info(
                'building meteor app %r (%s)', project_dir, ' '.join(cmdline),
            )
            subprocess.check_call(cmdline, cwd=project_dir)
            if not no_prune_npm:
                # django-ddp doesn't use bundle/programs/server/npm cruft
                npm_build_dir = os.path.join(
                    output_dir, 'bundle', 'programs', 'server', 'npm',
                )
                log.info('pruning meteor npm build %r', npm_build_dir)
                shutil.rmtree(npm_build_dir)
def run(self):
        for (package, source, target, extra_args) in self.meteor_builds:
            src_dir = self.get_package_dir(package)
            # convert UNIX-style paths to directory names
            project_dir = self.path_to_dir(src_dir, source)
            target_dir = self.path_to_dir(src_dir, target)
            output_dir = self.path_to_dir(
                os.path.abspath(SETUP_DIR if self.inplace else self.build_lib),
                target_dir,
            )
            # construct command line.
            cmdline = [self.meteor, 'build', '--directory', output_dir]
            no_prune_npm = self.no_prune_npm
            if extra_args[:1] == ['--no-prune-npm']:
                no_prune_npm = True
                extra_args[:1] = []
            if self.meteor_debug and '--debug' not in cmdline:
                cmdline.append('--debug')
            cmdline.extend(extra_args)
            # execute command
            log.info(
                'building meteor app %r (%s)', project_dir, ' '.join(cmdline),
            )
            subprocess.check_call(cmdline, cwd=project_dir)
            if not no_prune_npm:
                # django-ddp doesn't use bundle/programs/server/npm cruft
                npm_build_dir = os.path.join(
                    output_dir, 'bundle', 'programs', 'server', 'npm',
                )
                log.info('pruning meteor npm build %r', npm_build_dir)
                shutil.rmtree(npm_build_dir)
def run ( self ) : for ( package , source , target , extra_args ) in self . meteor_builds : src_dir = self . get_package_dir ( package ) # convert UNIX-style paths to directory names project_dir = self . path_to_dir ( src_dir , source ) target_dir = self . path_to_dir ( src_dir , target ) output_dir = self . path_to_dir ( os . path . abspath ( SETUP_DIR if self . inplace else self . build_lib ) , target_dir , ) # construct command line. cmdline = [ self . meteor , 'build' , '--directory' , output_dir ] no_prune_npm = self . no_prune_npm if extra_args [ : 1 ] == [ '--no-prune-npm' ] : no_prune_npm = True extra_args [ : 1 ] = [ ] if self . meteor_debug and '--debug' not in cmdline : cmdline . append ( '--debug' ) cmdline . extend ( extra_args ) # execute command log . info ( 'building meteor app %r (%s)' , project_dir , ' ' . join ( cmdline ) , ) subprocess . check_call ( cmdline , cwd = project_dir ) if not no_prune_npm : # django-ddp doesn't use bundle/programs/server/npm cruft npm_build_dir = os . path . join ( output_dir , 'bundle' , 'programs' , 'server' , 'npm' , ) log . info ( 'pruning meteor npm build %r' , npm_build_dir ) shutil . rmtree ( npm_build_dir )
Peform build.
Peform build .