我最近迁移到poetry
我的依赖项管理,所以如果我的问题超出了poetry
这里的范围,请原谅。
我的最终目标是创建一个RPM 包,其中包含一个virtualenv,其中安装了我的软件及其所有依赖项。然后,该 RPM 将提供与安装该软件的系统隔离的软件。
我在使用poetry install
我的virtualenv
. 一旦我的软件的源目录被删除,我的CLI就无法再工作。
我创建了一个简单的存储库来重现问题:https ://github.com/riton/python-poetry-venv
这是我正在使用的poetry
:
#!/bin/bash -ex
VENV_DIR="/venv"
SRC_DIR="/src"
ALT_SRC_DIR="/src2"
USER_CACHE_DIR="~/.cache"
# Copy directory (cause we're mounting it read-only in the container)
# and we want to remove the source directory later on
cp -r $SRC_DIR $ALT_SRC_DIR
# We'll remove this directory to test if the soft is still working
# …
Run Code Online (Sandbox Code Playgroud)