0

During development I build and push feature branch versions of my package that look like: 1.2.3+mybranch.

So I'll have packages named 1.2.3, 1.2.3+mybranch and 1.2.4+mybranch, and 1.2.4.

The problem is it seems pip has no problem installing a package with a +suffix when doing a regular pip install --upgrade.

I don't want pip to do that.

Is there a way I can have only release versions installed with pip install --upgrade? I would think pip would do this by default.

red888
  • 27,709
  • 55
  • 204
  • 392

1 Answers1

0

I found the answer in a comment here: How to correctly create Python feature branch releases in development? (pip and PEP-440)

I just needed to include a proper pre-release version.

So 1.2.3+mybranch should be 1.2.3-dev0+mybranch. Now pip will ignore my feature branch versions by default because it knows they are pre-releases.

red888
  • 27,709
  • 55
  • 204
  • 392