cool-easter-32542
08/14/2023, 6:37 PMpants export a virtualenv for coverage-py or mypy-extra-type-stubs. Attempting either gets me the same error as below:
root@archdev:~/pants-testing# ./pants export --py-resolve-format=symlinked_immutable_virtualenv --resolve=coverage-py
22:58:15.37 [ERROR] 1 Exception encountered:
Engine traceback:
in `export` goal
UnrecognizedResolveNamesError: Unrecognized resolve name from the option --export-resolve: coverage-py
All valid resolve names: ['bandit', 'black', 'coverage-py', 'debugpy', 'docformatter', 'flake8', 'ipython', 'isort', 'lambdex', 'mypy', 'mypy-extra-type-stubs', 'pytest', 'python-default', 'setuptools']
Pants version
2.16.0
OS
Linux. Have not tried macOS. See additional info
Additional info
The base system is Arch and I'm running a custom development container that's using pants/poetry/pyenv with Debian Bookworm as a base. Dockerfile contents below:
FROM debian:bookworm
ENV DEBIAN_FRONTEND=noninteractive LANG=en_US.UTF-8 LC_ALL=C.UTF-8 LANGUAGE=en_US.UTF-8
RUN apt-get -q update && apt-get -qqy upgrade && apt-get -qqy dist-upgrade
RUN apt-get -qqy install \
build-essential \
ca-certificates \
git \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
wget \
curl \
llvm \
unzip \
tree \
libncurses5-dev \
xz-utils \
tk-dev \
libxml2-dev \
libxmlsec1-dev \
libffi-dev \
liblzma-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV HOME=/root
ENV PYENV_ROOT=$HOME/.pyenv
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$HOME/.local/bin:$HOME/bin:$PATH
RUN echo "installing pyenv" \
&& curl <https://pyenv.run> | bash \
&& echo "installing Python 3.11.4" \
&& pyenv install 3.11.4 \
&& echo "setting global Python version to 3.11.4" \
&& pyenv global 3.11.4 \
&& echo "installing poetry" \
&& curl -sSL <https://install.python-poetry.org> | python3 - \
&& poetry config virtualenvs.in-project true \
&& echo "installing pants" \
&& curl --proto '=https' --tlsv1.2 -fsSL <https://static.pantsbuild.org/setup/get-pants.sh> | bash
WORKDIR /root
Once I spin up this container I then git clone a repository that has the pants binary included in it, then run my pants goals from the git repository folder using ./pants fmt :: ./pants export etc etc
pantsbuild/pants