conda-forge / vtk-feedstock

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

Skipping C:\path\to\vtk-9.2.6.egg-info due to invalid metadata entry 'name' #323

Closed mwtoews closed 5 months ago

mwtoews commented 7 months ago

Solution to issue cannot be found in the documentation.

Issue

While using a conda-forge environment with vtk installed, I also do local development on other packages. For instance mypackage with pyproject.toml:

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "mypackage"
version = "0.0.1"
dependencies = ["vtk"]

to work with this package:

cd mypackage
pip install --dry-run -e .

which creates the output:

WARNING: Skipping C:\Users\mtoews\AppData\Local\miniforge3\envs\test\Lib\site-packages\vtk-9.2.6.egg-info due to invalid metadata entry 'name'
Obtaining file:///D:/src/mypackage
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
  WARNING: Skipping C:\Users\mtoews\AppData\Local\miniforge3\envs\test\Lib\site-packages\vtk-9.2.6.egg-info due to invalid metadata entry 'name'
Collecting vtk (from mypackage==0.0.1)
  Using cached vtk-9.3.0-cp312-cp312-win_amd64.whl.metadata (5.3 kB)
Requirement already satisfied: matplotlib>=2.0.0 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from vtk->mypackage==0.0.1) (3.8.4)
Requirement already satisfied: contourpy>=1.0.1 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from matplotlib>=2.0.0->vtk->mypackage==0.0.1) (1.2.1)
Requirement already satisfied: cycler>=0.10 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from matplotlib>=2.0.0->vtk->mypackage==0.0.1) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from matplotlib>=2.0.0->vtk->mypackage==0.0.1) (4.51.0)
Requirement already satisfied: kiwisolver>=1.3.1 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from matplotlib>=2.0.0->vtk->mypackage==0.0.1) (1.4.5)
Requirement already satisfied: numpy>=1.21 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from matplotlib>=2.0.0->vtk->mypackage==0.0.1) (1.26.4)
Requirement already satisfied: packaging>=20.0 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from matplotlib>=2.0.0->vtk->mypackage==0.0.1) (24.0)
Requirement already satisfied: pillow>=8 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from matplotlib>=2.0.0->vtk->mypackage==0.0.1) (10.3.0)
Requirement already satisfied: pyparsing>=2.3.1 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from matplotlib>=2.0.0->vtk->mypackage==0.0.1) (3.1.2)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from matplotlib>=2.0.0->vtk->mypackage==0.0.1) (2.9.0)
Requirement already satisfied: six>=1.5 in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from python-dateutil>=2.7->matplotlib>=2.0.0->vtk->mypackage==0.0.1) (1.16.0)
Downloading vtk-9.3.0-cp312-cp312-win_amd64.whl (52.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━ 47.2/52.4 MB 4.0 MB/s eta 0:00:02
ERROR: Operation cancelled by user

and yes, I did cancel the operation to download vtk from pypi, since it is already installed to the test environment from conda.


Looking at the Core metadata specifications docs, the required entries are:

However, the .egg-info file is missing "Name".

One possible resolution is to amend the .egg-info file as:

Metadata-Version: 2.1
Name: vtk
Version: 9.2.6
Summary: VTK is an open-source toolkit for 3D computer graphics, image processing, and visualization
Platform: UNKNOWN

which has better output from pip install --dry-run -e .:

Obtaining file:///D:/src/mypackage
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Installing backend dependencies ... done
  Preparing editable metadata (pyproject.toml) ... done
Requirement already satisfied: vtk in c:\users\mtoews\appdata\local\miniforge3\envs\test\lib\site-packages (from mypackage==0.0.1) (9.2.6)
Would install mypackage-0.0.1

Installed packages

# packages in environment at C:\Users\mtoews\AppData\Local\miniforge3\envs\test:
#
# Name                    Version                   Build  Channel
aiohttp                   3.9.3           py312he70551f_1    conda-forge
aiosignal                 1.3.1              pyhd8ed1ab_0    conda-forge
aom                       3.8.2                h63175ca_0    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
blosc                     1.21.5               hbd69f2e_1    conda-forge
brotli                    1.1.0                hcfcfb64_1    conda-forge
brotli-bin                1.1.0                hcfcfb64_1    conda-forge
brotli-python             1.1.0           py312h53d5487_1    conda-forge
bzip2                     1.0.8                hcfcfb64_5    conda-forge
ca-certificates           2024.2.2             h56e8100_0    conda-forge
cairo                     1.18.0               h1fef639_0    conda-forge
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
contourpy                 1.2.1           py312h0d7def4_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_0    conda-forge
dav1d                     1.2.1                hcfcfb64_0    conda-forge
double-conversion         3.3.0                h63175ca_0    conda-forge
eigen                     3.4.0                h91493d7_0    conda-forge
expat                     2.5.0                h63175ca_1    conda-forge
ffmpeg                    6.1.1           gpl_h66c0b5b_108    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_1    conda-forge
fontconfig                2.14.2               hbde0cde_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.51.0          py312he70551f_0    conda-forge
freetype                  2.12.1               hdaf720e_2    conda-forge
frozenlist                1.4.1           py312he70551f_0    conda-forge
gettext                   0.22.5               h5728263_2    conda-forge
gettext-tools             0.22.5               h7d00a51_2    conda-forge
gl2ps                     1.4.2                h0597ee9_0    conda-forge
glew                      2.1.0                h39d44d4_2    conda-forge
glib                      2.80.0               h39d0aa6_4    conda-forge
glib-tools                2.80.0               h0a98069_4    conda-forge
graphite2                 1.3.13            h63175ca_1003    conda-forge
gst-plugins-base          1.24.1               h001b923_1    conda-forge
gstreamer                 1.24.1               hb4038d2_1    conda-forge
harfbuzz                  8.3.0                h7ab893a_0    conda-forge
hdf4                      4.2.15               h5557f11_7    conda-forge
hdf5                      1.14.3          nompi_h73e8ff5_100    conda-forge
icu                       73.2                 h63175ca_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
intel-openmp              2024.1.0           h57928b3_964    conda-forge
jsoncpp                   1.9.5                h2d74725_1    conda-forge
kiwisolver                1.4.5           py312h0d7def4_1    conda-forge
krb5                      1.21.2               heb0366b_0    conda-forge
lcms2                     2.16                 h67d730c_0    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libaec                    1.1.3                h63175ca_0    conda-forge
libasprintf               0.22.5               h5728263_2    conda-forge
libasprintf-devel         0.22.5               h5728263_2    conda-forge
libblas                   3.9.0              22_win64_mkl    conda-forge
libbrotlicommon           1.1.0                hcfcfb64_1    conda-forge
libbrotlidec              1.1.0                hcfcfb64_1    conda-forge
libbrotlienc              1.1.0                hcfcfb64_1    conda-forge
libcblas                  3.9.0              22_win64_mkl    conda-forge
libclang13                18.1.3          default_hf64faad_0    conda-forge
libcurl                   8.7.1                hd5e4a3a_0    conda-forge
libdeflate                1.20                 hcfcfb64_0    conda-forge
libexpat                  2.5.0                h63175ca_1    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libgettextpo              0.22.5               h5728263_2    conda-forge
libgettextpo-devel        0.22.5               h5728263_2    conda-forge
libglib                   2.80.0               h39d0aa6_4    conda-forge
libhwloc                  2.9.3           default_haede6df_1009    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
libintl                   0.22.5               h5728263_2    conda-forge
libintl-devel             0.22.5               h5728263_2    conda-forge
libjpeg-turbo             3.0.0                hcfcfb64_1    conda-forge
liblapack                 3.9.0              22_win64_mkl    conda-forge
libnetcdf                 4.9.2           nompi_h07c049d_113    conda-forge
libogg                    1.3.4                h8ffe710_1    conda-forge
libopus                   1.3.1                h8ffe710_1    conda-forge
libpng                    1.6.43               h19919ed_0    conda-forge
libsqlite                 3.45.2               hcfcfb64_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libtheora                 1.1.1             h8d14728_1005    conda-forge
libtiff                   4.6.0                hddb2be6_3    conda-forge
libvorbis                 1.3.7                h0e60522_0    conda-forge
libwebp-base              1.3.2                hcfcfb64_1    conda-forge
libxcb                    1.15                 hcd874cb_0    conda-forge
libxml2                   2.12.6               hc3477c8_1    conda-forge
libzip                    1.10.1               h1d365fa_3    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
loguru                    0.7.2           py312h2e8e312_1    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
matplotlib-base           3.8.4           py312h26ecaf7_0    conda-forge
mkl                       2024.1.0           h66d3029_692    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
multidict                 6.0.5           py312he70551f_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
nlohmann_json             3.11.3               h1537add_0    conda-forge
numpy                     1.26.4          py312h8753938_0    conda-forge
openh264                  2.4.1                h63175ca_0    conda-forge
openjpeg                  2.5.2                h3d672ee_0    conda-forge
openssl                   3.2.1                hcfcfb64_1    conda-forge
packaging                 24.0               pyhd8ed1ab_0    conda-forge
pcre2                     10.43                h17e33f8_0    conda-forge
pillow                    10.3.0          py312h6f6a607_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pixman                    0.43.4               h63175ca_0    conda-forge
platformdirs              4.2.0              pyhd8ed1ab_0    conda-forge
pooch                     1.8.1              pyhd8ed1ab_0    conda-forge
proj                      9.3.1                he13c7e8_0    conda-forge
pthread-stubs             0.4               hcd874cb_1001    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pugixml                   1.14                 h63175ca_0    conda-forge
pyparsing                 3.1.2              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
python                    3.12.2          h2628c8c_0_cpython    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pyvista                   0.43.5             pyhd8ed1ab_0    conda-forge
qt-main                   5.15.8              hcef0176_21    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
scooby                    0.9.2              pyhd8ed1ab_0    conda-forge
setuptools                69.2.0             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.2.0                hfb803bf_1    conda-forge
sqlite                    3.45.2               hcfcfb64_0    conda-forge
svt-av1                   2.0.0                h63175ca_0    conda-forge
tbb                       2021.11.0            h91493d7_1    conda-forge
tbb-devel                 2021.11.0            h3ec46f0_1    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
urllib3                   2.2.1              pyhd8ed1ab_0    conda-forge
utfcpp                    4.0.5                h57928b3_0    conda-forge
vc                        14.3                hcf57466_18    conda-forge
vc14_runtime              14.38.33130         h82b7239_18    conda-forge
vs2015_runtime            14.38.33130         hcb4865c_18    conda-forge
vtk                       9.2.6           qt_py312h1234567_220    conda-forge
vtk-base                  9.2.6           qt_py312h1234567_220    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
win32_setctime            1.1.0              pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
wslink                    1.12.4             pyhd8ed1ab_0    conda-forge
x264                      1!164.3095           h8ffe710_2    conda-forge
x265                      3.5                  h2d74725_3    conda-forge
xorg-libxau               1.0.11               hcd874cb_0    conda-forge
xorg-libxdmcp             1.1.3                hcd874cb_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yarl                      1.9.4           py312he70551f_0    conda-forge
zlib                      1.2.13               hcfcfb64_5    conda-forge
zstd                      1.5.5                h12be248_0    conda-forge

Environment info

active environment : test
    active env location : C:\Users\mtoews\AppData\Local\miniforge3\envs\test
            shell level : 2
       user config file : C:\Users\mtoews\.condarc
 populated config files : C:\Users\mtoews\AppData\Local\miniforge3\.condarc
                          C:\Users\mtoews\.condarc
          conda version : 24.3.0
    conda-build version : not installed
         python version : 3.10.14.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=cascadelake
                          __conda=24.3.0=0
                          __cuda=11.4=0
                          __win=0=0
       base environment : C:\Users\mtoews\AppData\Local\miniforge3  (writable)
      conda av data dir : C:\Users\mtoews\AppData\Local\miniforge3\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : D:\conda\pkgs
       envs directories : C:\Users\mtoews\AppData\Local\miniforge3\envs
                          C:\Users\mtoews\.conda\envs
                          C:\Users\mtoews\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/24.3.0 requests/2.31.0 CPython/3.10.14 Windows/10 Windows/10.0.19045 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8
          administrator : False
             netrc file : None
           offline mode : False
mwtoews commented 7 months ago

Comparing https://github.com/conda-forge/vtk-feedstock/blob/c08583a01ed5978be40d721e08c9ca4361e4b219/recipe/bld-base.bat#L51-L55

vs https://github.com/conda-forge/vtk-feedstock/blob/c08583a01ed5978be40d721e08c9ca4361e4b219/recipe/build-base.sh#L180-L186 it is clear that this issue will be resolved for Windows by adding "Name" as is done for macOS/Linux which already has "Name".