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
Add AppVeyor build with autoupload when commit is tagged with 'rel_*' #291
Conversation
this is great, thanks so much! I'll hopefully find time to try this out in the coming days. |
first observation: appveyors oauth for bitbucket wants to request global administrator perms over all my bitbucket repos. for github, it is much more appropriately targeted at read-only access. so pulling from github seems more likely here. |
- PYTHON: "C:\\Python26-x64" | ||
- PYTHON: "C:\\Python27-x64" | ||
- PYTHON: "C:\\Python33-x64" | ||
DISTUTILS_USE_SDK: "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the significance of DISTUTILS_USE_SDK? How do I add Python36 to this? do i need DISTUTILS_USE_SDK for that too ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used in build.cmd and "sets up the SDK needed for 64-bit builds of Python 3.3 or 3.4". More info here. It's not required on Python 3.5 and onwards.
confirm I can put all these scripts into the appveyor GUI directly rather than committing them to the repo ? Looks like I can set build->script, after_build, etc. This would be a lot more portable. |
I'm not sure how that would work with the separate |
OK, I didn't realize the support script was put out by pypa itself, that is a little better. basically my fear is having to support this. I can turn it on now and it will work, but then it's going to keep breaking every N months for whatever reason that adds to my workload. |
# Note that you must use the environment variable %PYTHON% to refer to | ||
# the interpreter you're using - Appveyor does not do anything special | ||
# to put the Python version you want to use on PATH. | ||
- "appveyor\\build.cmd %PYTHON%\\python.exe setup.py bdist_wheel" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be like:
python.exe setup.py egg_info --tag-build='' bdist_wheel
so that we don't have the 'dev' tag that comes from setup.cfg
I've got four environments building and also I had to rewrite the .bat file as powershell, now they are all failing like this:
I think I can add you as a "collaborator" that would allow you to poke at it. |
Those warnings can be ignored on Windows, see pypa/pip#3383 (comment) Looking at the log, it appears as if PowerShell can't parse something
|
It is invoking the command I'm giving it. It's running through the first few phases just fine and It's only failing at the "install_scripts" step. the "line:18 char:1" seems to only be showing what command was run that failed (e.g. the & command). |
needed an artifact config. now it succeeded. |
So I can't get the script https://raw.githubusercontent.com/pypa/python-packaging-user-guide/master/source/code/build.cmd to run as stated in appveyor's GUI, nor can I get the powershell version to actually run that alternate compiler. So I can't get the C extensions to build for Py33-64, 34-64. Also, I don't see how to get this to build an existing tag. It only has build master or build a branch. I see a web API to build a specific version but I don't feel like writing a POST script, I just want to push a button and build rel_1_1_14. Also I push those tags up before I do "python setup.py register", so I'd probably want to do this manually, so i need a script I guess to do that POST to build on a certain tag and also to figure out how to get the appveyor GUI to send the right magic to build those two python 3 versions, or otherwise just build for python3.5 and be done with it. |
Is there a reason why you didn't use CMD? I'd be happy to take a look to get it working.
I don't think there's a way to do this on the client, but I wouldn't expect this to be required. I can see that it'd be useful to test that it works now, though.
I don't understand why |
if you look at the first few builds it kept giving me the cryptic error message "The system cannot find the batch label specified -". googling / stackoverflowing did not help, I made sure it was CR/LF, took out all the comments in case it was the colons, no luck. From what I see in appveyor's docs here: https://www.appveyor.com/docs/build-configuration/#script-blocks-in-build-configuration , this is possibly not like a regular .bat file. The powershell version at least had normal error messages. |
I use python setup.py register to establish the new version number. If you only need to do "sdist upload" to do that, I was not aware. Pypi now has no way to remove a version once you put it up, a mistake means your version is ruined and I have to do a full repackage + retag + have a hole in my versions (this happened w/ Alembic once when I attempted to use some shiny new tool that was recommended) so I am extremely cautious and conservative in how I deal wtih it. Not sure how the tagging thing is supposed to work. Suppose I push the tag for rel_1_1_15. Something goes wrong on appveyor, like a network problem. Now I can't rebuild ? |
Ah yes, I see now:
I can try to get the PowerShell working then. Yes, uploading via If the build for the tag fails, you can always re-build a given commit: |
still, if we put this up, I can't build wheels for the existing tags w/o writing a POST script. |
Ok I have an alternative solution, which includes building wheels for macOS and Linux, and lets you build for old tags easily https://github.com/RazerM/sqlalchemy-wheels After setting up the PyPI variables, you could build wheels on all 3 platforms for a given tag like this: ./pushbuild.sh -u rel_1_1_4 |
I've been building wheels for every release using https://github.com/RazerM/sqlalchemy-wheels and it works well. |
this PR is still in my inbox as something I need to look at (I do "inbox zero" so the 8 or 9 messages that are there are significant). I'd have to find the time to go into it again but I recall there were limitations of travis making it difficult to integrate this into my workflow. |
I'm just leaving a link here to my solution: http://alextechrants.blogspot.fi/2017/10/automating-packaging-and-uploading-of.html |
Hi there - I'd still like to do this but I'd need someone to help integrate it into my workflow, at the moment the best workflow is where I'd relase to pypi normally, then that would trigger the placement of a .whl along with the same pypi release. A more complex workflow where we wait for the windows .whl to complete succesfully before building would require some more effort to integrate here, as I'd like builds to come from jenkins jobs and in this case the jenkins job would need to coordinate with appveyor to do the windows build, since I have no way of hosting any windows OSes or hardware. in any case, if contrbutors can continue to help with this, please reopen on the new repo at https://github.com/sqlalchemy/sqlalchemy, thanks! |
As discussed in #3747 (BitBucket)
3. Put those values in
appveyor.yml
.I've included the
appveyor/getwheels.py
script, which may be useful if you want to download the latest wheels for a build. I can remove it if you don't want it in the repo.