Skip to content

Commit

Permalink
Minor cleanup + rename alias to be standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Vital authored and Chris Livingston committed Jan 30, 2018
1 parent 4b64f2d commit b6fa385
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/python/pants/backend/python/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def build_file_aliases():
PythonBinary.alias(): PythonBinary,
PythonLibrary.alias(): PythonLibrary,
PythonTests.alias(): PythonTests,
PythonDistribution.alias(): TargetMacro.Factory.wrap(PythonDistribution.create, PythonDistribution),
'python_dist': PythonDistribution,
'python_requirement_library': PythonRequirementLibrary,
Resources.alias(): Resources,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ class PythonDistribution(Target):

default_sources_globs = '*.py'

@classmethod
def alias(cls):
return 'python_dist'

def __init__(self,
address=None,
payload=None,
Expand Down Expand Up @@ -64,8 +68,3 @@ def __init__(self,
PythonIdentity.parse_requirement(req)
except ValueError as e:
raise TargetDefinitionException(self, str(e))

@classmethod
def get_alias(cls):
return 'python_dist'

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def execute(self):

with self.invalidated(dist_targets, invalidate_dependents=True) as invalidation_check:
for vt in invalidation_check.all_vts:
built_dists.add(self._create_dist(vt.target)) # vt.results dir
built_dists.add(self._create_dist(vt.target))

self.context.products.register_data('python-dists', built_dists)

Expand Down

0 comments on commit b6fa385

Please sign in to comment.