datalad / datalad-extension-template

Minimal implementation of a DataLad extension module
http://datalad.org
Other
2 stars 17 forks source link

appveyor virtualenv installation likely problematic #67

Closed mih closed 11 months ago

mih commented 1 year ago

Check https://github.com/datalad/datalad-next/issues/441 for the description and the fix. I am not familiar with the problem, but I do not see why it would be specific to datalad-next -- hence also filing here.

adswa commented 1 year ago

Alternatively, @yarikoptic pointed out in the chat that he'd switched from the use of virtualenv to venv.

mih commented 1 year ago

I took a closer look on the original reasons for this setup. I can now confirm that the issue with the appveyor-provided venvs (LZMA not functional) has been resolved. This means that there is no need for any custom virtualenv or venv anymore.

I suggest that this complexity can be removed from the appveyor setup here. I have a patch that should do that for a new extension that I could port here.

adswa commented 11 months ago

I have explored this briefly in #81. At the moment, the virtualenvironment setup is using venv, the python3 successor of virtualenv. If I remove the systempackage installation via apt, I'm seeing the following CI failure:

Cache '/home/appveyor/.cache/pip' - Invalidated as some dependencies (.appveyor.yml) have changed
Running "install" scripts
[ -n "$INSTALL_SYSPKGS" ] && ( [ "x${APPVEYOR_BUILD_WORKER_IMAGE}" = "xmacOS" ] && brew install -q ${INSTALL_SYSPKGS} || { sudo apt-get update -y && sudo apt-get install --no-install-recommends -y ${INSTALL_SYSPKGS}; } ) || true
[ "x$PY" != x ] && . ${HOME}/venv${PY}/bin/activate || python3 -m venv ${HOME}/dlvenv && . ${HOME}/dlvenv/bin/activate; ln -s "$VIRTUAL_ENV" "${HOME}/VENV"
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
    apt install python3.8-venv
You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.
Failing command: ['/home/appveyor/dlvenv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']
ln: failed to create symbolic link '/home/appveyor/VENV' -> '': No such file or directory
Command exited with code 1
Running "on_finish" scripts
while [ -f ~/BLOCK ]; do sleep 5; done

In that sense, we can't skip the installation. Nevertheless, I followed up on an old comment pointing to an appveyor bug, and found that it was outdated. So at least I removed this.