conda-smithy: jinja2 variable named like global pin causes it to be included in rerender CI yaml
Solution to issue cannot be found in the documentation.
- I checked the documentation.
Issue
As experienced with conda-forge/postgresql-feedstock/#154, a rerender caused the global pin of libpq=15 to be added to the repo’s CI yaml files. After some iteration, it was discovered that the usage of jinja2 variable named libpqver caused conda-smithy to include libpq as a CI yaml pin. Of course, this is trouble for the repo that provides libpq itself! Renaming the jinja2 variable pqver made this issue go away.
A simple / trimmed down reproducer is the following recipe
{% set version = "14.5" %}
{% set libpqver = '.'.join(("5", version.split('.')[0])) %}
package:
name: postgresql-split
version: {{ version }}
source:
url: https://ftp.postgresql.org/pub/source/v{{ version }}/postgresql-{{ version }}.tar.bz2
sha256: d4f72cb5fb857c9a9f75ec8cf091a1771272802f2178f0b2e65b7b6ff64f4a30
build:
number: 4
skip: true # [win and float(vc) < 14]
requirements:
build:
- make
outputs:
- name: libpq
script: install_runtime.sh # [unix]
script: install_runtime.bat # [win]
test:
commands:
- pg_config
- test -f $PREFIX/lib/libpq.so.{{ libpqver }} # [linux]
about:
summary: The postgres runtime libraries and utilities (not the server itself)
license: PostgreSQL
license_file: COPYRIGHT
about:
home: http://www.postgresql.org/
license: PostgreSQL
license_file: COPYRIGHT
summary: multi-ouput recipe for postgresql
extra:
recipe-maintainers:
- akrherz
This results in the following .ci_support/linux_64_.yaml
cdt_name:
- cos6
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
libpq:
- '15'
target_platform:
- linux-64
Installed packages
$ conda list
# packages in environment at /opt/miniconda3:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
beautifulsoup4 4.11.1 pyha770c72_0 conda-forge
blinker 1.5 pyhd8ed1ab_0 conda-forge
boolean.py 3.7 py_0 conda-forge
brotlipy 0.7.0 py310h5764c6d_1005 conda-forge
bzip2 1.0.8 h7f98852_4 conda-forge
c-ares 1.18.1 h7f98852_0 conda-forge
ca-certificates 2022.12.7 ha878542_0 conda-forge
certifi 2022.12.7 pyhd8ed1ab_0 conda-forge
cffi 1.15.1 py310h255011f_3 conda-forge
chardet 5.1.0 py310hff52083_0 conda-forge
charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
conda 22.11.1 py310hff52083_1 conda-forge
conda-build 3.23.3 py310hff52083_0 conda-forge
conda-forge-pinning 2023.01.07.12.45.19 hd8ed1ab_0 conda-forge
conda-package-handling 2.0.2 pyh38be061_0 conda-forge
conda-package-streaming 0.7.0 pyhd8ed1ab_1 conda-forge
conda-smithy 3.22.1 pyhd8ed1ab_0 conda-forge
cryptography 39.0.0 py310h34c0648_0 conda-forge
curl 7.87.0 hdc1c0ab_0 conda-forge
deprecated 1.2.13 pyh6c4a22f_0 conda-forge
expat 2.5.0 h27087fc_0 conda-forge
filelock 3.9.0 pyhd8ed1ab_0 conda-forge
fmt 9.1.0 h924138e_0 conda-forge
gettext 0.21.1 h27087fc_0 conda-forge
git 2.39.0 pl5321h693f4a3_0 conda-forge
gitdb 4.0.10 pyhd8ed1ab_0 conda-forge
gitpython 3.1.30 pyhd8ed1ab_0 conda-forge
glob2 0.7 py_0 conda-forge
gmp 6.2.1 h58526e2_0 conda-forge
icu 70.1 h27087fc_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
isodate 0.6.1 pyhd8ed1ab_0 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
keyutils 1.6.1 h166bdaf_0 conda-forge
krb5 1.20.1 h81ceb04_0 conda-forge
ld_impl_linux-64 2.39 hcc3a1bd_1 conda-forge
libarchive 3.6.2 h3d51595_0 conda-forge
libcurl 7.87.0 hdc1c0ab_0 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 12.2.0 h65d4601_19 conda-forge
libgomp 12.2.0 h65d4601_19 conda-forge
libiconv 1.17 h166bdaf_0 conda-forge
liblief 0.12.3 h27087fc_0 conda-forge
libmamba 1.1.0 hde2b089_3 conda-forge
libmambapy 1.1.0 py310h1428755_3 conda-forge
libnghttp2 1.51.0 hff17c54_0 conda-forge
libnsl 2.0.0 h7f98852_0 conda-forge
libsodium 1.0.18 h36c2ea0_1 conda-forge
libsolv 0.7.23 h3eb15da_0 conda-forge
libsqlite 3.40.0 h753d276_0 conda-forge
libssh2 1.10.0 hf14f497_3 conda-forge
libstdcxx-ng 12.2.0 h46fd767_19 conda-forge
libuuid 2.32.1 h7f98852_1000 conda-forge
libxml2 2.10.3 h7463322_0 conda-forge
libzlib 1.2.13 h166bdaf_4 conda-forge
license-expression 1.2 py_0 conda-forge
lz4-c 1.9.3 h9c3ff4c_1 conda-forge
lzo 2.10 h516909a_1000 conda-forge
mamba 1.1.0 py310h51d5547_3 conda-forge
markupsafe 2.1.1 py310h5764c6d_2 conda-forge
msrest 0.6.21 pyh44b312d_0 conda-forge
ncurses 6.3 h27087fc_1 conda-forge
oauthlib 3.2.2 pyhd8ed1ab_0 conda-forge
openssl 3.0.7 h0b41bf4_1 conda-forge
patch 2.7.6 h7f98852_1002 conda-forge
patchelf 0.17.0 h58526e2_0 conda-forge
pcre2 10.40 hc3806b6_0 conda-forge
perl 5.32.1 2_h7f98852_perl5 conda-forge
pip 22.3.1 pyhd8ed1ab_0 conda-forge
pkginfo 1.9.6 pyhd8ed1ab_0 conda-forge
pluggy 1.0.0 pyhd8ed1ab_5 conda-forge
psutil 5.9.4 py310h5764c6d_0 conda-forge
py-lief 0.12.3 py310hd8f1fbe_0 conda-forge
pybind11-abi 4 hd8ed1ab_3 conda-forge
pycosat 0.6.4 py310h5764c6d_1 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pycrypto 2.6.1 py310h6acc77f_1006 conda-forge
pycryptodome 3.16.0 py310h1419917_0 conda-forge
pygithub 1.57 pyh1a96a4e_0 conda-forge
pyjwt 2.6.0 pyhd8ed1ab_0 conda-forge
pynacl 1.5.0 py310h5764c6d_2 conda-forge
pyopenssl 23.0.0 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.10.8 h4a9ceb5_0_cpython conda-forge
python-libarchive-c 4.0 py310hff52083_2 conda-forge
python_abi 3.10 3_cp310 conda-forge
pytz 2022.7 pyhd8ed1ab_0 conda-forge
pyyaml 6.0 py310h5764c6d_5 conda-forge
readline 8.1.2 h0f457ee_0 conda-forge
reproc 14.2.4 h0b41bf4_0 conda-forge
reproc-cpp 14.2.4 hcb278e6_0 conda-forge
requests 2.28.1 pyhd8ed1ab_1 conda-forge
requests-oauthlib 1.3.1 pyhd8ed1ab_0 conda-forge
ripgrep 13.0.0 h2f28480_2 conda-forge
ruamel.yaml 0.17.21 py310h5764c6d_2 conda-forge
ruamel.yaml.clib 0.2.7 py310h1fa729e_1 conda-forge
ruamel_yaml 0.15.80 py310h5764c6d_1008 conda-forge
scrypt 0.8.18 py310ha302636_4 conda-forge
setuptools 65.6.3 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
smmap 3.0.5 pyh44b312d_0 conda-forge
soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge
sqlite 3.40.0 h4ff8645_0 conda-forge
tk 8.6.12 h27826a3_0 conda-forge
toml 0.10.2 pyhd8ed1ab_0 conda-forge
toolz 0.12.0 pyhd8ed1ab_0 conda-forge
tqdm 4.64.1 pyhd8ed1ab_0 conda-forge
typing_extensions 4.4.0 pyha770c72_0 conda-forge
tzdata 2022g h191b570_0 conda-forge
urllib3 1.26.13 pyhd8ed1ab_0 conda-forge
vsts-python-api 0.1.25 pyhd8ed1ab_1 conda-forge
wheel 0.38.4 pyhd8ed1ab_0 conda-forge
wrapt 1.14.1 py310h5764c6d_1 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
yaml 0.2.5 h7f98852_2 conda-forge
yaml-cpp 0.7.0 h27087fc_2 conda-forge
zlib 1.2.13 h166bdaf_4 conda-forge
zstandard 0.19.0 py310hdeb6495_1 conda-forge
zstd 1.5.2 h6239696_4 conda-forge
Environment info
$ conda info
active environment : base
active env location : /opt/miniconda3
shell level : 5
user config file : /home/akrherz/.condarc
populated config files : /home/akrherz/.condarc
conda version : 22.11.1
conda-build version : 3.23.3
python version : 3.10.8.final.0
virtual packages : __archspec=1=x86_64
__glibc=2.34=0
__linux=5.14.0=0
__unix=0=0
base environment : /opt/miniconda3 (writable)
conda av data dir : /opt/miniconda3/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /opt/miniconda3/pkgs
/home/akrherz/.conda/pkgs
envs directories : /opt/miniconda3/envs
/home/akrherz/.conda/envs
platform : linux-64
user-agent : conda/22.11.1 requests/2.28.1 CPython/3.10.8 Linux/5.14.0-229.el9.x86_64 centos/9 glibc/2.34
UID:GID : 43306:101
netrc file : /home/akrherz/.netrc
offline mode : False
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 15 (10 by maintainers)
Ok. This is still a conda-build issue and not a conda-smithy issue.