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

Newer versions of virtualenv causing clash with vendored virturalenv #899

Open
amamdani15 opened this issue Oct 27, 2023 · 1 comment
Open
Labels

Comments

@amamdani15
Copy link

I am not sure exactly what is going on, but with the newer versions of virtualenv are causing build failures and I believe it is because there is some sort of clash between the vendored version of virtualenv thats part of pybuilder and the virtualenv that is on the base python installed on the local machine. It seems to happen when there is any package in requirements.txt that also has a dependency on virtualenv.

Using:
Python 3.8.13
Pybuilder 0.13.10
Virtualenv 20.24.0

To reproduce:

  • create a helloworld project that successfully executes pyb
  • add virtualenv to requirements.txt
  • set default_task to install
  • run pip install virtualenv 20.24.0 on your base python installation
  • First time you build it using pyb it will build successfully. Second build will fail with error BUILD FAILED - AttributeError: module 'pybuilder._vendor.virtualenv.create.via_global_ref.builtin.cpython.mac_os' has no attribute 'CPython3macOsBrew' (site-packages/setuptools/_vendor/importlib_metadata/__init__.py:210)

What seems to be happening:

  • The first time it runs, the virtualenv version on the base system is 20.24.0 is compatible enough with the vendored version of virtualenv that the build runs fine.
  • When the install default_task is run, it installs the virtualenv version that is in the virtual environment that was the project is built in. In this case its 20.24.6
  • The build fails

I cant tell 100% but it seems like when pybuilder tries to pick up virtualenv its not always picking up the vendored version OR it picks it up partially and it tries to get something from pybuilder from the base python installation and thats causing CPython3macOsBrew since that was added in a more recent version of pybuilder and that is not present in the vendored version.

I hope i was clear enough. feel free to reach out for any clarification, further testing or any more info.

Thanks!

@arcivanov
Copy link
Member

Oy vey... Yeah, I'll need to investigate this one. Thanks!

@arcivanov arcivanov added the bug label Oct 30, 2023
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