modify sdist files name for Python projects with PEP0440 versions (fixes #12443)

This commit is contained in:
Benjamin Dauvergne 2016-07-05 10:52:16 +02:00
parent b7b5a6984e
commit 00147206d3
1 changed files with 2 additions and 1 deletions

View File

@ -94,6 +94,7 @@ def get_project_infos(git_project_path, cmd_options):
results['name'] = output("python setup.py --name 2> /dev/null")[:-1]
results['version'] = output("python setup.py --version 2> /dev/null")[:-1]
results['fullname'] = output("python setup.py --fullname 2> /dev/null")[:-1]
results['distname'] = results['fullname'].replace('+', '-') # PEP0440
elif os.path.exists("configure.ac"):
call("./autogen.sh")
call('make all')
@ -251,7 +252,7 @@ def prepare_build(dist, project, cmd_options, new):
if os.path.exists('setup.py'):
call("python setup.py clean --all")
call("python setup.py sdist --formats=bztar")
shutil.move("dist/%s.tar.bz2" % project['fullname'], origin_archive)
shutil.move("dist/%s.tar.bz2" % project['distname'], origin_archive)
elif os.path.exists('./configure.ac'):
call("make dist-bzip2")
shutil.move("%s-%s.tar.bz2" % \