Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requirements resolution for some python_dist() target fails when 3rdparty/python/requirements.txt is modified (maybe) #6638

Closed
cosmicexplorer opened this issue Oct 16, 2018 · 4 comments

Comments

@cosmicexplorer
Copy link
Contributor

I haven't yet been able to nail down this repro, but on both my Linux and OSX machines, after rebasing/pulling past the commit 38ccf42c49f31e26462a266e8c63fb7875bcec14, there was an error in requirements resolution whenever I ran the below.

This is from my OSX machine -- I don't believe I have logs from my Linux machine but can probably get them (but this doesn't look platform-specific). However, I'm pretty sure I saw a failure in a different requirement on Linux, but again I can't remember exactly what, and it may have been unrelated or due to local changes.

X> ./pants test tests/python/pants_test/backend/python/tasks:python_native_code_testing -- -vs
   Compiling bazel_protos v0.0.1 (file:///Users/dmcclanahan/tools/pants/src/rust/engine/process_execution/bazel_protos)                                                                                                                                                         
   Compiling fs v0.0.1 (file:///Users/dmcclanahan/tools/pants/src/rust/engine/fs)
   Compiling process_execution v0.0.1 (file:///Users/dmcclanahan/tools/pants/src/rust/engine/process_execution)
   Compiling engine v0.0.1 (file:///Users/dmcclanahan/tools/pants/src/rust/engine)
    Finished release [optimized + debuginfo] target(s) in 2m 50s

13:02:59 00:00 [main]
               (To run a reporting server: ./pants server)
13:03:00 00:01   [setup]
13:03:01 00:02     [parse]
               Executing tasks in goals: jvm-platform-validate -> native-compile -> bootstrap -> imports -> unpack-jars -> deferred-sources -> link -> gen -> resolve -> resources -> compile -> pyprep -> test
13:03:02 00:03   [jvm-platform-validate]
13:03:02 00:03     [jvm-platform-validate]
13:03:02 00:03   [native-compile]
13:03:02 00:03     [native-third-party-fetch]
13:03:02 00:03     [c-for-ctypes]
13:03:02 00:03     [cpp-for-ctypes]
13:03:02 00:03   [bootstrap]
13:03:02 00:03     [substitute-aliased-targets]
13:03:02 00:03     [jar-dependency-management]
13:03:02 00:03     [bootstrap-jvm-tools]
13:03:02 00:03     [provide-tools-jar]
13:03:02 00:03   [imports]
13:03:02 00:03     [ivy-imports]
13:03:02 00:03   [unpack-jars]
13:03:02 00:03     [unpack-jars]
13:03:02 00:03   [deferred-sources]
13:03:02 00:03     [deferred-sources]
13:03:02 00:03   [link]
13:03:02 00:03     [shared-libraries]
13:03:02 00:03   [gen]
13:03:02 00:03     [antlr-java]
13:03:02 00:03     [antlr-py]
13:03:02 00:03     [jaxb]
13:03:02 00:03     [protoc]
13:03:02 00:03     [ragel]
13:03:02 00:03     [thrift-java]
13:03:02 00:03     [thrift-py]
13:03:02 00:03     [wire]
13:03:02 00:03     [avro-java]
13:03:02 00:03     [go-thrift]
13:03:02 00:03     [go-protobuf]
13:03:02 00:03     [jax-ws]
13:03:02 00:03     [scrooge]
13:03:02 00:03     [thrifty]
13:03:02 00:03   [resolve]
13:03:02 00:03     [ivy]
13:03:02 00:03     [coursier]
13:03:02 00:03     [go]
13:03:02 00:03     [scala-js-compile]
13:03:02 00:03     [scala-js-link]
13:03:02 00:03     [node]
13:03:02 00:03   [resources]
13:03:02 00:03     [prepare]
13:03:03 00:04     [services]
13:03:03 00:04   [compile]
13:03:03 00:04     [node]
13:03:03 00:04     [compile-jvm-prep-command]
13:03:03 00:04       [jvm_prep_command]
13:03:03 00:04     [compile-prep-command]
13:03:03 00:04     [compile]
13:03:03 00:04     [rsc]
13:03:03 00:04     [zinc]
13:03:03 00:04     [javac]
13:03:03 00:04     [cpp]
13:03:03 00:04     [errorprone]
13:03:03 00:04     [findbugs]
13:03:03 00:04     [go]
13:03:03 00:04   [pyprep]
13:03:03 00:04     [interpreter]
13:03:03 00:04     [build-local-dists]
13:03:03 00:04     [requirements]
                   Invalidated 4 targets.**** Failed to install Markdown-2.1.1 (caused by: NonZeroExit("received exit code 1 during execution of `[u'/opt/twitter_mde/package/eepython27/e4cdee382b83e4185a42b54120b1b11021cec1d8285cc9023ef2dabf8c9af24d/bin/python2.7', '-', 'bdist_wheel', '--dist-dir=/var/folders/l_/3k9sqfqn5_z5v1zbxgrnxtyh0000gn/T/tmpaRaWOh']` while trying to execute `[u'/opt/twitter_mde/package/eepython27/e4cdee382b83e4185a42b54120b1b11021cec1d8285cc9023ef2dabf8c9af24d/bin/python2.7', '-', 'bdist_wheel', '--dist-dir=/var/folders/l_/3k9sqfqn5_z5v1zbxgrnxtyh0000gn/T/tmpaRaWOh']`",)
):
stdout:

stderr:
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
ImportError: No module named wheel



               Waiting for background workers to finish.
13:03:11 00:12   [complete]
               FAILURE
timestamp: 2018-10-16T13:03:11.527475
Exception caught: (pex.resolver.Untranslateable)
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/pants_loader.py", line 75, in <module>
    main()
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/pants_loader.py", line 71, in main
    PantsLoader.run()
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/pants_loader.py", line 67, in run
    cls.load_and_execute(entrypoint)
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/pants_loader.py", line 60, in load_and_execute
    entrypoint_main()
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/pants_exe.py", line 39, in main
    PantsRunner(exiter, start_time=start_time).run()
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/pants_runner.py", line 62, in run
    return runner.run()
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/local_pants_runner.py", line 158, in run
    self._run()
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/local_pants_runner.py", line 222, in _run
    goal_runner_result = self._maybe_run_v1(run_tracker, reporting)
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/local_pants_runner.py", line 175, in _maybe_run_v1
    return goal_runner_factory.create().run()
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/goal_runner.py", line 204, in run
    return self._run_goals()
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/goal_runner.py", line 175, in _run_goals
    result = self._execute_engine()
  File "/Users/dmcclanahan/tools/pants/src/python/pants/bin/goal_runner.py", line 163, in _execute_engine
    result = engine.execute(self._context, self._goals)
  File "/Users/dmcclanahan/tools/pants/src/python/pants/engine/legacy_engine.py", line 26, in execute
    self.attempt(context, goals)
  File "/Users/dmcclanahan/tools/pants/src/python/pants/engine/round_engine.py", line 233, in attempt
    goal_executor.attempt(explain)
  File "/Users/dmcclanahan/tools/pants/src/python/pants/engine/round_engine.py", line 49, in attempt
    task.execute()
  File "/Users/dmcclanahan/tools/pants/src/python/pants/backend/python/tasks/resolve_requirements.py", line 29, in execute
    pex = self.resolve_requirements(interpreter, self.context.targets(has_python_requirements))
  File "/Users/dmcclanahan/tools/pants/src/python/pants/backend/python/tasks/resolve_requirements_task_base.py", line 84, in resolve_requirements
    dump_requirement_libs(builder, interpreter, req_libs, self.context.log, platforms=maybe_platforms)
  File "/Users/dmcclanahan/tools/pants/src/python/pants/backend/python/tasks/pex_build_util.py", line 100, in dump_requirement_libs
    dump_requirements(builder, interpreter, reqs, log, platforms=platforms)
  File "/Users/dmcclanahan/tools/pants/src/python/pants/backend/python/tasks/pex_build_util.py", line 122, in dump_requirements
    distributions = resolve_multi(interpreter, deduped_reqs, platforms, find_links)
  File "/Users/dmcclanahan/tools/pants/src/python/pants/backend/python/tasks/pex_build_util.py", line 165, in resolve_multi
    use_manylinux=python_setup.use_manylinux)
  File "/Users/dmcclanahan/tools/pants/build-support/pants_dev_deps.venv/lib/python2.7/site-packages/pex/resolver.py", line 502, in resolve
    return resolver.resolve(resolvables_from_iterable(requirements, builder))
  File "/Users/dmcclanahan/tools/pants/build-support/pants_dev_deps.venv/lib/python2.7/site-packages/pex/resolver.py", line 300, in resolve
    dist = self.build(package, resolvable.options)
  File "/Users/dmcclanahan/tools/pants/build-support/pants_dev_deps.venv/lib/python2.7/site-packages/pex/resolver.py", line 379, in build
    dist = super(CachingResolver, self).build(package, options)
  File "/Users/dmcclanahan/tools/pants/build-support/pants_dev_deps.venv/lib/python2.7/site-packages/pex/resolver.py", line 258, in build
    raise Untranslateable('Package %s is not translateable by %s' % (package, translator))

Exception message: Package SourcePackage(u'file:///Users/dmcclanahan/.cache/pants/python_cache/requirements/CPython-2.7.15/Markdown-2.1.1.zip') is not translateable by ChainedTranslator(WheelTranslator, EggTranslator, SourceTranslator)


./pants test  -- -vs  164.79s user 8.46s system 9% cpu 30:02.53 total

This went away after a clean-all. I don't know how to repro this easily so I don't know if this is e.g. just happening for #6628 (the PR I was working on), or others. I strongly suspect this is a python_dist() bug. I believe this is more reason for #5970.

I might look through the changes in setuptools, wheel, or pex from the commit above and see if any of those look likely to have caused this failure. As of now I don't have a repro yet, so I'm focusing on that first.

@cosmicexplorer
Copy link
Contributor Author

Also, I don't know if this is happening when I run the binary that test invokes -- I believe that it is, but I wasn't able to test that this time before running clean-all.

@stuhood
Copy link
Member

stuhood commented Oct 16, 2018

Should try with PEX_VERBOSE=1 in order to get some information about which python interpreter is being used. And then you should confirm that that python interpreter has wheel installed.

My understanding here is that the python interpreter cache goes looking for python interpreters on your machine that already have wheel installed. It might be that it is finding one that doesn't have wheel.

@codealchemy
Copy link
Contributor

I ran into the same issue today (on latest master) - output below from running:

PEX_VERBOSE=1 ./pants test tests/python/pants_test/build_graph:target -- -k=test_has_sources
Trace details
schmitt :: ~/Workspace/pants ‹master› » PEX_VERBOSE=1 ./pants test tests/python/pants_test/build_graph:target -- -k=test_has_sources                                                                                                    130 ↵

09:52:42 00:00 [main]
               See a report at: http://localhost:49695/run/pants_run_2019_03_07_09_52_45_976_6ca3d8315a014bfa9a248b98377d8c77
09:52:45 00:03   [setup]
09:52:52 00:10     [parse]
               Executing tasks in goals: bootstrap -> imports -> unpack-jars -> unpack-wheels -> deferred-sources -> native-compile -> link -> jvm-platform-validate -> gen -> resolve -> pyprep -> resources -> compile -> test
09:52:53 00:11   [bootstrap]
09:52:53 00:11     [substitute-aliased-targets]
09:52:53 00:11     [jar-dependency-management]
09:52:54 00:12     [bootstrap-jvm-tools]
09:52:54 00:12     [provide-tools-jar]
09:52:54 00:12   [imports]
09:52:54 00:12     [ivy-imports]
09:52:54 00:12   [unpack-jars]
09:52:54 00:12     [unpack-jars]
09:52:54 00:12   [unpack-wheels]
09:52:54 00:12     [unpack-wheels]
09:52:54 00:12   [deferred-sources]
09:52:54 00:12     [deferred-sources]
09:52:54 00:12   [native-compile]
09:52:54 00:12     [conan-prep]
09:52:55 00:13     [conan-fetch]
09:52:55 00:13     [c-for-ctypes]
09:52:55 00:13     [cpp-for-ctypes]
09:52:55 00:13   [link]
09:52:55 00:13     [shared-libraries]
09:52:55 00:13   [jvm-platform-validate]
09:52:55 00:13     [jvm-platform-validate]
09:52:55 00:13   [gen]
09:52:55 00:13     [antlr-java]
09:52:55 00:13     [antlr-py]
09:52:55 00:13     [jaxb]
09:52:55 00:13     [protoc]
09:52:55 00:13     [ragel]
09:52:55 00:13     [thrift-java]
09:52:55 00:13     [thrift-py]
09:52:55 00:13     [grpcio-prep]
09:52:55 00:13     [grpcio-run]
09:52:55 00:13     [wire]
09:52:55 00:13     [avro-java]
09:52:55 00:13     [go-thrift]
09:52:55 00:13     [go-protobuf]
09:52:55 00:13     [jax-ws]
09:52:55 00:13     [scrooge]
09:52:55 00:13     [thrifty]
09:52:55 00:13   [resolve]
09:52:55 00:13     [ivy]
09:52:55 00:13     [coursier]
09:52:55 00:13     [go]
09:52:55 00:13     [scala-js-compile]
09:52:55 00:13     [scala-js-link]
09:52:55 00:13     [node]
09:52:55 00:13   [pyprep]
09:52:55 00:13     [interpreter]
09:52:55 00:13     [build-local-dists]
09:52:55 00:13     [requirements]
**** Failed to install cryptography-2.5 (caused by: NonZeroExit("received exit code 1 during execution of `['/Users/schmitt/Workspace/pants/build-support/pants_dev_deps.py36.venv/bin/python3', '-', 'bdist_wheel', '--dist-dir=/var/folders/fv/9ly0y0dj1g946plb36nm4s1m0000gn/T/tmpl2p15hml']` while trying to execute `['/Users/schmitt/Workspace/pants/build-support/pants_dev_deps.py36.venv/bin/python3', '-', 'bdist_wheel', '--dist-dir=/var/folders/fv/9ly0y0dj1g946plb36nm4s1m0000gn/T/tmpl2p15hml']`",)
):
stdout:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.6
creating build/lib.macosx-10.14-x86_64-3.6/cryptography
copying src/cryptography/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography
copying src/cryptography/utils.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography
copying src/cryptography/__about__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography
copying src/cryptography/exceptions.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography
copying src/cryptography/fernet.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat
copying src/cryptography/hazmat/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat
copying src/cryptography/hazmat/_oid.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/x509
copying src/cryptography/x509/oid.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/x509
copying src/cryptography/x509/ocsp.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/x509
copying src/cryptography/x509/general_name.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/x509
copying src/cryptography/x509/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/x509
copying src/cryptography/x509/extensions.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/x509
copying src/cryptography/x509/name.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/x509
copying src/cryptography/x509/base.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/x509
copying src/cryptography/x509/certificate_transparency.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/x509
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/padding.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/mac.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/bindings
copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/bindings
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ocsp.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/backends/openssl
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/kdf
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/twofactor
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/serialization
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/ciphers
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/primitives/asymmetric
creating build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.macosx-10.14-x86_64-3.6/cryptography/hazmat/bindings/openssl
running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.macosx-10.14-x86_64-3.6/_padding.c'
creating build/temp.macosx-10.14-x86_64-3.6
generating cffi module 'build/temp.macosx-10.14-x86_64-3.6/_constant_time.c'
generating cffi module 'build/temp.macosx-10.14-x86_64-3.6/_openssl.c'
building '_openssl' extension
creating build/temp.macosx-10.14-x86_64-3.6/build
creating build/temp.macosx-10.14-x86_64-3.6/build/temp.macosx-10.14-x86_64-3.6
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/schmitt/.pyenv/versions/3.6.6/include/python3.6m -c build/temp.macosx-10.14-x86_64-3.6/_openssl.c -o build/temp.macosx-10.14-x86_64-3.6/build/temp.macosx-10.14-x86_64-3.6/_openssl.o -Wconversion -Wno-error=sign-conversion

stderr:
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
build/temp.macosx-10.14-x86_64-3.6/_openssl.c:488:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1


pex: Failed to install package at /var/folders/fv/9ly0y0dj1g946plb36nm4s1m0000gn/T/tmp0r1dp8tx/cryptography-2.5: Failed to install /var/folders/fv/9ly0y0dj1g946plb36nm4s1m0000gn/T/tmp0r1dp8tx/cryptography-2.5
pex:   Packaging cryptography: 2122.9ms

               Waiting for background workers to finish.
09:53:02 00:20   [complete]
               FAILURE
timestamp: 2019-03-07T09:53:02.173105
Exception caught: (pex.resolver.Untranslateable)
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/pants_loader.py", line 91, in <module>
    main()
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/pants_loader.py", line 87, in main
    PantsLoader.run()
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/pants_loader.py", line 83, in run
    cls.load_and_execute(entrypoint)
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/pants_loader.py", line 76, in load_and_execute
    entrypoint_main()
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/pants_exe.py", line 39, in main
    PantsRunner(exiter, start_time=start_time).run()
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/pants_runner.py", line 62, in run
    return runner.run()
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/local_pants_runner.py", line 164, in run
    self._run()
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/local_pants_runner.py", line 232, in _run
    goal_runner_result = self._maybe_run_v1(run_tracker, reporting)
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/local_pants_runner.py", line 181, in _maybe_run_v1
    return goal_runner_factory.create().run()
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/goal_runner.py", line 205, in run
    return self._run_goals()
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/goal_runner.py", line 176, in _run_goals
    result = self._execute_engine()
  File "/Users/schmitt/Workspace/pants/src/python/pants/bin/goal_runner.py", line 164, in _execute_engine
    result = engine.execute(self._context, self._goals)
  File "/Users/schmitt/Workspace/pants/src/python/pants/engine/legacy_engine.py", line 26, in execute
    self.attempt(context, goals)
  File "/Users/schmitt/Workspace/pants/src/python/pants/engine/round_engine.py", line 234, in attempt
    goal_executor.attempt(explain)
  File "/Users/schmitt/Workspace/pants/src/python/pants/engine/round_engine.py", line 50, in attempt
    task.execute()
  File "/Users/schmitt/Workspace/pants/src/python/pants/backend/python/tasks/resolve_requirements.py", line 31, in execute
    pex = self.resolve_requirements(interpreter, self.context.targets(has_python_requirements))
  File "/Users/schmitt/Workspace/pants/src/python/pants/backend/python/tasks/resolve_requirements_task_base.py", line 94, in resolve_requirements
    pex_builder.add_requirement_libs_from(req_libs, platforms=platforms)
  File "/Users/schmitt/Workspace/pants/src/python/pants/backend/python/subsystems/pex_build_util.py", line 150, in add_requirement_libs_from
    self.add_resolved_requirements(reqs, platforms=platforms)
  File "/Users/schmitt/Workspace/pants/src/python/pants/backend/python/subsystems/pex_build_util.py", line 202, in add_resolved_requirements
    distributions = self._resolve_distributions_by_platform(reqs, platforms=platforms)
  File "/Users/schmitt/Workspace/pants/src/python/pants/backend/python/subsystems/pex_build_util.py", line 189, in _resolve_distributions_by_platform
    find_links)
  File "/Users/schmitt/Workspace/pants/src/python/pants/backend/python/subsystems/pex_build_util.py", line 244, in _resolve_multi
    use_manylinux=python_setup.use_manylinux)
  File "/Users/schmitt/Workspace/pants/build-support/pants_dev_deps.py36.venv/lib/python3.6/site-packages/pex/resolver.py", line 502, in resolve
    return resolver.resolve(resolvables_from_iterable(requirements, builder))
  File "/Users/schmitt/Workspace/pants/build-support/pants_dev_deps.py36.venv/lib/python3.6/site-packages/pex/resolver.py", line 300, in resolve
    dist = self.build(package, resolvable.options)
  File "/Users/schmitt/Workspace/pants/build-support/pants_dev_deps.py36.venv/lib/python3.6/site-packages/pex/resolver.py", line 379, in build
    dist = super(CachingResolver, self).build(package, options)
  File "/Users/schmitt/Workspace/pants/build-support/pants_dev_deps.py36.venv/lib/python3.6/site-packages/pex/resolver.py", line 258, in build
    raise Untranslateable('Package %s is not translateable by %s' % (package, translator))

Exception message: Package SourcePackage('file:///Users/schmitt/.cache/pants/python_cache/requirements/CPython-3.6.6/cryptography-2.5.tar.gz') is not translateable by ChainedTranslator(WheelTranslator, EggTranslator, SourceTranslator)

I was able to get it resolved by setting the CPPFLAGS and LDFLAGS flags mentioned in pyca/cryptography#3489 (comment) (I'm on openssl 1.0.2q)

@Eric-Arellano
Copy link
Contributor

python_dist was removed in Pants 2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants