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

Cryptography 2.6 crashes pip-compile #746

Closed
NickG123 opened this issue Feb 27, 2019 · 3 comments
Closed

Cryptography 2.6 crashes pip-compile #746

NickG123 opened this issue Feb 27, 2019 · 3 comments

Comments

@NickG123
Copy link

NickG123 commented Feb 27, 2019

Running pip-compile with cryptography 2.6 results in a crash from pip.

Works fine with cryptography 2.5.

Environment Versions
  1. CentOS 7
  2. Python version: 3.7.1
  3. pip version: 19.0.1
  4. pip-tools version: 3.4.0
Steps to replicate
  1. Create a requirements.in containing cryptography==2.6
  2. Run pip-compile requirements.in
Expected result

pip-compile should properly produce the requirements.txt

Actual result
Traceback (most recent call last):
  File "<virtualenv>/bin/pip-compile", line 10, in <module>
    sys.exit(cli())
  File "<virtualenv>/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "<virtualenv>/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "<virtualenv>/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "<virtualenv>/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "<virtualenv>/lib/python3.7/site-packages/piptools/scripts/compile.py", line 197, in cli
    results = resolver.resolve(max_rounds=max_rounds)
  File "<virtualenv>/lib/python3.7/site-packages/piptools/resolver.py", line 101, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "<virtualenv>/lib/python3.7/site-packages/piptools/resolver.py", line 198, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "<virtualenv>/lib/python3.7/site-packages/piptools/resolver.py", line 284, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "<virtualenv>/lib/python3.7/site-packages/piptools/repositories/local.py", line 65, in get_dependencies
    return self.repository.get_dependencies(ireq)
  File "<virtualenv>/lib/python3.7/site-packages/piptools/repositories/pypi.py", line 225, in get_dependencies
    self._dependencies_cache[ireq] = self.resolve_reqs(download_dir, ireq, wheel_cache)
  File "<virtualenv>/lib/python3.7/site-packages/piptools/repositories/pypi.py", line 191, in resolve_reqs
    results = resolver._resolve_one(reqset, ireq)
  File "<virtualenv>/lib/python3.7/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "<virtualenv>/lib/python3.7/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
  File "<virtualenv>/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 349, in prepare_linked_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "<virtualenv>/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 158, in prep_for_dist
    self.req.prepare_metadata()
  File "<virtualenv>/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 534, in prepare_metadata
    self.prepare_pep517_metadata()
  File "<virtualenv>/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 579, in prepare_pep517_metadata
    metadata_dir
  File "<virtualenv>/lib/python3.7/site-packages/pip/_vendor/pep517/wrappers.py", line 86, in prepare_metadata_for_build_wheel
    'config_settings': config_settings,
  File "<virtualenv>/lib/python3.7/site-packages/pip/_vendor/pep517/wrappers.py", line 155, in _call_hook
    extra_environ={'PEP517_BUILD_BACKEND': build_backend}
  File "<virtualenv>/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 517, in runner
    spinner=spinner
  File "<virtualenv>/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 761, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "<virtualenv>/bin/python3.7 <virtualenv>/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp_gsmhfhu" failed with error code 1 in /tmp/tmp_kfjmnf1build/cryptography

@atugushev
Copy link
Member

Hello @NickG123,

Thank you for the report! It's probably related to the #721 issue. I couldn't reproduce it locally, could you change build_isolation to True (it is False currently) in the <virtualenv>/lib/python3.7/site-packages/piptools/repositories/pypi.py file line 164 and try pip-compile again?

@NickG123
Copy link
Author

Hi @atugushev, that does solve the issue.
Apologies for the duplicate issue, I will follow along #721.

@atugushev
Copy link
Member

atugushev commented Feb 27, 2019

No worries! Thanks anyways for your contribution. I'll close this issue in favour of #721.

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

2 participants