conda-forge / vim-feedstock

A conda-smithy repository for vim.
BSD 3-Clause "New" or "Revised" License
3 stars 11 forks source link

add Windows support #1595

Closed matthiasdiener closed 3 years ago

matthiasdiener commented 3 years ago

Build instructions were mostly taken from https://github.com/vim/vim-win32-installer/blob/master/appveyor.bat

Followup of:

Checklist

conda-forge-linter commented 3 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

matthiasdiener commented 3 years ago

This is ready for a first look @bdice @kozo2

bdice commented 3 years ago

@matthiasdiener Very nice! This appears to fix the issues with runtime files that I had in my previous attempt. Were you able to verify that the runtime files are working as expected when using the resulting vim.exe?

matthiasdiener commented 3 years ago

@matthiasdiener Very nice! This appears to fix the issues with runtime files that I had in my previous attempt. Were you able to verify that the runtime files are working as expected when using the resulting vim.exe?

I haven't verified that vim works correctly on Windows yet, I was hoping one of you could try if it works ;-) For some reason, azure doesn't seem to save the build artifact though.

matthiasdiener commented 3 years ago

@conda-forge-admin, rerender

github-actions[bot] commented 3 years ago

Hi! This is the friendly automated conda-forge-webservice. I tried to rerender for you but ran into some issues, please ping conda-forge/core for further assistance. You can also try re-rendering locally.

kozo2 commented 3 years ago

@matthiasdiener Very nice! This appears to fix the issues with runtime files that I had in my previous attempt. Were you able to verify that the runtime files are working as expected when using the resulting vim.exe?

I haven't verified that vim works correctly on Windows yet, I was hoping one of you could try if it works ;-) For some reason, azure doesn't seem to save the build artifact though.

I tried to build this repo locally (in my Windows env) to try if it works but the build didn't run as below

(base) C:\Users\kozo2\Documents\GitHub>conda build vim-feedstock
No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.16
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.16
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Skipped: vim from C:\Users\kozo2\Documents\GitHub\vim-feedstock\recipe defines build/skip for this configuration ({'c_compiler': 'vs2017', 'cxx_compiler': 'vs2017', 'target_platform': 'win-64', 'python': '3.9'}).
Renaming work directory 'C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work' to 'C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work_moved_vim-8.2.3427-py39h82bb817_2_win-64_main_build_loop'
INFO:conda_build.utils:Renaming work directory 'C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work' to 'C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work_moved_vim-8.2.3427-py39h82bb817_2_win-64_main_build_loop'
shutil.move(work)=C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work, dest=C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work_moved_vim-8.2.3427-py39h82bb817_2_win-64_main_build_loop)
INFO:conda_build.utils:shutil.move(work)=C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work, dest=C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work_moved_vim-8.2.3427-py39h82bb817_2_win-64_main_build_loop)
# Automatic uploading is disabled
# If you want to upload package(s) to anaconda.org later, type:

# To have conda build upload to anaconda.org automatically, use
# $ conda config --set anaconda_upload yes
anaconda upload ^

anaconda_upload is not set.  Not uploading wheels: []

INFO :: The inputs making up the hashes for the built packages are as follows:
{}

####################################################################################
Resource usage summary:

Total time: 0:00:00.1
CPU usage: sys=0:00:00.0, user=0:00:00.0
Maximum memory usage observed: 0B
Total disk usage observed (not including envs): 0B

Do you have any ideas?

matthiasdiener commented 3 years ago

@matthiasdiener Very nice! This appears to fix the issues with runtime files that I had in my previous attempt. Were you able to verify that the runtime files are working as expected when using the resulting vim.exe?

I haven't verified that vim works correctly on Windows yet, I was hoping one of you could try if it works ;-) For some reason, azure doesn't seem to save the build artifact though.

I tried to build this repo locally (in my Windows env) to try if it works but the build didn't run as below

(base) C:\Users\kozo2\Documents\GitHub>conda build vim-feedstock
No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.16
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.16
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Skipped: vim from C:\Users\kozo2\Documents\GitHub\vim-feedstock\recipe defines build/skip for this configuration ({'c_compiler': 'vs2017', 'cxx_compiler': 'vs2017', 'target_platform': 'win-64', 'python': '3.9'}).
Renaming work directory 'C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work' to 'C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work_moved_vim-8.2.3427-py39h82bb817_2_win-64_main_build_loop'
INFO:conda_build.utils:Renaming work directory 'C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work' to 'C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work_moved_vim-8.2.3427-py39h82bb817_2_win-64_main_build_loop'
shutil.move(work)=C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work, dest=C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work_moved_vim-8.2.3427-py39h82bb817_2_win-64_main_build_loop)
INFO:conda_build.utils:shutil.move(work)=C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work, dest=C:\Users\kozo2\mambaforge\conda-bld\vim_1632869536540\work_moved_vim-8.2.3427-py39h82bb817_2_win-64_main_build_loop)
# Automatic uploading is disabled
# If you want to upload package(s) to anaconda.org later, type:

# To have conda build upload to anaconda.org automatically, use
# $ conda config --set anaconda_upload yes
anaconda upload ^

anaconda_upload is not set.  Not uploading wheels: []

INFO :: The inputs making up the hashes for the built packages are as follows:
{}

####################################################################################
Resource usage summary:

Total time: 0:00:00.1
CPU usage: sys=0:00:00.0, user=0:00:00.0
Maximum memory usage observed: 0B
Total disk usage observed (not including envs): 0B

Do you have any ideas?

I think this might be happening since you need to use the branch of this PR, no the master branch of the repo.

In any case, the artifacts are fixed now; Could you please take a look if this works for you:

https://artprodeus21.artifacts.visualstudio.com/A910fa339-c7c2-46e8-a579-7ea247548706/84710dde-1620-425b-80d0-4cf5baca359d/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2NvbmRhLWZvcmdlL3Byb2plY3RJZC84NDcxMGRkZS0xNjIwLTQyNWItODBkMC00Y2Y1YmFjYTM1OWQvYnVpbGRJZC8zODM4MTQvYXJ0aWZhY3ROYW1lL2NvbmRhX2FydGlmYWN0c18zODM4MTRfd2luXzY0Xw2/content?format=zip

kozo2 commented 3 years ago

@matthiasdiener Thank you. I tried the artifacts, and installed it with:

(base) C:\Users\kozo2\Desktop\conda_artifacts_383814_win_64_\win-64>conda install vim-8.2.3427-h0e60522_3.tar.bz2

and it seems that it works like the following attached image.

image

image

By the way, gvim.exe did not exist, and the version: of the vim.exe is -python3 instead of +python3. Does this match your expectations?

matthiasdiener commented 3 years ago

@matthiasdiener Thank you. I tried the artifacts, and installed it with:

(base) C:\Users\kozo2\Desktop\conda_artifacts_383814_win_64_\win-64>conda install vim-8.2.3427-h0e60522_3.tar.bz2

and it seems that it works like the following attached image.

Great, thank you for checking!

By the way, gvim.exe did not exist, and the version: of the vim.exe is -python3 instead of +python3. Does this match your expectations?

Yes, this matches my (current) expectations. gvim will probably continue to not be built, but I'll look again if I can enable Python support.

conda-forge-linter commented 3 years ago

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict. Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

conda-forge-linter commented 3 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

matthiasdiener commented 3 years ago

Well, that seems to have worked. Could you please check any of the Windows artifacts here to see if they are running? https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=385244&view=artifacts&pathAsName=false&type=publishedArtifacts @bdice @kozo2

kozo2 commented 3 years ago

@matthiasdiener Now it seems that there is no problem about the vim.exe. :version has +python3/dyn and :!python --version prints Python 3.9.7

In my case, vim.exe was installed under \mambaforge\Library\bin, and the it seems that I don't have the PATH there. So I need to specify the vim.exe full path. I don't know if this is the same in other people's environments.

If the conda environment can find the path to vim.exe, it can be said that everything is working fine.

bdice commented 3 years ago

@matthiasdiener @kozo2 The package artifacts work great for me! I verified that the option +python3/dyn is set and :verbose set pythonthreedll? returns pythonthreedll=python39.dll. I do have Library\bin on my PATH, so it just worked immediately as vim.exe without specifying the full path. Thanks @matthiasdiener for your hard work on this! 🚀

matthiasdiener commented 3 years ago

Thank you for checking! As far as I can tell, LIBRARY_BIN is the right location for the files, so I'll go ahead and merge this PR. Please let me know if you notice issues with the windows package.