asda?‰PNG  IHDR ? f ??C1 sRGB ??é gAMA ±? üa pHYs ? ??o¨d GIDATx^íüL”÷e÷Y?a?("Bh?_ò???¢§?q5k?*:t0A-o??¥]VkJ¢M??f?±8\k2íll£1]q?ù???T check.py000064400000003066151027760060006204 0ustar00 def check_requirements(installed_dists): missing_reqs_dict = {} incompatible_reqs_dict = {} for dist in installed_dists: key = '%s==%s' % (dist.project_name, dist.version) missing_reqs = list(get_missing_reqs(dist, installed_dists)) if missing_reqs: missing_reqs_dict[key] = missing_reqs incompatible_reqs = list(get_incompatible_reqs( dist, installed_dists)) if incompatible_reqs: incompatible_reqs_dict[key] = incompatible_reqs return (missing_reqs_dict, incompatible_reqs_dict) def get_missing_reqs(dist, installed_dists): """Return all of the requirements of `dist` that aren't present in `installed_dists`. """ installed_names = set(d.project_name.lower() for d in installed_dists) missing_requirements = set() for requirement in dist.requires(): if requirement.project_name.lower() not in installed_names: missing_requirements.add(requirement) yield requirement def get_incompatible_reqs(dist, installed_dists): """Return all of the requirements of `dist` that are present in `installed_dists`, but have incompatible versions. """ installed_dists_by_name = {} for installed_dist in installed_dists: installed_dists_by_name[installed_dist.project_name] = installed_dist for requirement in dist.requires(): present_dist = installed_dists_by_name.get(requirement.project_name) if present_dist and present_dist not in requirement: yield (requirement, present_dist) __pycache__/freeze.cpython-36.opt-1.pyc000064400000005451151027760060013632 0ustar003 PfJ @sddlmZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl mZddlmZejeZddddddd dff d d ZdS) )absolute_importN)InstallRequirement) COMMENT_RE)get_installed_distributions) pkg_resources)canonicalize_name)RequirementParseErrorFc cs|pg}d} |rtj|j} g} x(tjD]} | jdr(| j| jdq(Wx|D]} d| krP| j| qPWx|D]} d| VqpWi} xXt |f|dD]F} yt j j | | }Wn$t k rtjd| jwYnX|| |j<qW|rvt}x|D]v}t|b}xX|D]N}|j sL|jjdsL| r@| |sL|jd!rr|j}||kr|j||Vq|jds|jdr|jdr|ddj}n|tddjjd}tj||||d}ntjtjd|j||d}|jstjd||jtjdnD|j| kr@tjd|tjd|jnt | |jjV| |j=qWWdQRXqWdVxszfreeze..)key) r rrrrrrrrrrr)$recompilesearchrZ working_setZ has_metadataextendZget_metadata_linesappendrpipZFrozenRequirementZ from_distrloggerZwarningZ project_namersetopenstrip startswithrstripaddlenlstriprZ from_editableZ from_linersubinfostrsortedvaluesr)Z requirementZ find_linksr r Z skip_regexrrrr Z skip_matchZdependency_linksZdistlinkZ installationsZreqZemitted_optionsZ req_file_pathZreq_filelineZline_reqZ installationr"r"r#freezes               r<)Z __future__rZloggingr&r+Zpip.reqrZpip.req.req_filerZ pip.utilsrZ pip._vendorrZpip._vendor.packaging.utilsrZpip._vendor.pkg_resourcesrZ getLogger__name__r,r<r"r"r"r#s        __pycache__/__init__.cpython-36.pyc000064400000000161151027760060013143 0ustar003 Pf@sdS)Nrrr/usr/lib/python3.6/__init__.pys__pycache__/__init__.cpython-36.opt-1.pyc000064400000000161151027760060014102 0ustar003 Pf@sdS)Nrrr/usr/lib/python3.6/__init__.pys__pycache__/freeze.cpython-36.pyc000064400000005451151027760060012673 0ustar003 PfJ @sddlmZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl mZddlmZejeZddddddd dff d d ZdS) )absolute_importN)InstallRequirement) COMMENT_RE)get_installed_distributions) pkg_resources)canonicalize_name)RequirementParseErrorFc cs|pg}d} |rtj|j} g} x(tjD]} | jdr(| j| jdq(Wx|D]} d| krP| j| qPWx|D]} d| VqpWi} xXt |f|dD]F} yt j j | | }Wn$t k rtjd| jwYnX|| |j<qW|rvt}x|D]v}t|b}xX|D]N}|j sL|jjdsL| r@| |sL|jd!rr|j}||kr|j||Vq|jds|jdr|jdr|ddj}n|tddjjd}tj||||d}ntjtjd|j||d}|jstjd||jtjdnD|j| kr@tjd|tjd|jnt | |jjV| |j=qWWdQRXqWdVxszfreeze..)key) r rrrrrrrrrrr)$recompilesearchrZ working_setZ has_metadataextendZget_metadata_linesappendrpipZFrozenRequirementZ from_distrloggerZwarningZ project_namersetopenstrip startswithrstripaddlenlstriprZ from_editableZ from_linersubinfostrsortedvaluesr)Z requirementZ find_linksr r Z skip_regexrrrr Z skip_matchZdependency_linksZdistlinkZ installationsZreqZemitted_optionsZ req_file_pathZreq_filelineZline_reqZ installationr"r"r#freezes               r<)Z __future__rZloggingr&r+Zpip.reqrZpip.req.req_filerZ pip.utilsrZ pip._vendorrZpip._vendor.packaging.utilsrZpip._vendor.pkg_resourcesrZ getLogger__name__r,r<r"r"r"r#s        __pycache__/check.cpython-36.opt-1.pyc000064400000002570151027760060013426 0ustar003 Pf6@sddZddZddZdS)cCsbi}i}xP|D]H}d|j|jf}tt||}|r<|||<tt||}|r|||<qW||fS)Nz%s==%s) project_nameversionlistget_missing_reqsget_incompatible_reqs)installed_distsZmissing_reqs_dictZincompatible_reqs_dictdistkeyZ missing_reqsZincompatible_reqsr /usr/lib/python3.6/check.pycheck_requirementss   r ccsLtdd|D}t}x.|jD]"}|jj|kr"|j||Vq"WdS)z\Return all of the requirements of `dist` that aren't present in `installed_dists`. css|]}|jjVqdS)N)rlower).0dr r r sz#get_missing_reqs..N)setrequiresrr add)rrZinstalled_namesZmissing_requirements requirementr r r rs  rccsTi}x|D]}|||j<q Wx2|jD]&}|j|j}|r&||kr&||fVq&WdS)zyReturn all of the requirements of `dist` that are present in `installed_dists`, but have incompatible versions. N)rrget)rrZinstalled_dists_by_nameZinstalled_distrZ present_distr r r r$s   rN)r rrr r r r s__pycache__/check.cpython-36.pyc000064400000002570151027760060012467 0ustar003 Pf6@sddZddZddZdS)cCsbi}i}xP|D]H}d|j|jf}tt||}|r<|||<tt||}|r|||<qW||fS)Nz%s==%s) project_nameversionlistget_missing_reqsget_incompatible_reqs)installed_distsZmissing_reqs_dictZincompatible_reqs_dictdistkeyZ missing_reqsZincompatible_reqsr /usr/lib/python3.6/check.pycheck_requirementss   r ccsLtdd|D}t}x.|jD]"}|jj|kr"|j||Vq"WdS)z\Return all of the requirements of `dist` that aren't present in `installed_dists`. css|]}|jjVqdS)N)rlower).0dr r r sz#get_missing_reqs..N)setrequiresrr add)rrZinstalled_namesZmissing_requirements requirementr r r rs  rccsTi}x|D]}|||j<q Wx2|jD]&}|j|j}|r&||kr&||fVq&WdS)zyReturn all of the requirements of `dist` that are present in `installed_dists`, but have incompatible versions. N)rrget)rrZinstalled_dists_by_nameZinstalled_distrZ present_distr r r r$s   rN)r rrr r r r sfreeze.py000064400000012112151027760060006377 0ustar00from __future__ import absolute_import import logging import re import pip from pip.req import InstallRequirement from pip.req.req_file import COMMENT_RE from pip.utils import get_installed_distributions from pip._vendor import pkg_resources from pip._vendor.packaging.utils import canonicalize_name from pip._vendor.pkg_resources import RequirementParseError logger = logging.getLogger(__name__) def freeze( requirement=None, find_links=None, local_only=None, user_only=None, skip_regex=None, default_vcs=None, isolated=False, wheel_cache=None, skip=()): find_links = find_links or [] skip_match = None if skip_regex: skip_match = re.compile(skip_regex).search dependency_links = [] for dist in pkg_resources.working_set: if dist.has_metadata('dependency_links.txt'): dependency_links.extend( dist.get_metadata_lines('dependency_links.txt') ) for link in find_links: if '#egg=' in link: dependency_links.append(link) for link in find_links: yield '-f %s' % link installations = {} for dist in get_installed_distributions(local_only=local_only, skip=(), user_only=user_only): try: req = pip.FrozenRequirement.from_dist( dist, dependency_links ) except RequirementParseError: logger.warning( "Could not parse requirement: %s", dist.project_name ) continue installations[req.name] = req if requirement: # the options that don't get turned into an InstallRequirement # should only be emitted once, even if the same option is in multiple # requirements files, so we need to keep track of what has been emitted # so that we don't emit it again if it's seen again emitted_options = set() for req_file_path in requirement: with open(req_file_path) as req_file: for line in req_file: if (not line.strip() or line.strip().startswith('#') or (skip_match and skip_match(line)) or line.startswith(( '-r', '--requirement', '-Z', '--always-unzip', '-f', '--find-links', '-i', '--index-url', '--pre', '--trusted-host', '--process-dependency-links', '--extra-index-url'))): line = line.rstrip() if line not in emitted_options: emitted_options.add(line) yield line continue if line.startswith('-e') or line.startswith('--editable'): if line.startswith('-e'): line = line[2:].strip() else: line = line[len('--editable'):].strip().lstrip('=') line_req = InstallRequirement.from_editable( line, default_vcs=default_vcs, isolated=isolated, wheel_cache=wheel_cache, ) else: line_req = InstallRequirement.from_line( COMMENT_RE.sub('', line).strip(), isolated=isolated, wheel_cache=wheel_cache, ) if not line_req.name: logger.info( "Skipping line in requirement file [%s] because " "it's not clear what it would install: %s", req_file_path, line.strip(), ) logger.info( " (add #egg=PackageName to the URL to avoid" " this warning)" ) elif line_req.name not in installations: logger.warning( "Requirement file [%s] contains %s, but that " "package is not installed", req_file_path, COMMENT_RE.sub('', line).strip(), ) else: yield str(installations[line_req.name]).rstrip() del installations[line_req.name] yield( '## The following requirements were added by ' 'pip freeze:' ) for installation in sorted( installations.values(), key=lambda x: x.name.lower()): if canonicalize_name(installation.name) not in skip: yield str(installation).rstrip() __init__.py000064400000000000151027760060006647 0ustar00