Projet

Général

Profil

« Précédent | Suivant » 

Révision fe3a77c4

Ajouté par Benjamin Dauvergne il y a presque 11 ans

setup.py: only use tag matching v* for building the version string

Voir les différences:

setup.py
64 64
    assert version is not None
65 65
    if os.path.exists('.git'):
66 66
        import subprocess
67
        p = subprocess.Popen(['git','describe','--dirty'],
67
        p = subprocess.Popen(['git','describe','--dirty','--match=v*'],
68 68
                stdout=subprocess.PIPE)
69 69
        result = p.communicate()[0]
70 70
        assert p.returncode == 0, 'git returned non-zero'
71
        new_version = result.split()[0]
71
        new_version = result.split()[0][1:]
72 72
        assert not new_version.endswith('-dirty'), 'git workdir is not clean'
73 73
        assert new_version.split('-')[0] == version, '__version__ must match the last git annotated tag'
74 74
        version = new_version.replace('-', '.')

Formats disponibles : Unified diff