{"id":16806577,"url":"https://github.com/pkgw/conda-forge-windows-vagrant-builder","last_synced_at":"2025-03-17T08:16:27.204Z","repository":{"id":138163728,"uuid":"146045525","full_name":"pkgw/conda-forge-windows-vagrant-builder","owner":"pkgw","description":"Build conda-forge packages for Windows on Linux, using Vagrant","archived":false,"fork":false,"pushed_at":"2018-12-28T01:54:40.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T17:36:12.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pkgw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-24T22:30:47.000Z","updated_at":"2018-12-28T01:54:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"2da344d8-cafe-452c-9ac1-888bee2f1160","html_url":"https://github.com/pkgw/conda-forge-windows-vagrant-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkgw%2Fconda-forge-windows-vagrant-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkgw%2Fconda-forge-windows-vagrant-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkgw%2Fconda-forge-windows-vagrant-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkgw%2Fconda-forge-windows-vagrant-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkgw","download_url":"https://codeload.github.com/pkgw/conda-forge-windows-vagrant-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243997126,"owners_count":20380981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T09:51:21.623Z","updated_at":"2025-03-17T08:16:27.198Z","avatar_url":"https://github.com/pkgw.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vagrant-based conda-forge Windows Builder\n\nThis repo provides a system that lets you use a Linux machine to build\n[conda-forge](https://conda-forge.org/) software packages for the\n[Windows](https://www.microsoft.com/en-us/windows) operating system. It does\nthis by setting up a [Vagrant](https://www.vagrantup.com/) “box” (virtual\nmachine) that does the actual package building.\n\n\n## Preparation\n\nIn order to use this system, you of course need to have Vagrant installed.\n\nYou will also need about 40 GiB of free disk space to store the various\nvirtual machine images used in this process. Yikes!\n\nYou also need to specify or create the directory that will contain the files\nfor the various feedstocks that you intend to build within the Windows Vagrant\nbox. This directory should be an item named `feedstocks` created in the\ndirectory containing this file, but it can be a symbolic link to some other\ndirectory, e.g.:\n\n```\nln -s ~/src/conda feedstocks\n```\n\nThe Vagrant box will only be able to access directories below this prefix, so\nchoose something that will contain all of the feedstock directories you care\nabout.\n\nFinally, you will need to create a new “base box” that modifies\n[the official Microsoft VM images](https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/)\nto work with SSH. The files and instructions for doing so are in\n[the `msedgewin10_newssh` submodule](./msedgewin10_newssh/README.md). If this\ndirectory is empty, use the command `git submodule update --init --recursive`\nto populate it.\n\n\n## Usage\n\nAll tools provided by this repository are accessed through the script\n`./driver.sh`, which provides various “subcommands” like `git`.\n\nThe first subcommand you must run is `setup`. You must give it the name of the\ncustom base box created using the steps described in\n[the `msedgewin10_newssh` subdirectory](./msedgewin10_newssh/README.md).\nAn example name of the resulting box might be `msedgewin10_newssh_17.17134`.\nJust pass that name as an argument to the `setup` command:\n\n```\n./driver.sh setup msedgewin10_newssh_17.17134\n```\n\nOnce that’s done, the most important subcommand is `build`, which uses\n`conda-build` to try building a package in the Windows box. You pass it the\npath to a feedstock directory, *which must be relative to the “feedstocks”\ndirectory* set up above:\n\n```\n./driver.sh build feedstocks/fontconfig-feedstock\n```\n\nThe first time you run this command (or any others that interact with the\nVagrant box), Vagrant will set up the builder box, which involves some large\ndownloads and can take a while. Once the box has been set up, however,\nstarting it back up is relatively quick.\n\n**Note**: you might need to run `vagrant reload` after first booting up the\nbox, to get some system settings changes to apply on a reboot.\n\nAlso note that you must have\n[rerendered](https://github.com/conda-forge/staged-recipes/wiki/conda-smithy-rerender)\nthe feedstock so that Conda-build actually thinks that there is anything to do\nfor Windows. Specifically, there should be files within the feedstock whose\nnames match the shell glob `.ci_support/win_*.yaml`. You can do this rerender\non your Linux box.\n\nThere are also other helper commands. One will perform a package search within\nthe Windows box, which is helpful for investigating support libraries provided\nby MSYS2. For example:\n\n```\n./driver.sh search gettext\n```\n\nThe command `sshfs` will mount the C: drive of the Windows machine on the\nspecified local path (creating it if necessary) using the\n[sshfs](https://github.com/libfuse/sshfs) filesystem (i.e., a userspace\nnetwork mount using SFTP behind the scenes). This can be an absolute lifesaver\nsince the Windows SSH terminal emulator is not correct enough to run an\ninteractive text editor.\n\n```\n./driver.sh sshfs winfs\n```\n\nUse the command `fusermount -u {local_path}` to manually unmount the SSHFS\nfilesystem. Note that Emacs has trouble saving files within such a mount: when\noverwriting an existing file, it wants to use the `O_TRUNC` flag, but it seems\nthat the Windows SFTP subsystem doesn’t support the truncation operation.\nSadly, setting\n[file-precious-flag](https://www.gnu.org/software/emacs/manual/html_node/elisp/Saving-Buffers.html)\ndoesn’t seem to help. Vim can save files just fine.\n\nAnother one will print out the URLs to the tarballs associated with a particular\npackage, which is helpful for investigating exactly which files it provides:\n\n```\n./driver.sh urls m2w64-gettext\n```\n\nThe `purge` command will run `conda build purge`:\n\n```\n./driver.sh purge\n```\n\nThe `pull` command will copy a *Windows-format* path to the directory\ncontaining this file. Note that you must properly quote the Windows path\nso that your Unix shell doesn’t eat the backslashes it likely contains.\n\n```\n./driver.sh pull 'C:\\mc3\\conda-bld\\win-64\\freetype-2.9.1-he8b6a0d_4.tar.bz2'\n```\n\n\n## More details\n\nBy default, running `vagrant ssh` will drop you into a PowerShell in the\nVagrant box. The box is provisioned with a batch file named `condabash`, that\nwill in turn drop you into a bash shell configured with the relevant Conda\nenvironment. The provisioning process installs the MSYS2 `posix` package,\nwhich provides an environment that is relatively close to a standard Unix\nshell. The conda-forge install lives in `C:\\mc3`, A.K.A `/c/mc3` according to\nUnix tools. (This is not the Chocolatey default due to a nasty problem with\nthe case-insensitivity of the Windows filesystem.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkgw%2Fconda-forge-windows-vagrant-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkgw%2Fconda-forge-windows-vagrant-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkgw%2Fconda-forge-windows-vagrant-builder/lists"}