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

PyBuilder issue while installing Crypto libs on Mac OS Big Sur #777

Closed
rakshit-jain opened this issue Aug 11, 2021 · 9 comments
Closed

PyBuilder issue while installing Crypto libs on Mac OS Big Sur #777

rakshit-jain opened this issue Aug 11, 2021 · 9 comments
Labels

Comments

@rakshit-jain
Copy link

I am facing a weird issue while using PYB in my python virtual env. PYB is unable to install some dependencies on Mac OS Big Sur. I tried to read about this issue and came to know it’s fixed in the latest PIP version i.e. 21.2.2.

As you already know PyBuilder 0.12.10 uses 20.2.3 which is not compatible with crypto libraries on Mac OS Big Sur. This is a dependency resolution issue that can be fixed if packaged PIP version in PYB can be upgraded to the latest one.

ERROR: Failed building wheel for wrapt
Running setup.py clean for wrapt
Failed to build cryptography MarkupSafe wrapt
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 20.2.3; however, version 21.2.2 is available.

Python Version: Python 3.7.11 (On MAC and Virtual Env)
PIP version : 21.2.2 (On MAC and virtual env)
PYB version: 0.12.10

@arcivanov
Copy link
Member

Could you please install --pre of PyBuilder and try again?
Thanks!

@arcivanov
Copy link
Member

@rakshit-jain ping

@rakshit-jain
Copy link
Author

Acknowledged

@rakshit-jain
Copy link
Author

rakshit-jain commented Sep 8, 2021

I am getting the below error. Any suggestions? This is the output of pyb -v as well as pyb install_dependencies

PyBuilder version 0.13.0.dev20210908053645
Build started at 2021-09-08 11:42:44
BUILD FAILED - ModuleNotFoundError: No module named 'pybuilder._vendor.virtualenv.activation.xonsh' (:965)

@arcivanov
Copy link
Member

Please run with -vX and paste the logs.

@rakshit-jain
Copy link
Author

rakshit-jain commented Sep 8, 2021

[DEBUG] Registered Python environment 'system': CPython version 3.7.11.final.0 on darwin in ['/usr/local/opt/[email protected]/bin/python3.7']
PyBuilder version 0.13.0.dev20210908053645
Build started at 2021-09-08 12:55:52
[DEBUG] Loading project module from ./build.py
[DEBUG] Setting up plugins VEnv at -----/.pybuilder/plugins/cpython-3.7.11.final.0'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pybuilder/cli.py", line 468, in main
    no_venvs=options.no_venvs
  File "/usr/local/lib/python3.7/site-packages/pybuilder/reactor.py", line 203, in prepare_build
    self._setup_plugin_directory(reset_plugins, no_venvs)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/reactor.py", line 517, in _setup_plugin_directory
    offline=self.project.offline)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/python_env.py", line 223, in create_venv
    logger=self.logger)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/python_env.py", line 420, in create_venv
    virtualenv.cli_run(args, setup_logging=False)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/__init__.py", line 30, in cli_run
    of_session = session_via_cli(args, options, setup_logging, env)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/__init__.py", line 48, in session_via_cli
    parser, elements = build_parser(args, options, setup_logging, env)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/__init__.py", line 76, in build_parser
    ActivationSelector(interpreter, parser),
  File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/plugin/activators.py", line 13, in __init__
    (k, v) for k, v in self.options("virtualenv.activate").items() if v.supports(interpreter)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/plugin/base.py", line 35, in options
    cls._OPTIONS = cls.entry_points_for(key)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/plugin/base.py", line 14, in entry_points_for
    return OrderedDict((e.name, e.load()) for e in cls.entry_points().select(group=key))
  File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/plugin/base.py", line 14, in <genexpr>
    return OrderedDict((e.name, e.load()) for e in cls.entry_points().select(group=key))
  File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/importlib_metadata/__init__.py", line 194, in load
    module = import_module(match.group('module'))
  File "/usr/local/Cellar/[email protected]/3.7.11/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "/usr/local/lib/python3.7/site-packages/pybuilder/extern/__init__.py", line 75, in load_module
    mod = import_module(extant)
  File "/usr/local/Cellar/[email protected]/3.7.11/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pybuilder._vendor.virtualenv.activation.xonsh'

BUILD FAILED - ModuleNotFoundError: No module named 'pybuilder._vendor.virtualenv.activation.xonsh' (<frozen importlib._bootstrap>:965)
Build finished at 2021-09-08 12:55:52
Build took 0 seconds (204 ms)

@arcivanov
Copy link
Member

arcivanov commented Sep 12, 2021

Hmm... I can't seem to reproduce this issue on GitHub Actions with BigSur and Homebrew.

https://github.com/pybuilder/pybuilder/commit/618512b0f356e3314b1218ae7c0192b9fea49c6b/checks/3581148423/logs

Could you please check to see the logs if anything jumps at you as different from how your system is configured?

@arcivanov
Copy link
Member

@rakshit-jain Please test with the latest --pre and let me know. Thanks!

@rakshit-jain
Copy link
Author

@rakshit-jain Please test with the latest --pre and let me know. Thanks!

It took me a long to test because of the weekend. I have tested with the latest build and it's working as expected. Great work.

arcivanov added a commit to arcivanov/pybuilder that referenced this issue Sep 26, 2021
Vendorize latest virtualenv with cleanup fixes

fixes pybuilder#795, pybuilder#777, pybuilder#774, pybuilder#771
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Sep 26, 2021
Vendorize latest virtualenv with cleanup fixes
Bump version to 0.13.0

fixes pybuilder#795, pybuilder#777, pybuilder#774, pybuilder#771
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Sep 26, 2021
Vendorize latest virtualenv with cleanup fixes
Bump version to 0.13.0

fixes pybuilder#795, pybuilder#777, pybuilder#774, pybuilder#771
arcivanov added a commit to arcivanov/pybuilder that referenced this issue Sep 26, 2021
Vendorize latest virtualenv with cleanup fixes
Bump version to 0.13.0

fixes pybuilder#795, pybuilder#777, pybuilder#774, pybuilder#771
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants