You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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!
The text was updated successfully, but these errors were encountered:
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:
pyb
virtualenv
to requirements.txtinstall
pip install virtualenv 20.24.0
on your base python installationpyb
it will build successfully. Second build will fail with errorBUILD 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:
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.6I 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!
The text was updated successfully, but these errors were encountered: