From f627efa5400a34e4983cfa62783c07531353b735 Mon Sep 17 00:00:00 2001 From: Elliot Boschwitz Date: Thu, 12 Dec 2019 18:34:16 -0800 Subject: [PATCH] Rename file from sdist method (#391) --- build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.py b/build.py index f8017d58..7313396e 100644 --- a/build.py +++ b/build.py @@ -101,6 +101,10 @@ def copy_and_rename_wheels(): file_extension = '.tar.gz' # rename sdist to make underscore consistent with wheel file_name = file_name.replace('mssql-cli', 'mssql_cli').replace('.tar', '') + os.rename(os.path.join(utility.MSSQLCLI_DIST_DIRECTORY, pkg_name), + os.path.join(utility.MSSQLCLI_DIST_DIRECTORY, file_name + file_extension)) + pkg_name = file_name + file_extension + end_index_to_replace = len(file_name) first_dash = file_name.find('-')