#46 cx_Freeze doesn't work with exotic version schemes

4.3
open
nobody
None
1
2014-08-20
2014-01-13
No

When using exotic version numbers like 14.1a (in particular to denotate alpha or beta releases) cx_Freeze fails to build the executable with a complaint about the format of the version number.

I suggest changing the beginning of VersionInfo.__init__ in freeze.py to:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#!/usr/bin/python
import re
match = re.match (r"[0-9]+(?:\.[0-9]+){0,3}", version)
if match:
    parts = match.group (0).split(".")
    while len(parts) < 4:
        parts.append("0")
else:
    parts = [ "0" ] * 4
self.version = ".".join(parts)

This will ignore any non-compliant trailing characters when stamping the executable.

Discussion


  • Anonymous
    2014-08-20

    Post awaiting moderation.


Anonymous


Cancel   Add attachments