From a6461d6a6e7c80525ae150d16344c13127bcc3e2 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Fri, 25 Nov 2022 05:24:20 -0500 Subject: [PATCH] dist: print Ubuntu PPA environment --- setup.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 23dbcdf3..5ce7be1d 100755 --- a/setup.py +++ b/setup.py @@ -18,15 +18,22 @@ with open('lib/solaar/version', 'r') as vfile: try: commit = subprocess.check_output(['git', 'describe', '--always'], stderr=subprocess.DEVNULL).strip().decode() + print('GIT', commit) with open('lib/solaar/commit', 'w') as vfile: vfile.write(f'{commit}\n') except Exception: # get commit from Ubuntu PPA directory name dir = os.path.basename(sys.path[0]) - print('DIRECTORY', dir) + print('DIRECTORY', sys.path[0], dir, os.getcwd()) commit_match = re.search(r'git[0-9]*-([0-9a-f]*)~', dir) if commit_match: with open('lib/solaar/commit', 'w') as vfile: vfile.write(f'{version}-g{commit_match[1]}\n') +print(subprocess.check_output(['pwd'], stderr=subprocess.DEVNULL).strip().decode()) +try: + print(subprocess.check_output(['dpkg-parsechangelog'], stderr=subprocess.DEVNULL).strip().decode()) +except Exception: + pass +print(os.environ) def _data_files():