def main(): options, args = get_options() if len(args) > 0: deps = [dep.strip() for dep in args[0].split(',')] else: deps = [] # check the provided values in the environ if 'LATEST_TAGS' in os.environ: raise ValueError("LATEST_TAGS is deprecated, use channels") # get the channel channel = get_channel(options) print("The current channel is %s." % channel) _buildapp(channel, deps, options.force)
def main(): options, args = get_options() if len(args) > 0: deps = [dep.strip() for dep in args[0].split(',')] else: deps = [] # check the provided values in the environ if 'LATEST_TAGS' in os.environ: raise ValueError("LATEST_TAGS is deprecated, use channels") # get the channel channel = get_channel(options) print("The current channel is %s." % channel) _buildapp(channel, deps, options.force, options.timeout, options.verbose, options.index, options.extras, options.download_cache)
def main(): """Build RPMs using PyPI2RPM and a pip-style req list""" extra_options = [[("-d", "--dist-dir"), { "dest": "dist_dir", "help": "Distributions directory", "default": None }], [("-r", "--remove-dir"), { "dest": "remove_dir", "action": "store_true", "default": False, "help": "Delete the target directory if it exists." }]] options, args = get_options(extra_options) if options.dist_dir is None: options.dist_dir = os.path.join(os.getcwd(), 'rpms') if os.path.exists(options.dist_dir): if options.remove_dir: # we want to clean up the dir before we start print('Removing existing directory.') shutil.rmtree(options.dist_dir) os.mkdir(options.dist_dir) else: os.mkdir(options.dist_dir) if len(args) > 0: deps = [dep.strip() for dep in args[0].split(',')] else: deps = [] # building the app first (this can be quick, just to refresh the channel in # case it's needed) build_app() # get the channel channel = get_channel(options) print('The current channel is %s.' % channel) _buildrpms(deps, channel, options)
def main(): """Build RPMs using PyPI2RPM and a pip-style req list""" extra_options = [[("-d", "--dist-dir"), {"dest": "dist_dir", "help": "Distributions directory", "default": None}], [("-r", "--remove-dir"), {"dest": "remove_dir", "action": "store_true", "default": False, "help": "Delete the target directory if it exists."}]] options, args = get_options(extra_options) if options.dist_dir is None: options.dist_dir = os.path.join(os.getcwd(), 'rpms') if os.path.exists(options.dist_dir): if options.remove_dir: # we want to clean up the dir before we start print('Removing existing directory.') shutil.rmtree(options.dist_dir) os.mkdir(options.dist_dir) else: os.mkdir(options.dist_dir) if len(args) > 0: deps = [dep.strip() for dep in args[0].split(',')] else: deps = [] # building the app first (this can be quick, just to refresh the channel in # case it's needed) build_app() # get the channel channel = get_channel(options) print('The current channel is %s.' % channel) _buildrpms(deps, channel, options)