879df20df1df1b9cf16e29cb4a2836f4831f23d9,src/python/pants/backend/python/subsystems/pex_build_util.py,PexBuilderWrapper,add_resolved_requirements,#PexBuilderWrapper#Any#Any#,230

Before Change


    :param platforms: A list of :class:`Platform`s to resolve requirements for.
                      Defaults to the platforms specified by PythonSetup.
    
    distributions = self._resolve_distributions_by_platform(reqs, platforms=platforms)
    locations = set()
    for platform, dists in distributions.items():
      for dist in dists:
        if dist.location not in locations:
          self._log.debug(f"  Dumping distribution: .../{os.path.basename(dist.location)}")
          self.add_distribution(dist)
        locations.add(dist.location)

  def _resolve_multi(self, interpreter, requirements, platforms, find_links):
    Multi-platform dependency resolution for PEX files.

    Returns a list of distributions that must be included in order to satisfy a set of requirements.

After Change


    :param platforms: A list of platform strings to resolve requirements for.
                      Defaults to the platforms specified by PythonSetup.
    
    for resolved_dist in self.resolve_distributions(reqs, platforms=platforms):
      requirement = resolved_dist.requirement
      self._log.debug(f"  Dumping requirement: {requirement}")
      self._builder.add_requirement(str(requirement))

      distribution = resolved_dist.distribution
      self._log.debug(f"  Dumping distribution: .../{os.path.basename(distribution.location)}")
      self.add_distribution(distribution)

  def _resolve_multi(self, requirements, platforms=None, find_links=None):
    python_setup = self._python_setup_subsystem
    python_repos = self._python_repos_subsystem
    platforms = platforms or python_setup.platforms
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: pantsbuild/pants
Commit Name: 879df20df1df1b9cf16e29cb4a2836f4831f23d9
Time: 2019-12-08
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/python/subsystems/pex_build_util.py
Class Name: PexBuilderWrapper
Method Name: add_resolved_requirements


Project Name: pantsbuild/pants
Commit Name: c15e9b0930ea6ce6eef5be7c6c00b9ee2b706865
Time: 2020-02-21
Author: john.sirois@gmail.com
File Name: src/python/pants/python/pex_build_util.py
Class Name: PexBuilderWrapper
Method Name: add_resolved_requirements


Project Name: pantsbuild/pants
Commit Name: 879df20df1df1b9cf16e29cb4a2836f4831f23d9
Time: 2019-12-08
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/python/subsystems/pex_build_util.py
Class Name: PexBuilderWrapper
Method Name: add_resolved_requirements


Project Name: pantsbuild/pants
Commit Name: 9f236fd5795b60f8f75d77e20189dbeabc123814
Time: 2013-04-04
Author: benjy@foursquare.com
File Name: src/python/twitter/pants/tasks/java_compile.py
Class Name: JavaCompile
Method Name: execute_single_compilation


Project Name: pantsbuild/pants
Commit Name: 699600d95b2b30291b26b8051cc379c0452e8c25
Time: 2013-04-09
Author: markcc@foursquare.com
File Name: src/python/twitter/pants/tasks/java_compile.py
Class Name: JavaCompile
Method Name: execute_single_compilation