diff --git a/3rdparty/python/constraints.txt b/3rdparty/python/constraints.txt new file mode 100644 index 00000000000..0aa3c7b4354 --- /dev/null +++ b/3rdparty/python/constraints.txt @@ -0,0 +1,33 @@ +# Generated by build-support/bin/generate_lockfile.sh on Mon Aug 10 13:36:18 EDT 2020 +ansicolors==1.1.8 +beautifulsoup4==4.6.3 +certifi==2020.6.20 +cffi==1.14.1 +chardet==3.0.4 +cryptography==3.0 +dataclasses==0.6 +fasteners==0.15 +idna==2.10 +monotonic==1.5 +mypy==0.782 +mypy-extensions==0.4.3 +packaging==20.4 +pathspec==0.8.0 +pex==2.1.14 +pip==19.0.3 +psutil==5.7.0 +pycparser==2.20 +pyOpenSSL==19.1.0 +pyparsing==2.4.7 +pystache==0.5.4 +python-Levenshtein==0.12.0 +PyYAML==5.3.1 +requests==2.24.0 +setproctitle==1.1.10 +setuptools==49.2.0 +six==1.15.0 +toml==0.10.1 +typed-ast==1.4.1 +typing-extensions==3.7.4.2 +urllib3==1.25.10 +www-authenticate==0.9.2 diff --git a/build-support/bin/generate_lockfile.sh b/build-support/bin/generate_lockfile.sh new file mode 100755 index 00000000000..9ee4195b955 --- /dev/null +++ b/build-support/bin/generate_lockfile.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -euo pipefail + +constraints_file=3rdparty/python/constraints.txt + +VENV=$(mktemp -d -t pants_lockfile_venv.XXXXX) +python3 -m venv "${VENV}" +"${VENV}/bin/pip" install -r <(./pants --tag=-lockfile_ignore dependencies --type=3rdparty ::) +echo "# Generated by build-support/bin/generate_lockfile.sh on $(date)" > "${constraints_file}" +"${VENV}/bin/pip" freeze --all >> "${constraints_file}" diff --git a/pants.toml b/pants.toml index c785d7fd6d6..38f8fe9521b 100644 --- a/pants.toml +++ b/pants.toml @@ -52,9 +52,8 @@ root_patterns = [ ] [python-setup] -# TODO: Set up an actual lockfile. For now we just "lock" our requirements.txt to itself, -# so we can use --python-setup-resolve-all-constraints (which requires a lockfile). -requirement_constraints = "3rdparty/python/requirements.txt" +requirement_constraints = "3rdparty/python/constraints.txt" +resolve_all_constraints = true [black] config = "pyproject.toml" diff --git a/pants.travis-ci.toml b/pants.travis-ci.toml index 347ff2f2c47..5e4f1b49100 100644 --- a/pants.travis-ci.toml +++ b/pants.travis-ci.toml @@ -1,9 +1,3 @@ -[DEFAULT] -# If we use typical default process parallelism tied to core count, we see too many cores under -# travis and either get oomkilled from launching too many processes with too much total memory -# overhead or else just generally thrash the container and slow things down. -travis_parallelism = 4 - [GLOBAL] # Override color support detection - we want colors and Travis supports them. colors = true @@ -14,8 +8,6 @@ dynamic_ui = false # now in order to smooth off rough edges locally. pantsd = false -process_execution_local_parallelism = "%(travis_parallelism)s" - [python-setup] # TODO: See https://github.com/pantsbuild/pants/issues/9964 resolver_jobs = 2 diff --git a/src/python/pants/backend/python/typecheck/mypy/BUILD b/src/python/pants/backend/python/typecheck/mypy/BUILD index a3eddcb0336..ca4a609ff27 100644 --- a/src/python/pants/backend/python/typecheck/mypy/BUILD +++ b/src/python/pants/backend/python/typecheck/mypy/BUILD @@ -6,5 +6,5 @@ python_library() python_integration_tests( name='integration', uses_pants_run=False, - timeout=180, + timeout=300, ) diff --git a/src/python/pants/base/BUILD b/src/python/pants/base/BUILD index 621b083ba9d..0dbc14fd495 100644 --- a/src/python/pants/base/BUILD +++ b/src/python/pants/base/BUILD @@ -40,5 +40,5 @@ python_integration_tests( 'testprojects/src/python:unicode_directory', ], uses_pants_run=True, - timeout=120, + timeout=180, ) diff --git a/src/python/pants/init/BUILD b/src/python/pants/init/BUILD index bfa81aaaa08..677254b8b1c 100644 --- a/src/python/pants/init/BUILD +++ b/src/python/pants/init/BUILD @@ -30,5 +30,5 @@ python_integration_tests( name="integration", uses_pants_run=True, # TODO(#10504): Lower this to ~120 once fixed. - timeout=450, + timeout=600, ) diff --git a/testprojects/pants-plugins/src/python/test_pants_plugin/BUILD b/testprojects/pants-plugins/src/python/test_pants_plugin/BUILD index c406ddda835..f36e126d6ca 100644 --- a/testprojects/pants-plugins/src/python/test_pants_plugin/BUILD +++ b/testprojects/pants-plugins/src/python/test_pants_plugin/BUILD @@ -13,5 +13,6 @@ python_distribution( namespace_packages=[ 'test_pants_plugin', ], - ) + ), + tags=['lockfile_ignore'], ) diff --git a/testprojects/src/python/bad_requirements/BUILD b/testprojects/src/python/bad_requirements/BUILD index 811a9f27a12..53bca8dc360 100644 --- a/testprojects/src/python/bad_requirements/BUILD +++ b/testprojects/src/python/bad_requirements/BUILD @@ -5,11 +5,12 @@ python_requirement_library( name='badreq', requirements=[ python_requirement('badreq==99.99.99') - ] + ], ) python_binary( name='use_badreq', dependencies=[':badreq'], entry_point='bad_requirements.use_badreq', + tags=['lockfile_ignore'], ) diff --git a/tests/python/pants_test/integration/BUILD b/tests/python/pants_test/integration/BUILD index c4cc0933197..38505a14ddd 100644 --- a/tests/python/pants_test/integration/BUILD +++ b/tests/python/pants_test/integration/BUILD @@ -52,13 +52,14 @@ python_integration_tests( 'testprojects/tests/python/pants:build_parsing_directory', ], uses_pants_run=True, - timeout = 180, + timeout = 240, ) python_integration_tests( name = 'prelude_integration', sources = ['test_prelude_integration.py'], uses_pants_run=True, + timeout = 180, ) python_integration_tests(