From 16d8e7696cfe91f63d09d37c677a434ef2c5abba Mon Sep 17 00:00:00 2001 From: Kevin Conway Date: Fri, 24 Feb 2023 00:56:08 -0600 Subject: [PATCH] Add note about nushell to readme --- README.rst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.rst b/README.rst index 5699a29..4f10f35 100644 --- a/README.rst +++ b/README.rst @@ -32,6 +32,8 @@ rpmvenv - `NOTE: bdist eggs with scripts <#note-bdist-eggs-with-scripts>`_ +- `NOTE: BUILDROOT errors and nushell <#note-buildroot-errors-and-nushell>`_ + - `Testing <#testing>`_ - `License <#license>`_ @@ -419,6 +421,36 @@ which switches the installation method from `python setup.py install` to because `pip` will always generate a wheel rather than an egg which does not suffer from this issue. +NOTE: BUILDROOT errors and nushell +================================== + +If you are using recent versions of virtualenv then you may see error messages +like this:: + + /tmp/rpmvenvz_kldppd/BUILDROOT/test-pkg-1.2.3.4-1.x86_64/usr/share/python/test-pkg-venv/bin/activate.nu + Found '/tmp/rpmvenvz_kldppd/BUILDROOT/test-pkg-1.2.3.4-1.x86_64' in installed files; aborting + +The issue is that virtualenv recently changed the contents of the nushell +activation script that is included by default in every virtualenv. There's an +`issue `_ tracking this for +`venvctrl`, which is the tool used by `rpmvenv` to rewrite virtualenv paths. + +In the meantime, the easiest workaround is to disable nushell if you aren't +using it. To do this, set your `python_venv.flags` option like this: + +.. code-block:: javascript + + { + "python_venv": { + "flags": ["--always-copy", "--activators", "bash,python"] + } + } + +This disables the generation of all activation scripts except one for bash and +Python. See `the virtualenv docs +`_ for the +full set of possible activators if you need more than bash and Python. + Testing =======