-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish binary releases for Windows #734
Comments
There are two practical problems with that:
That said, I would really like to see it, especially since problems with compilation on Windows (either manually or through pip) surface from time to time and we are not currently very well equipped to help with that. |
I would like to correct you on that. Travis actually has support for Windows . I'm not sure about deployment here, but i had experience building with CMake on Windows. It was not easy enough to correctly setup the env variables, though. Here's what I eventually ended up with. Should I try something similar here? |
Thanks, that's good to know.
|
Okay, so, given that Windows has no
Also, which version of python should be used? |
The most important part is building the actual binary. For Linux and Mac it happens at the
Then it needs to be packaged (zipped I guess). The stuff you posted is there for testing, I think. I don't think there is any effect of the Python part of the resultant archive. If it doesn't cause problems it's good to preserve this for Windows, too. Python 3 should be used in such case. |
I built a package with binary releases for all major platforms (Windows/Linux/macOS).
I really only changed setup.py to not use I used GitHub Actions with cibuildwheel to build the wheels. Should be easy enough to replicate to Travis CI. |
Having something native on windows would be great as I ran in to the same problem here. Installing python on my windows machine unfortunately is also not an option. I do have docker running and I've created a small bash script which allows me to pretend that I have jsonnet installed locally 😅. This is only really usable is performance is something you don't care about. #! /usr/bin/env bash
#
# Clearly access to a docker host is required to make this work... For a windows setup
# we will also be assuming that all the relevant drives (C, D, whatever) are mounted on
# the docker host under "/c", "/d", etc.
#
docker pull --quiet mexisme/jsonnet:latest > /dev/null
( winpty -Xallow-non-tty docker run --rm --tty \
--env TERM=xterm \
--volume "//c://c" \
--workdir "/$( cygpath --unix --absolute $PWD )" \
mexisme/jsonnet:latest "//jsonnet" "$@"
) | sed -e 's/\x1b\[[^@-~]*[@-~]//g'
# Because winpty is a little finicky with how the control characters are forwarded
# we're going to strip them out. This regex was taken from: https://stackoverflow.com/a/24005600/95019 |
Is there any way I could use this to build the normal jsonnet or trick a conda installation such that it uses jsonnetbin? I am trying to use a library which has jsonnet as its dependency |
FWIW I'm open to PRs changing the official jsonnet package to stop depending on Makefile for the Python extension (and use a similar approach as jsonnetbin). |
It would be great to have binary releases also for Windows.
Related to #109
The text was updated successfully, but these errors were encountered: