#2903 closed defect (fixed)

appveyor "artifacts" aren't correctly named

Reported by: warner Owned by: daira
Priority: normal Milestone: eventually
Component: packaging Version: 1.12.1
Keywords: windows Cc:
Launchpad Bug:

Description

We use Appveyor.com (like Travis-CI but just for Windows) to run tests and produce binary wheels for Tahoe-LAFS and its dependencies. However something is misconfigured, because the "artifacts" page only lists a single downloadable dist.zip file, instead of several separate .whl or .zip files.

One example is here: https://ci.appveyor.com/project/tahoe-lafs/tahoe-lafs/build/1.0.1033/job/aymf87t0b5e4c6ev/artifacts

The most relevant settings are in the .appveyor.yml file in the source tree, towards the bottom:

after_test:
  # This builds the main tahoe wheel, and wheels for all dependencies.
  # Again, you only need build.cmd if you're building C extensions for
  # 64-bit Python 3.3/3.4. And you need to use %PYTHON% to get the correct
  # interpreter
  - |
    rd /s /q _trial_temp
    %PYTHON%\python.exe setup.py bdist_wheel
    %PYTHON%\python.exe -m pip wheel -w dist .

artifacts:
  # bdist_wheel puts your built wheel in the dist directory
  # "pip wheel -w dist ." puts all the dependency wheels there too
  # this gives us a zipfile with everything
  - path: dist

I was hoping that dist would mean to make separate artifacts for every file in the dist/ directory, but obviously I've got the syntax wrong (if it's even possible to express what I wanted).

On a different project (Magic-Wormhole), I used - path: dist\*, but it then produced an artifact with an embedded backslash in the name: dist\magic_wormhole-0.10.4-py2.py3-none-any.whl. When I use wget to save this to disk, I wind up with a literal percent character in the filename: dist%2Fmagic_wormhole-0.10.4-py2.py3-none-any.whl.

I have the same backslash problem on zfec, since I copied the .appveyor.yml from magic-wormhole. We don't yet have appveyor set up on pycryptopp, but it'd be similarly nice to produce the correct artifacts.

Change History (2)

comment:1 Changed at 2018-02-08T20:15:15Z by warner

Ok, I found a syntax that gets us separate artifacts for each .whl file. The backslash problem is still there, but not as important as I thought. There are three ways you might download the artifact from Appveyor, and two of them work correctly:

  • click the link: the browser brings up a download dialog box (probably because the .whl file type can't be rendered like .html or .jpg), and the default name is correct
  • use "Save Link As" from the browser's popup menu: default name is correct
  • copy the link and use wget to download it: filename starts with dist%2F

I think that's good enough for now. There might be a way to have the windows build run a script that does the equivalent of cd dist && appveyor PushArtifact *.whl, which might leave out the dist\ from the displayed filenames, which might allow copy-and-wget to work. But I think most folks will download those wheels by clicking on the link, and at least that works.

I'll land the PR to switch to - path: 'dist\*' in a moment.

comment:2 Changed at 2018-02-08T20:15:40Z by Brian Warner <warner@…>

  • Resolution set to fixed
  • Status changed from new to closed

In c8f747c/trunk:

Merge branch '2903-appveyor'

Fix the 'artifact' upload syntax to get separate wheels for all dependencies.

closes ticket:2903

Note: See TracTickets for help on using tickets.