How to get rid of "dev" postfix in version number when packaging a python module with devpi

StackOverflow https://stackoverflow.com/questions/19975042

  •  30-07-2022
  •  | 
  •  

Question

I use devpi to deploy python modules. When I upload packages via devpi upload the generated module name always contains the 'dev' postfix after the version number. When I try to install those packages using pip install ... I have to specify the --pre flag. How do I get rid of this 'pre' postfix? I assume that I somehow have to mark the module as release version, but I have no clue how.

Was it helpful?

Solution

I expect it is due to the fact that you have tag_build = dev somewhere. The most likely place for this is in a setup.cfg file if you have one although I think it could also be in your setup.py file. (Both of these files would live in the top level directory of your package code)

This is what my setup.cfg looks like:

[egg_info]
tag_build = dev

When I want to do a final release I remove the dev tag and leave it like this:

[egg_info]
tag_build =

The release then won't have the dev prefix any longer.

OTHER TIPS

It may be your version number in your setup.py (please do include specifics such as relevant files when posting).

pip determines what a pre-release version is as specified by PEP 426 (e.g. >=0.0.dev0) and so your version may be defined as a pre-release version. See here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top