diff --git a/.travis.yml b/.travis.yml index 7aab4e17836..7c72b5e3b31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -245,7 +245,6 @@ matrix: - sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64 - sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64 - jdk_switcher use oraclejdk - - sudo rm ~/.cache/pants/python_cache/requirements/CPython-2.7.14/superhello* env: - SHARD="Python integration tests for pants - shard 1" script: @@ -272,7 +271,6 @@ matrix: - sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64 - sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64 - jdk_switcher use oraclejdk8 - - sudo rm ~/.cache/pants/python_cache/requirements/CPython-2.7.14/superhello* env: - SHARD="Python integration tests for pants - shard 2" script: diff --git a/examples/src/python/example/python_distribution/hello/superhello/BUILD b/examples/src/python/example/python_distribution/hello/fasthello/BUILD similarity index 91% rename from examples/src/python/example/python_distribution/hello/superhello/BUILD rename to examples/src/python/example/python_distribution/hello/fasthello/BUILD index 3d71162afb8..a80cba71451 100644 --- a/examples/src/python/example/python_distribution/hello/superhello/BUILD +++ b/examples/src/python/example/python_distribution/hello/fasthello/BUILD @@ -5,7 +5,7 @@ # python_dist allows you to use setup.py to depend on C/C++ extensions. python_dist( - name='superhello', + name='fasthello', sources=[ 'super_greet.c', 'hello_package/hello.py', @@ -18,6 +18,6 @@ python_binary( name='main', source='main.py', dependencies=[ - ':superhello', + ':fasthello', ] ) diff --git a/examples/src/python/example/python_distribution/hello/superhello/hello_package/__init__.py b/examples/src/python/example/python_distribution/hello/fasthello/hello_package/__init__.py similarity index 100% rename from examples/src/python/example/python_distribution/hello/superhello/hello_package/__init__.py rename to examples/src/python/example/python_distribution/hello/fasthello/hello_package/__init__.py diff --git a/examples/src/python/example/python_distribution/hello/superhello/hello_package/hello.py b/examples/src/python/example/python_distribution/hello/fasthello/hello_package/hello.py similarity index 100% rename from examples/src/python/example/python_distribution/hello/superhello/hello_package/hello.py rename to examples/src/python/example/python_distribution/hello/fasthello/hello_package/hello.py diff --git a/examples/src/python/example/python_distribution/hello/superhello/main.py b/examples/src/python/example/python_distribution/hello/fasthello/main.py similarity index 83% rename from examples/src/python/example/python_distribution/hello/superhello/main.py rename to examples/src/python/example/python_distribution/hello/fasthello/main.py index a16f3e8597d..badaa78a22e 100644 --- a/examples/src/python/example/python_distribution/hello/superhello/main.py +++ b/examples/src/python/example/python_distribution/hello/fasthello/main.py @@ -5,7 +5,7 @@ from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) -# hello_package is a python module within the superhello python_distribution +# hello_package is a python module within the fasthello python_distribution from hello_package import hello diff --git a/examples/src/python/example/python_distribution/hello/superhello/setup.py b/examples/src/python/example/python_distribution/hello/fasthello/setup.py similarity index 96% rename from examples/src/python/example/python_distribution/hello/superhello/setup.py rename to examples/src/python/example/python_distribution/hello/fasthello/setup.py index 5fabb152818..f7d72491658 100644 --- a/examples/src/python/example/python_distribution/hello/superhello/setup.py +++ b/examples/src/python/example/python_distribution/hello/fasthello/setup.py @@ -12,7 +12,7 @@ c_module = Extension(str('super_greet'), sources=[str('super_greet.c')]) setup( - name='superhello', + name='fasthello', version='1.0.0', ext_modules=[c_module], packages=find_packages(), diff --git a/examples/src/python/example/python_distribution/hello/superhello/super_greet.c b/examples/src/python/example/python_distribution/hello/fasthello/super_greet.c similarity index 100% rename from examples/src/python/example/python_distribution/hello/superhello/super_greet.c rename to examples/src/python/example/python_distribution/hello/fasthello/super_greet.c diff --git a/examples/tests/python/example/python_distribution/hello/test_superhello/BUILD b/examples/tests/python/example/python_distribution/hello/test_superhello/BUILD index 2717185f1c3..0b7a6ba9fb9 100644 --- a/examples/tests/python/example/python_distribution/hello/test_superhello/BUILD +++ b/examples/tests/python/example/python_distribution/hello/test_superhello/BUILD @@ -4,11 +4,11 @@ # Example of defining a test target that depends on a python_dist target. python_tests( - name='superhello', + name='fasthello', sources=[ - 'test_superhello.py' + 'test_fasthello.py' ], dependencies=[ - 'examples/src/python/example/python_distribution/hello/superhello:superhello' + 'examples/src/python/example/python_distribution/hello/fasthello:fasthello' ] ) diff --git a/examples/tests/python/example/python_distribution/hello/test_superhello/test_superhello.py b/examples/tests/python/example/python_distribution/hello/test_superhello/test_superhello.py index af42d21a1c2..31ec7fc4925 100644 --- a/examples/tests/python/example/python_distribution/hello/test_superhello/test_superhello.py +++ b/examples/tests/python/example/python_distribution/hello/test_superhello/test_superhello.py @@ -5,10 +5,10 @@ from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) -# hello_package is a python module within the superhello python_distribution. +# hello_package is a python module within the fasthello python_distribution. from hello_package import hello # Example of writing a test that depends on a python_dist target. -def test_superhello(): +def test_fasthello(): assert hello.hello() == "Super hello" diff --git a/testprojects/src/python/python_distribution/superhello_with_install_requires/BUILD b/testprojects/src/python/python_distribution/fasthello_with_install_requires/BUILD similarity index 90% rename from testprojects/src/python/python_distribution/superhello_with_install_requires/BUILD rename to testprojects/src/python/python_distribution/fasthello_with_install_requires/BUILD index bfd754e18f7..187f0fac777 100644 --- a/testprojects/src/python/python_distribution/superhello_with_install_requires/BUILD +++ b/testprojects/src/python/python_distribution/fasthello_with_install_requires/BUILD @@ -3,7 +3,7 @@ python_dist( - name='superhello', + name='fasthello', sources=[ 'super_greet.c', 'hello_package/hello.py', @@ -16,7 +16,7 @@ python_binary( name='main_with_no_conflict', source='main.py', dependencies=[ - ':superhello', + ':fasthello', ] ) @@ -24,7 +24,7 @@ python_binary( name='main_with_conflicting_dep', source='main.py', dependencies=[ - ':superhello', + ':fasthello', ':pycountry' ] ) diff --git a/testprojects/src/python/python_distribution/superhello_with_install_requires/hello_package/__init__.py b/testprojects/src/python/python_distribution/fasthello_with_install_requires/hello_package/__init__.py similarity index 100% rename from testprojects/src/python/python_distribution/superhello_with_install_requires/hello_package/__init__.py rename to testprojects/src/python/python_distribution/fasthello_with_install_requires/hello_package/__init__.py diff --git a/testprojects/src/python/python_distribution/superhello_with_install_requires/hello_package/hello.py b/testprojects/src/python/python_distribution/fasthello_with_install_requires/hello_package/hello.py similarity index 100% rename from testprojects/src/python/python_distribution/superhello_with_install_requires/hello_package/hello.py rename to testprojects/src/python/python_distribution/fasthello_with_install_requires/hello_package/hello.py diff --git a/testprojects/src/python/python_distribution/superhello_with_install_requires/main.py b/testprojects/src/python/python_distribution/fasthello_with_install_requires/main.py similarity index 100% rename from testprojects/src/python/python_distribution/superhello_with_install_requires/main.py rename to testprojects/src/python/python_distribution/fasthello_with_install_requires/main.py diff --git a/testprojects/src/python/python_distribution/superhello_with_install_requires/setup.py b/testprojects/src/python/python_distribution/fasthello_with_install_requires/setup.py similarity index 96% rename from testprojects/src/python/python_distribution/superhello_with_install_requires/setup.py rename to testprojects/src/python/python_distribution/fasthello_with_install_requires/setup.py index 2d7684c05d2..57e5c52bf3a 100644 --- a/testprojects/src/python/python_distribution/superhello_with_install_requires/setup.py +++ b/testprojects/src/python/python_distribution/fasthello_with_install_requires/setup.py @@ -12,7 +12,7 @@ c_module = Extension(str('super_greet'), sources=[str('super_greet.c')]) setup( - name='superhello', + name='fasthello', version='1.0.0', ext_modules=[c_module], packages=find_packages(), diff --git a/testprojects/src/python/python_distribution/superhello_with_install_requires/super_greet.c b/testprojects/src/python/python_distribution/fasthello_with_install_requires/super_greet.c similarity index 100% rename from testprojects/src/python/python_distribution/superhello_with_install_requires/super_greet.c rename to testprojects/src/python/python_distribution/fasthello_with_install_requires/super_greet.c diff --git a/tests/python/pants_test/backend/python/tasks/test_python_distribution_integration.py b/tests/python/pants_test/backend/python/tasks/test_python_distribution_integration.py index ccbe5752e75..d37c63d2721 100644 --- a/tests/python/pants_test/backend/python/tasks/test_python_distribution_integration.py +++ b/tests/python/pants_test/backend/python/tasks/test_python_distribution_integration.py @@ -15,12 +15,12 @@ class PythonDistributionIntegrationTest(PantsRunIntegrationTest): # The paths to both a project containing a simple C extension (to be packaged into a # whl by setup.py) and an associated test to be consumed by the pants goals tested below. - superhello_project = 'examples/src/python/example/python_distribution/hello/superhello' - superhello_tests = 'examples/tests/python/example/python_distribution/hello/test_superhello' - superhello_install_requires = 'testprojects/src/python/python_distribution/superhello_with_install_requires' + fasthello_project = 'examples/src/python/example/python_distribution/hello/fasthello' + fasthello_tests = 'examples/tests/python/example/python_distribution/hello/test_fasthello' + fasthello_install_requires = 'testprojects/src/python/python_distribution/fasthello_with_install_requires' def test_pants_binary(self): - command=['binary', '{}:main'.format(self.superhello_project)] + command=['binary', '{}:main'.format(self.fasthello_project)] pants_run = self.run_pants(command=command) self.assert_success(pants_run) # Check that the pex was built. @@ -33,23 +33,23 @@ def test_pants_binary(self): os.remove(pex) def test_pants_run(self): - command=['run', '{}:main'.format(self.superhello_project)] + command=['run', '{}:main'.format(self.fasthello_project)] pants_run = self.run_pants(command=command) self.assert_success(pants_run) # Check that text was properly printed to stdout. self.assertIn('Super hello', pants_run.stdout_data) def test_pants_test(self): - command=['test', '{}:superhello'.format(self.superhello_tests)] + command=['test', '{}:fasthello'.format(self.fasthello_tests)] pants_run = self.run_pants(command=command) self.assert_success(pants_run) def test_with_install_requires(self): - command=['run', '{}:main_with_no_conflict'.format(self.superhello_install_requires)] + command=['run', '{}:main_with_no_conflict'.format(self.fasthello_install_requires)] pants_run = self.run_pants(command=command) self.assert_success(pants_run) self.assertIn('United States', pants_run.stdout_data) - command=['binary', '{}:main_with_no_conflict'.format(self.superhello_install_requires)] + command=['binary', '{}:main_with_no_conflict'.format(self.fasthello_install_requires)] pants_run = self.run_pants(command=command) self.assert_success(pants_run) pex = os.path.join(get_buildroot(), 'dist', 'main_with_no_conflict.pex') @@ -58,13 +58,13 @@ def test_with_install_requires(self): os.remove(pex) def test_with_conflicting_transitive_deps(self): - command=['run', '{}:main_with_conflicting_dep'.format(self.superhello_install_requires)] + command=['run', '{}:main_with_conflicting_dep'.format(self.fasthello_install_requires)] pants_run = self.run_pants(command=command) self.assert_failure(pants_run) self.assertIn('pycountry', pants_run.stderr_data) - self.assertIn('superhello', pants_run.stderr_data) - command=['binary', '{}:main_with_conflicting_dep'.format(self.superhello_install_requires)] + self.assertIn('fasthello', pants_run.stderr_data) + command=['binary', '{}:main_with_conflicting_dep'.format(self.fasthello_install_requires)] pants_run = self.run_pants(command=command) self.assert_failure(pants_run) self.assertIn('pycountry', pants_run.stderr_data) - self.assertIn('superhello', pants_run.stderr_data) + self.assertIn('fasthello', pants_run.stderr_data) diff --git a/tests/python/pants_test/projects/test_testprojects_integration.py b/tests/python/pants_test/projects/test_testprojects_integration.py index eac32b7767d..41624a86638 100644 --- a/tests/python/pants_test/projects/test_testprojects_integration.py +++ b/tests/python/pants_test/projects/test_testprojects_integration.py @@ -65,7 +65,7 @@ def targets(self): 'testprojects/tests/java/org/pantsbuild/testproject/depman:old-tests', 'testprojects/tests/java/org/pantsbuild/testproject/htmlreport:htmlreport', 'testprojects/tests/java/org/pantsbuild/testproject/parallel.*', - 'testprojects/src/python/python_distribution/superhello_with_install_requires.*' + 'testprojects/src/python/python_distribution/fasthello_with_install_requires.*' ] # May not succeed without java8 installed