コード例 #1
0
ファイル: jar_dependency.py プロジェクト: sid-kap/pants
 def _compute_fingerprint(self):
   return stable_json_sha1(dict(name=self.name,
                                type_=self.type_,
                                ext=self.ext,
                                conf=self.conf,
                                url=self.url,
                                classifier=self.classifier))
コード例 #2
0
ファイル: jar_dependency.py プロジェクト: digwanderlust/pants
 def _compute_fingerprint(self):
   return stable_json_sha1(dict(name=self.name,
                                type_=self.type_,
                                ext=self.ext,
                                conf=self.conf,
                                url=self.url,
                                classifier=self.classifier))
コード例 #3
0
 def __init__(self, global_exclusions=None, global_pinned_versions=None):
     self._extra_fingerprint_digest = stable_json_sha1([
         sorted(list(global_exclusions or [])),
         {
             str(key): val
             for key, val in (global_pinned_versions or {}).items()
         },
     ])
コード例 #4
0
ファイル: jar_dependency.py プロジェクト: slyphon/pants
 def cache_key(self):
   return stable_json_sha1(dict(org=self.org,
                                name=self.name,
                                rev=self.rev,
                                force=self.force,
                                ext=self.ext,
                                url=self.url,
                                classifier=self.classifier,
                                transitive=self.transitive,
                                mutable=self.mutable))
コード例 #5
0
ファイル: jar_dependency.py プロジェクト: youprofit/pants
 def cache_key(self):
   return stable_json_sha1(dict(org=self.org,
                                name=self.name,
                                rev=self.rev,
                                force=self.force,
                                ext=self.ext,
                                url=self.url,
                                classifier=self.classifier,
                                transitive=self.transitive,
                                mutable=self.mutable))
コード例 #6
0
 def cache_key(self):
   excludes = [(e.org, e.name) for e in self.excludes]
   return stable_json_sha1(dict(org=self.org,
                                name=self.name,
                                rev=self.rev,
                                force=self.force,
                                ext=self.ext,
                                url=self.url,
                                classifier=self.classifier,
                                transitive=self.transitive,
                                mutable=self.mutable,
                                excludes=excludes,))
コード例 #7
0
ファイル: jar_dependency.py プロジェクト: lost-a-tooth/pants
 def cache_key(self):
   excludes = [(e.org, e.name) for e in self.excludes]
   return stable_json_sha1(dict(org=self.org,
                                name=self.name,
                                rev=self.rev,
                                force=self.force,
                                ext=self.ext,
                                url=self.url,
                                classifier=self.classifier,
                                transitive=self.transitive,
                                mutable=self.mutable,
                                excludes=excludes,))
コード例 #8
0
ファイル: artifact.py プロジェクト: cheister/pants
  def _compute_fingerprint(self):
    data = (self.org, self.name)

    # NB: The None occupies the legacy rev 3rd slot.  The rev was never populated and always None,
    # so maintaining the slot and its value just serve to preserve the fingerprint and thus
    # containing targets in caches out in the world.
    data += (None,)

    if self.publication_metadata:
      fingerprint = self.publication_metadata.fingerprint()
      if fingerprint:
        data += (fingerprint,)
    return stable_json_sha1(data)
コード例 #9
0
    def _compute_fingerprint(self):
        data = (self.org, self.name)

        # NB: The None occupies the legacy rev 3rd slot.  The rev was never populated and always None,
        # so maintaining the slot and its value just serve to preserve the fingerprint and thus
        # containing targets in caches out in the world.
        data += (None, )

        if self.publication_metadata:
            fingerprint = self.publication_metadata.fingerprint()
            if fingerprint:
                data += (fingerprint, )
        return stable_json_sha1(data)
コード例 #10
0
  def analysis_hash(self, reqs):
    hasher = sha1()
    reqs_hash = stable_json_sha1([sorted(list(reqs))])
    hasher.update(reqs_hash)

    # This adds the python version to the hash.
    venv_version_file = os.path.join(os.path.dirname(os.__file__), 'orig-prefix.txt')
    with open(venv_version_file, 'rb') as f:
      version_string = f.read()
      hasher.update(version_string)

    # Add virtualenv roots to the hash. Analysis should be redone if pointed at a new venv, even if all else the same.
    for venv in self.python_virtual_envs:
      hasher.update(venv)

    # Invalidate if pants changes.
    hasher.update(self.get_options().pants_version)
    hasher.update(self.get_options().cache_key_gen_version)

    # Invalidate the cache if the task version is bumped.
    hasher.update(str(self.implementation_version()))
    return hasher.hexdigest()
コード例 #11
0
ファイル: buildgen_python.py プロジェクト: boriskozak/fsqio
  def analysis_hash(self, reqs):
    hasher = sha1()
    reqs_hash = stable_json_sha1([sorted(list(reqs))])
    hasher.update(reqs_hash)

    # This adds the python version to the hash.
    venv_version_file = os.path.join(os.path.dirname(os.__file__), 'orig-prefix.txt')
    with open(venv_version_file, 'rb') as f:
      version_string = f.read()
      hasher.update(version_string)

    # Add virtualenv roots to the hash. Analysis should be redone if pointed at a new venv, even if all else the same.
    for venv in self.python_virtual_envs:
      hasher.update(venv)

    # Invalidate if pants changes.
    hasher.update(self.get_options().pants_version)
    hasher.update(self.get_options().cache_key_gen_version)

    # Invalidate the cache if the task version is bumped.
    hasher.update(str(self.implementation_version()))
    return hasher.hexdigest()
コード例 #12
0
 def compute_fingerprint(self, target):
   return stable_json_sha1(sorted(target.tags))
コード例 #13
0
ファイル: doc.py プロジェクト: lahosken/pants
 def fingerprint(self):
   # TODO: url_builder is not a part of fingerprint.
   return stable_json_sha1(self.name)
コード例 #14
0
ファイル: prepare_services.py プロジェクト: sid-kap/pants
 def compute_fingerprint(self, target):
     return stable_json_sha1(target.services)
コード例 #15
0
 def fingerprint(self):
     # TODO: url_builder is not a part of fingerprint.
     return stable_json_sha1(self.name)
コード例 #16
0
 def fingerprint(self):
     return combine_hashes(
         [self.wiki.fingerprint(),
          stable_json_sha1(self.config)])
コード例 #17
0
ファイル: artifact.py プロジェクト: rogerswingle/pants
 def _compute_fingerprint(self):
     return stable_json_sha1((self.org, self.name, self.rev))
コード例 #18
0
ファイル: artifact.py プロジェクト: Yasumoto/pants
 def _compute_fingerprint(self):
   return stable_json_sha1((self.org, self.name, self.rev))
コード例 #19
0
ファイル: test_resources_task.py プロジェクト: xeno-by/pants
 def compute_fingerprint(self, target):
   return stable_json_sha1(sorted(target.tags))
コード例 #20
0
ファイル: pom_resolve.py プロジェクト: boriskozak/fsqio
 def __init__(self, global_exclusions=None, global_pinned_versions=None):
   self._extra_fingerprint_digest = stable_json_sha1([
     sorted(list(global_exclusions or [])),
     {str(key): val for key, val in (global_pinned_versions or {}).items()},
   ])
コード例 #21
0
ファイル: doc.py プロジェクト: lahosken/pants
 def fingerprint(self):
   return combine_hashes([self.wiki.fingerprint(), stable_json_sha1(self.config)])
コード例 #22
0
ファイル: prepare_services.py プロジェクト: areitz/pants
 def compute_fingerprint(self, target):
   return stable_json_sha1(target.services)