def __init__(self, basedir, version="1.0.dev0", name=None, offline=False): self.name = name self._version = None self._dist_version = None self.offline = offline self.version = version self.basedir = ap(basedir) if not self.name: self.name = basename(basedir) self.default_task = None self.summary = "" self.home_page = "" self.description = "" self.author = "" self.authors = [] self.license = "" self.url = "" self._requires_python = "" self._obsoletes = [] self._explicit_namespaces = [] self._properties = {"verbose": False} self._install_dependencies = set() self._build_dependencies = set() self._plugin_dependencies = set() self._manifest_included_files = [] self._manifest_included_directories = [] self._package_data = OrderedDict() self._files_to_install = [] self._preinstall_script = None self._postinstall_script = None
def _override_python_env_for_coverage(current_python_env, coverage_config, source_path, omit_patterns): import coverage as cov_module cov_parent_dir = ap(jp(dirname(cov_module.__file__), "..")) new_python_env = copy.copy(current_python_env) new_python_env.overwrite( "executable", tuple( current_python_env.executable + [ ap( jp( dirname(sys.modules[_override_python_env_for_coverage. __module__].__file__), "_coverage_shim.py")), repr( { "cov_parent_dir": cov_parent_dir, "cov_kwargs": coverage_config, "cov_source_path": source_path, "cov_omit_patterns": omit_patterns, }, ) ], )) return new_python_env