I’ve noticed the last couple releases I’ve tried to make for some packages that use the “pypi” provider deployment are failing on Windows (and Windows only) with:
failed to deploy
-z was unexpected at this time.
Couldn't install pip, setuptools, twine or wheel.
This looks like it must be a flag that the deployment tools are adding. An example failing build: https://travis-ci.org/pytroll/pycoast/jobs/621782819
Any ideas what’s going on?
I have the same issue at https://travis-ci.org/rdiff-backup/rdiff-backup/jobs/647023927 (also only Windows) and I doubt that the issue has to do with our environment. From the error message, I rather think that it is due to the shell in the Travis Windows environment not able to understand the if [ -z ${VIRTUAL_ENV+x} ];
construct. A rapid resolution would be more than welcome.
1 Like
What is that supposed to do?
Regardless of setups, [ -z $var ]
with no quotes is definitely a bug.
travis-ci:v1
← native-api:z-quotes
opened 01:19AM - 07 Feb 20 UTC
travis-ci:master
← native-api:z-quotes-master
opened 01:20AM - 07 Feb 20 UTC
According to my tests, this fixes the initially reported issue with the -z
(I have another issue but I’ll ask separately.
Example: https://travis-ci.org/rdiff-backup/rdiff-backup/builds/647642574
resp. https://travis-ci.org/rdiff-backup/rdiff-backup/jobs/647642595
Sorry, I misinterpreted the results and I still have the issue at https://travis-ci.org/rdiff-backup/rdiff-backup/jobs/647656528 despite having the edge
thingy using the patched branch.
@ericzolf Your project seems to work for me: https://travis-ci.org/native-api/rdiff-backup/jobs/648367199 – so I couldn’t reproduce the problem with the fix.
I added tracing to the corresponding command in my branch, please try again. We should now see what’s happening there.
Sorry for the delay, the windows build is still failing but apparently not for the initial reason: https://travis-ci.org/rdiff-backup/rdiff-backup/jobs/651364432
The strange thing is that I see only warnings but the deployment fails, even though it works for the Linux jobs https://test.pypi.org/project/rdiff-backup/1.9.0b1.dev15/#files
Is there a way to get more info about the deploy issue?
The warnings are indeed the cause. You need to place python
, pip
and twine
on PATH
.
According to https://github.com/travis-ci/dpl/blob/master/lib/dpl/provider/pypi.rb , pypi deployer is hard-wired to invoke python, twine and pip. So you need to override those commands. Creating symlinks in ~/bin (or whatever is early on PATH) in before_deploy: comes to mind.
Oh, and running the build in a virtualenv (as it also overrides python and commands for installed scripts) is an all-time favorite (I completely forgot about that!)