Skip to content

Commit

Permalink
Python 3 - fix cffi resolver issues (#6225)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano authored and jsirois committed Jul 24, 2018
1 parent b95a3a7 commit d9316dd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/python/requirements.txt
Expand Up @@ -27,7 +27,7 @@ pywatchman==1.4.1
requests[security]>=2.5.0,<2.19
scandir==1.2
setproctitle==1.1.10
setuptools==30.0.0
setuptools==33.1.1
six>=1.9.0,<2
subprocess32==3.2.7 ; python_version<'3'
thrift>=0.9.1
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/backend/python/subsystems/python_setup.py
Expand Up @@ -33,7 +33,7 @@ def register_options(cls, register):
"or 'PyPy' (A pypy interpreter of any version). Multiple constraint strings will "
"be ORed together. These constraints are applied in addition to any "
"compatibilities required by the relevant targets.")
register('--setuptools-version', advanced=True, default='30.0.0',
register('--setuptools-version', advanced=True, default='33.1.1',
help='The setuptools version for this python environment.')
register('--wheel-version', advanced=True, default='0.29.0',
help='The wheel version for this python environment.')
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/core_tasks/clean.py
Expand Up @@ -41,7 +41,7 @@ def execute(self):
safe_concurrent_rename(pants_wd, tmp_trash)
safe_concurrent_rename(tmpdir, pants_wd)

if self.get_options().async:
if self.get_options()['async']:
# The trash directory is deleted in a child process.
pid = os.fork()
if pid == 0:
Expand Down
7 changes: 3 additions & 4 deletions src/python/pants/invalidation/cache_manager.py
Expand Up @@ -6,10 +6,11 @@

import os
import shutil
import sys
from builtins import object
from hashlib import sha1

from future.utils import raise_from

from pants.build_graph.build_graph import sort_targets
from pants.build_graph.target import Target
from pants.invalidation.build_invalidator import CacheKey
Expand Down Expand Up @@ -389,8 +390,6 @@ def _key_for(self, target):
except Exception as e:
# This is a catch-all for problems we haven't caught up with and given a better diagnostic.
# TODO(Eric Ayers): If you see this exception, add a fix to catch the problem earlier.
exc_info = sys.exc_info()
new_exception = self.CacheValidationError("Problem validating target {} in {}: {}"
.format(target.id, target.address.spec_path, e))

raise self.CacheValidationError, new_exception, exc_info[2]
raise_from(self.CacheValidationError(new_exception), e)

0 comments on commit d9316dd

Please sign in to comment.