Skip to content

Commit

Permalink
Merge branch 'master' into dmcclanahan/python-dist-c++-sources
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Feb 13, 2018
2 parents badd80f + 569f14c commit 608769e
Show file tree
Hide file tree
Showing 80 changed files with 1,329 additions and 2,013 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
.factorypath
.python
.pydevproject
.pytest_cache/
build/
codegen/classes/
htmlcov/
Expand Down
4 changes: 2 additions & 2 deletions BUILD.tools
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jar_library(name = 'scrooge-linter',
# for more info.
jar_library(
name='kythe-extractor',
jars = [jar(org='kythe', name='extractors/javac_extractor', rev='v0.0.26-snowchain3')]
jars = [jar(org='kythe', name='javac_extractor', rev='v0.0.26.5-snowchain037-82964297aef')]
)

jar_library(
name='kythe-indexer',
jars = [jar(org='kythe', name='indexers/java_indexer', rev='v0.0.26-snowchain3')]
jars = [jar(org='kythe', name='java_indexer', rev='v0.0.26.5-snowchain037-82964297aef')]
)

# Runtime dependencies for the Avro Java generated code.
Expand Down
5 changes: 3 additions & 2 deletions build-support/bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function run_local_pants() {
# NB: Pants core does not have the ability to change its own version, so we compute the
# suffix here and mutate the VERSION_FILE to affect the current version.
readonly HEAD_SHA=$(git rev-parse --verify HEAD)
readonly PANTS_STABLE_VERSION="$(run_local_pants --version 2>/dev/null)"
readonly PANTS_STABLE_VERSION="$(cat "${ROOT}/src/python/pants/VERSION")"
readonly PANTS_UNSTABLE_VERSION="${PANTS_STABLE_VERSION}+${HEAD_SHA:0:8}"

readonly DEPLOY_DIR="${ROOT}/dist/deploy"
Expand Down Expand Up @@ -764,7 +764,7 @@ function usage() {
fi
}

while getopts "hdntcloep" opt; do
while getopts "hdntcloepw" opt; do
case ${opt} in
h) usage ;;
d) debug="true" ;;
Expand All @@ -774,6 +774,7 @@ while getopts "hdntcloep" opt; do
o) list_owners ; exit $? ;;
e) fetch_and_check_prebuilt_wheels ; exit $? ;;
p) build_pex ; exit $? ;;
w) list_prebuilt_wheels ; exit $? ;;
*) usage "Invalid option: -${OPTARG}" ;;
esac
done
Expand Down
4 changes: 2 additions & 2 deletions build-support/ivy/ivysettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Licensed under the Apache License, Version 2.0 (see LICENSE).
<property name="m2.repo.artifact"
value="${m2.repo.relpath}/[artifact](-[classifier])-[revision].[ext]"/>
<property name="m2.repo.dir" value="${user.home}/.m2/repository" override="false"/>
<property name="kythe.artifact" value="[organization]-[revision]/[artifact].[ext]"/>
<property name="kythe.artifact" value="[organisation]/[artifact]/[revision]/[artifact]-[revision].[ext]"/>
<!-- for retrieving jacoco snapshot, remove when a version containing cli is released -->
<!-- see https://github.com/pantsbuild/pants/issues/5010 -->
<property name="sonatype.nexus.snapshots.url" value="https://oss.sonatype.org/content/repositories/snapshots/" />
Expand Down Expand Up @@ -70,7 +70,7 @@ Licensed under the Apache License, Version 2.0 (see LICENSE).

<!-- Custom repo for Kythe jars, as Google don't currently publish them anywhere. -->
<url name="benjyw/binhost">
<artifact pattern="https://github.com/benjyw/binhost/raw/99702052db865e0229998afbf19b5503d11225d3/[organisation]/${kythe.artifact}" />
<artifact pattern="https://github.com/benjyw/binhost/raw/master/${kythe.artifact}" />
</url>
</chain>
</resolvers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from pants.backend.jvm.tasks.nailgun_task import NailgunTask
from pants.util.dirutil import safe_mkdir

from pants.contrib.codeanalysis.tasks.indexable_java_targets import IndexableJavaTargets


class BundleEntries(NailgunTask):
@classmethod
Expand All @@ -33,9 +31,7 @@ def execute(self):
if archive == 'none':
return

indexable_targets = IndexableJavaTargets.global_instance().get(self.context)
for tgt in indexable_targets:
entries = self.context.products.get_data('kythe_entries_files', dict)[tgt]
for tgt, entries in self.context.products.get_data('kythe_entries_files', dict).items():
kythe_distdir = os.path.join(self.get_options().pants_distdir, 'kythe')
safe_mkdir(kythe_distdir)
uncompressed_kythe_distpath = os.path.join(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def subsystem_dependencies(cls):
@classmethod
def implementation_version(cls):
# Bump this version to invalidate all past artifacts generated by this task.
return super(IndexJava, cls).implementation_version() + [('IndexJava', 7), ]
return super(IndexJava, cls).implementation_version() + [('IndexJava', 8), ]

@classmethod
def product_types(cls):
Expand Down Expand Up @@ -72,7 +72,7 @@ def _index(self, vt, indexer_cp, jvm_options):
kindex_file = self.context.products.get_data('kindex_files').get(vt.target)
if not kindex_file:
raise TaskError('No .kindex file found for {}'.format(vt.target.address.spec))
args = [kindex_file, '--out', self._entries_file(vt)]
args = [kindex_file, '--emit_jvm', 'semantic', '--out', self._entries_file(vt)]
result = self.runjava(classpath=indexer_cp, main=self._KYTHE_INDEXER_MAIN,
jvm_options=jvm_options,
args=args, workunit_name='kythe-index',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ contrib_plugin(
name='plugin',
dependencies=[
'contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle:all',
'contrib/python/src/python/pants/contrib/python/checks/tasks:python',
'contrib/python/src/python/pants/contrib/python/checks/tasks',
'contrib/python/src/python/pants/contrib/python/checks/tasks2',
'src/python/pants/goal:task_registrar',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

from pants.goal.task_registrar import TaskRegistrar as task

from pants.contrib.python.checks.tasks2.python_eval import PythonEval
from pants.contrib.python.checks.tasks.checkstyle.checker import PythonCheckStyleTask
from pants.contrib.python.checks.tasks.python_eval import PythonEval


def register_goals():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Licensed under the Apache License, Version 2.0 (see LICENSE).

python_library(
name='python',
dependencies=[
':resources',
'src/python/pants/backend/python/targets:python',
Expand Down
Loading

0 comments on commit 608769e

Please sign in to comment.