Skip to content

Update autogen script on virtualenv part#59

Open
tak2hu wants to merge 2 commits intoQuedale:mainfrom
tak2hu:main
Open

Update autogen script on virtualenv part#59
tak2hu wants to merge 2 commits intoQuedale:mainfrom
tak2hu:main

Conversation

@tak2hu
Copy link

@tak2hu tak2hu commented Feb 12, 2026

Got this error on Pop OS 22.04, so this fixed it

./autogen.sh --prefix=$(pwd)/dist --enable-latest
make check found
g++ check found
git check found
tar check found
wget check found
wget check version is too old. 1.21.2 < 2..
wget check found
unbuffer check not found
pkg-config check found
gtk3 check found
m4 check found
autoconf check found
automake check found
libtool check found
flex check found
bison check found
virtualenv check found
virtualenv setup created virtual environment CPython3.10.12.final.0-64 in 198ms
virtualenv setup   creator CPython3Posix(dest=/home/mhz/Git/OnvifDeviceManager/subprojects/venvfolder, clear=False, no_vcs_ignore=False, global=False)
virtualenv setup   seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/mhz/.local/share/virtualenv)
virtualenv setup     added seed packages: pip==22.0.2, setuptools==59.6.0, wheel==0.37.1
virtualenv setup   activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
virtualenv activate *****************************
virtualenv activate *  failed to activate python virtual environment.
virtualenv activate *  Kernel: 6.17.9-76061709-generic
virtualenv activate *  Kernel: x86_64
virtualenv activate *****************************

@Quedale
Copy link
Owner

Quedale commented Feb 12, 2026

Good day!

Thanks for the contribution! I wasn't aware the venv path could vary depending on the distro.

There's only one little flaw in the logic.
I haven't had time to test it, but it looks like it would break other distro.

You start immediately with a fallback check on line 870, and then proceed to check if only the "local/bin" file exists, ignoring the orignal one.

To resolve that, on line 875, you should check for either files to bootstrap the venv utility.

Only after the venv utility got bootstrapped should you initialize the "VENV_ACTIVATE" variable depending on which file exists.
The initialization of the VENV_ACTIVATE variable should happen regardless if venv was already initialized or not.



In short, this section used to be 2-step and you are introducing an extra step to determine the proper executable location, making it into 3-step.
Step 1: Initialize venv if neither of the file exists. (It currently only checks for one file)
Step 2: Determine the location of the executable and set "VENV_ACTIVATE" (Currently only set if venv was not initialized)
Step 3: Source the virtual environment with VENV_ACTIVATE variable.

If you can make those small adjustment, I'll merge your changes!

Thanks again!

@tak2hu
Copy link
Author

tak2hu commented Feb 13, 2026

Sorry I asked a coding agent to fix it and didn't try to understand the code, so how about now

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

Successfully merging this pull request may close these issues.

2 participants