Search code examples
pythonpython-wheelpython-packagingdevpi

How to remove one wheel file from a release?


There's a package with multiple wheels built for different architecture. The 2.7 wheel has an issue and needs to be removed from the index.

The devpi remove sub-command just accepts a single positional argument:

positional arguments:
  spec             remove info/files for a project/version/release file from
                   the current index. Example specs: 'pytest' or
                   'pytest>=2.3.5'

Asking to remove a version number lists all the wheels:

$ devpi remove "somepackage==1.2.3"
About to remove the following releases and distributions
version: 1.2.3
  - https://devpi/x/y/+f/cafef00d/somepackage-1.2.3-268-cp27-cp27mu-linux_x86_64.whl
  - https://devpi/x/y/+f/cafef00d/somepackage-1.2.3-268-cp36-cp36m-linux_x86_64.whl
Are you sure (yes/no)?

It just prompts to remove all or none. How to specify the 'spec' to only remove the 2.7 wheel? It's not possible to just ssh into devpi server and getting rid of the file itself, but this leaves the devpi metadata all screwed up and the index views still think that wheel exists.

The devpi client version is 3.0.0 and the server version is 4.0.0.


Solution

  • I raised this with the project maintainers, and it is not possible in the current version of devpi:

    https://github.com/devpi/devpi/issues/448

    See the issue 448 for a (very hacky) workaround.