From 17244d4efcba54cddfd08ee9dcd52be558fef44c Mon Sep 17 00:00:00 2001 From: Ramesh Maddegoda <94033485+ramesh-maddegoda@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:46:12 -0800 Subject: [PATCH] Update manual.yml --- .github/workflows/manual.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 7692329..5efc0fd 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -17,9 +17,29 @@ jobs: with: script: | import os - print("Directory contents:") - for f in os.listdir(): - print(f) + import logging, shutil + from .util import invoke, invokeGIT, TAG_RE, commit, delete_tags, git_config, add_version_label_to_open_bugs + from lasso.releasers._python_version import TextFileDetective + import logging, os, re, shutil + + # This should match what's in github-actions-base + SPHINX_VERSION = '3.2.1' + + _logger.debug('Python preparation step') + git_config() + shutil.rmtree('venv', ignore_errors=True) + # We add access to system site packages so that projects can save time if they need numpy, pandas, etc. + invoke(['python', '-m', 'venv', '--system-site-packages', 'venv']) + # Do the pseudo-equivalent of ``activate``: + venvBin = os.path.abspath(os.path.join(self.assembly.context.cwd, 'venv', 'bin')) + os.environ['PATH'] = f'{venvBin}:{os.environ["PATH"]}' + # Make sure we have the latest of pip+setuptools+wheel + invoke(['pip', 'install', '--quiet', '--upgrade', 'pip', 'setuptools', 'wheel']) + # #79: ensure that the venv has its own ``sphinx-build`` + invoke(['pip', 'install', '--quiet', '--ignore-installed', f'sphinx=={SPHINX_VERSION}']) + # Now install the package being rounded up + invoke(['pip', 'install', '--editable', '.[dev]']) + # ☑️ TODO: what other prep steps are there? What about VERSION.txt overwriting? # # Controls when the action will run. Workflow runs when manually triggered using the UI # # or API.