PyPI deploy failing on Windows: "Couldn't install pip, setuptools, twine or wheel."

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.


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.

Imprint