def finalize_options(self):
        self.set_undefined_options('build', ('build_exe', 'build_exe'))
        self.optimize = int(self.optimize)

        if self.silent is None:
            self.silent = False

        # Make sure all options of multiple values are lists
        for option in self.list_options:
            setattr(self, option, normalize_to_list(getattr(self, option)))
Exemple #2
0
    def finalize_options(self):
        self.set_undefined_options('build', ('build_exe', 'build_exe'))
        self.optimize = int(self.optimize)

        if self.silent is None:
            self.silent = False

        # Make sure all options of multiple values are lists
        for option in self.list_options:
            setattr(self, option, normalize_to_list(getattr(self, option)))
Exemple #3
0
def parse_command_line(parser):
    args = parser.parse_args()
    if args.script is None and args.includes is None:
        parser.error("script or a list of modules must be specified")
    if args.script is None and args.target_name is None:
        parser.error("script or a target name must be specified")
    args.excludes = normalize_to_list(args.excludes)
    args.includes = normalize_to_list(args.includes)
    args.packages = normalize_to_list(args.packages)
    args.zip_include_packages = normalize_to_list(args.zip_include_packages)
    args.zip_exclude_packages = normalize_to_list(args.zip_exclude_packages)
    replace_paths = []
    if args.replace_paths:
        for directive in args.replace_paths.split(os.pathsep):
            from_path, replacement = directive.split("=")
            replace_paths.append((from_path, replacement))
    args.replace_paths = replace_paths
    if args.default_path is not None:
        sys.path = [p for mp in args.default_path for p in mp.split(os.pathsep)]
    if args.include_path is not None:
        paths = [p for mp in args.include_path for p in mp.split(os.pathsep)]
        sys.path = paths + sys.path
    if args.script is not None:
        sys.path.insert(0, os.path.dirname(args.script))
    args.include_files = normalize_to_list(args.include_files)
    zip_includes = []
    if args.zip_includes:
        for spec in args.zip_includes:
            if "=" in spec:
                zip_includes.append(spec.split("=", 1))
            else:
                zip_includes.append(spec)
    args.zip_includes = zip_includes
    return args
Exemple #4
0
 def finalize_options(self):
     # Make sure all options of multiple values are lists
     for option in self.list_options:
         setattr(self, option, normalize_to_list(getattr(self, option)))
     for item in self.plist_items:
         if not isinstance(item, tuple) or len(item) != 2:
             raise Exception(
                 "Error, plist_items must be a list of key, value pairs "
                 "(List[Tuple[str, str]]) (bad list item).")
     if self.rpath_lib_folder is not None:
         warnings.warn(
             "rpath-lib-folder is obsolete and will be removed in the "
             "next major version")
Exemple #5
0
def parse_command_line(parser):
    args = parser.parse_args()
    args.excludes = normalize_to_list(args.excludes)
    args.includes = normalize_to_list(args.includes)
    args.packages = normalize_to_list(args.packages)
    args.zip_include_packages = normalize_to_list(args.zip_include_packages)
    args.zip_exclude_packages = normalize_to_list(args.zip_exclude_packages)
    replace_paths = []
    if args.default_path is not None:
        sys.path = [p for mp in args.default_path for p in mp.split(os.pathsep)]
    if args.include_path is not None:
        paths = [p for mp in args.include_path for p in mp.split(os.pathsep)]
        sys.path = paths + sys.path
    sys.path.insert(0, os.path.dirname(MAIN))
    args.include_files = normalize_to_list(args.include_files)
    return args
Exemple #6
0
 def finalize_options(self):
     self.include_frameworks = normalize_to_list(self.include_frameworks)
Exemple #7
0
 def finalize_options(self):
     self.include_frameworks = normalize_to_list(self.include_frameworks)