-
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
Added a python distutils setup.py for easy installation as a python package #42
Conversation
Being able to install Jsonnet's python bindings with just pip install jsonnet sounds awesome. Can we set it up so only stable releases get uploaded? I'll cut a new one right now, it's been a while. |
This setup.py is able to build fine, however my company's internal pypi server was rejecting it (returning 500 errors without an error message). I'm going to take a look and see if it's the setup.py's fault or the server's fault before we merge this. As for telling travis to only upload stable builds to pypi, travis has an option for uploading to pypi for only tagged commits instead of all commits (however, this is still an issue if you tag commits which are unstable). I think their intention is that you would have a "stable" branch which only has stable tags on it. Note that it's also not all that inconvenient to upload to pypi manually - if you have a .pypirc, it's as easy as running one command. |
Just updated the PR with fixes that allow it to actually work with PyPi:
I also added you as the author. |
Also put a test version of it called "paul-jsonnet" into pypi to test that it works with the official pypi. You can try it out with:
|
It worked for me, but I had to use --pre. Presumably this is because I appended -beta to all the versions. I did that because I misunderstood semantic versioning at the time :). If I do a new release with just v0.8.1 do you think it would fix it? |
Doesn't work for me, on a Mac.
|
@PaulFurtado Sorry I forgot about this. I'm going to merge, but first I need you to sign the contributor license agreement, either https://cla.developers.google.com/about/google-individual or https://cla.developers.google.com/about/google-corporate -- it's a legal requirement from Google (common for big companies working in the open source community). |
@dgarstang Thanks for the report -- I'll try this out on latest HEAD and see if any issue remains. From a quick glance at the Makefile I can't see -std=c++0x being passed to $CC so I think it will work now. |
@sparkprime Sorry for the delay, I just submitted the CLA, thanks |
Yes, it fails to compile on OS X. My friend gave me his macbook for 20 minutes to debug it, but I couldn't figure out what compile flags I needed to make it work, even running |
So I got my colleague to try make _jsonnet.so on his 10.9.5 mac and it worked OK. |
Added a python distutils setup.py for easy installation as a python package
David, Thanks. Doesn't work for me tho... cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os Doug. On Mon, Jun 1, 2015 at 12:42 PM, Dave Cunningham [email protected]
Regards, Douglas Garstang |
This allows python developers to build jsonnet by running:
And it can be installed to the system with something like:
It would be great to use this to automatically deploy to pypi with travis, so python users can get a working jsonnet by just running:
This would also allow python applications to specify jsonnet as a dependency.
See: http://docs.travis-ci.com/user/deployment/pypi/
Let me know what you think