conda-forge / vega-cli-feedstock

A conda-smithy repository for vega-cli.
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

Windows support? #4

Closed sjorspeterse closed 3 years ago

sjorspeterse commented 4 years ago

Issue: No Windows support

Hi! I'm trying to get altair_saver to work, but it depends on this package. Are there any plans on supporting Windows?
Environment (conda list):

``` $ conda list ``` | # Name | Version | Build | Channel | |--------------------|-------------|-------------------|-------------| | altair | 4.1.0 | py_1 | conda-forge | | altair_data_server | 0.4.1 | py_0 | conda-forge | | altair_viewer | 0.3.0 | py_0 | conda-forge | | attrs | 19.3.0 | py_0 | conda-forge | | brotlipy | 0.7.0 | py37h4ab8f01_1000 | conda-forge | | ca-certificates | 2020.4.5.2 | hecda079_0 | conda-forge | | certifi | 2020.4.5.2 | py37hc8dfbb8_0 | conda-forge | | cffi | 1.14.0 | py37ha419a9e_0 | conda-forge | | cryptography | 2.9.2 | py37h26f1ce3_0 | conda-forge | | entrypoints | 0.3 | py37hc8dfbb8_1001 | conda-forge | | idna | 2.9 | py_1 | conda-forge | | importlib-metadata | 1.6.1 | py37hc8dfbb8_0 | conda-forge | | importlib_metadata | 1.6.1 | 0 | conda-forge | | intel-openmp | 2020.0 | 166 | | | jinja2 | 2.11.2 | pyh9f0ad1d_0 | conda-forge | | jsonschema | 3.2.0 | py37hc8dfbb8_1 | conda-forge | | libblas | 3.8.0 | 15_mkl | conda-forge | | libcblas | 3.8.0 | 15_mkl | conda-forge | | liblapack | 3.8.0 | 15_mkl | conda-forge | | markupsafe | 1.1.1 | py37h8055547_1 | conda-forge | | mkl | 2020.0 | 166 | | | nodejs | 14.4.0 | 0 | conda-forge | | numpy | 1.18.5 | py37hae9e721_0 | conda-forge | | openssl | 1.1.1g | he774522_0 | conda-forge | | pandas | 1.0.4 | py37h3bbf574_0 | conda-forge | | pip | 20.1.1 | py_1 | conda-forge | | portpicker | 1.3.1 | py37_0 | | | pycparser | 2.20 | py_0 | conda-forge | | pyopenssl | 19.1.0 | py_1 | conda-forge | | pyrsistent | 0.16.0 | py37h8055547_0 | conda-forge | | pysocks | 1.7.1 | py37hc8dfbb8_1 | conda-forge | | python | 3.7.7 | h81c818b_4 | | | python-dateutil | 2.8.1 | py_0 | conda-forge | | python_abi | 3.7 | 1_cp37m | conda-forge | | pytz | 2020.1 | pyh9f0ad1d_0 | conda-forge | | selenium | 3.141.0 | py37h8055547_1001 | conda-forge | | setuptools | 47.1.1 | py37hc8dfbb8_0 | conda-forge | | six | 1.15.0 | pyh9f0ad1d_0 | conda-forge | | sqlite | 3.31.1 | h2a8f88b_1 | | | toolz | 0.10.0 | py_0 | conda-forge | | tornado | 6.0.4 | py37hfa6e2cd_0 | conda-forge | | urllib3 | 1.25.9 | py_0 | conda-forge | | vc | 14.1 | h869be7e_1 | conda-forge | | vs2015_runtime | 14.16.27012 | h30e32a0_2 | conda-forge | | wheel | 0.34.2 | py_1 | conda-forge | | win_inet_pton | 1.1.0 | py37_0 | conda-forge | | wincertstore | 0.2 | py37_1003 | conda-forge | | zipp | 3.1.0 | py_0 | conda-forge | | zlib | 1.2.11 | h2fa13f4_1006 | conda-forge |


Details about conda and system ( conda info ):

``` $ conda info ``` | active environment : | altair | |-------------------------:|-------------------------------------------------------------------------| | active env location : | C:\Users\spsjo\anaconda3\envs\altair | | shell level : | 2 | | user config file : | C:\Users\spsjo\.condarc | | populated config files : | C:\Users\spsjo\.condarc | | conda version : | 4.8.3 | | conda-build version | : 3.18.11 | | python version : | 3.7.7.final.0 | | virtual packages : | __cuda=10.1 | | base environment : | C:\Users\spsjo\anaconda3 (writable) | | channel URLs : | https://conda.anaconda.org/conda-forge/win-64 | | | https://conda.anaconda.org/conda-forge/noarch | | | https://repo.anaconda.com/pkgs/main/win-64 | | | https://repo.anaconda.com/pkgs/main/noarch | | | https://repo.anaconda.com/pkgs/r/win-64 | | | https://repo.anaconda.com/pkgs/r/noarch | | | https://repo.anaconda.com/pkgs/msys2/win-64 | | | https://repo.anaconda.com/pkgs/msys2/noarch | | package cache : | C:\Users\spsjo\anaconda3\pkgs | | | C:\Users\spsjo\.conda\pkgs | | | C:\Users\spsjo\AppData\Local\conda\conda\pkgs | | envs directories : | C:\Users\spsjo\anaconda3\envs | | | C:\Users\spsjo\.conda\envs | | | C:\Users\spsjo\AppData\Local\conda\conda\envs | | platform : | win-64 | | user-agent : | conda/4.8.3 requests/2.23.0 CPython/3.7.7 Windows/10 Windows/10.0.18362 | | administrator : | False | | netrc file : | C:\Users\spsjo/.netrc | | offline mode : | False |
stanmart commented 4 years ago

Both of the dependencies of vega-cli (yarn and node) are already on conda-forge, so adding Windows support simply consists of replicating the build.sh script in a bld.bat file. I took a first stab at it, but I run into some issues. yarn add installs the vega-cli package successfully, and when executing the vg2pdf.cmd and other commands (which are just a wrapper for invoking node vg2pdf as Windows does not recognize shebangs) from the $PREFIX/lib/vega-cli/node_modules/.bin/ folder they fork file. However if I make a symlink of them to the $PREFIX/bin folder they stop working as node.exe looks for the vg2pdf script in the wrong palce.

I can see two solutions:

But I'm a bit ahead of myself. First, and most importantly, are you devs even open to adding Windows support to this feedstock? If yes, then what do you think about the above solutions? Or is there a proper way to symlink the yarn-created .cmd file to a directory on the path, that I am missing?