conda-forge / vtk-feedstock

A conda-smithy repository for vtk.
BSD 3-Clause "New" or "Revised" License
13 stars 64 forks source link

Package installed with invalid version number on Windows #234

Closed Anthchirp closed 1 year ago

Anthchirp commented 2 years ago

Solution to issue cannot be found in the documentation.

Issue

I have added pip check in a downstream package build in https://github.com/conda-forge/bonsu-feedstock/pull/41, and the build fails on Windows with

(%PREFIX%) %SRC_DIR%>pip check 
bonsu 3.4.4 has requirement vtk>=5.4.2, but you have vtk -PKG-VERSION.

indicating that the package version number is not correctly set in the python package metadata.

Adding pip check to the package directly (#233) did not show up any issues though

Installed packages

The following NEW packages will be INSTALLED:

    bonsu:                   3.4.4-py310hf24f00a_1         local      
    brotlipy:                0.7.0-py310he2412df_1003      conda-forge
    proj:                    8.2.1-h1cfcee9_0              conda-forge
    pthread-stubs:           0.4-hcd874cb_1001             conda-forge
    pugixml:                 1.11.4-h0e60522_0             conda-forge
    pycparser:               2.21-pyhd8ed1ab_0             conda-forge
    pyopenssl:               22.0.0-pyhd8ed1ab_0           conda-forge
    pysocks:                 1.7.1-py310h5588dad_4         conda-forge
    python:                  3.10.2-h9a09f29_4_cpython     conda-forge
    python_abi:              3.10-2_cp310                  conda-forge
    qt:                      5.12.9-h5909a2a_4             conda-forge
    requests:                2.27.1-pyhd8ed1ab_0           conda-forge
    setuptools:              60.9.3-py310h5588dad_0        conda-forge
    six:                     1.16.0-pyh6c4a22f_0           conda-forge
    sqlite:                  3.37.0-h8ffe710_0             conda-forge
    tbb:                     2021.5.0-h2d74725_0           conda-forge
    tbb-devel:               2021.5.0-h2d74725_0           conda-forge
    tk:                      8.6.12-h8ffe710_0             conda-forge
    tzdata:                  2021e-he74cb21_0              conda-forge
    ucrt:                    10.0.20348.0-h57928b3_0       conda-forge
    urllib3:                 1.26.8-pyhd8ed1ab_1           conda-forge
    utfcpp:                  3.2.1-h57928b3_0              conda-forge
    vc:                      14.2-hb210afc_6               conda-forge
    vs2015_runtime:          14.29.30037-h902a5da_6        conda-forge
    vtk:                     9.1.0-qt_py310hc43dec9_204    conda-forge
    wheel:                   0.37.1-pyhd8ed1ab_0           conda-forge
    win32_setctime:          1.1.0-pyhd8ed1ab_0            conda-forge
    win_inet_pton:           1.1.0-py310h5588dad_3         conda-forge
    wxpython:                4.1.1-py310h494077a_3         conda-forge
    xorg-libxau:             1.0.9-hcd874cb_0              conda-forge
    xorg-libxdmcp:           1.1.3-hcd874cb_0              conda-forge
    xz:                      5.2.5-h62dcd97_1              conda-forge
    zlib:                    1.2.11-h8ffe710_1013          conda-forge
    zstd:                    1.5.2-h6255e5f_0              conda-forge

Environment info

ran directly on Azure, failing environments were:
* win_64_numpy1.19python3.9.____cpython
* win_64_numpy1.21python3.10.____cpython
mwtoews commented 1 year ago

Another way to trigger/see this issue on Windows is:

>>> from pkg_resources import get_distribution
>>> print(get_distribution("vtk").version)
-PKG-VERSION

or

>>> from importlib import metadata
>>> print(metadata.version("vtk"))
$PKG_VERSION

on Linux a valid version is shown.