From 9baee80e01625fa7a297942c2031ea529cb76462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sviatoslav=20Sydorenko=20=28=D0=A1=D0=B2=D1=8F=D1=82=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1=D0=B8=D0=B4=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE=29?= Date: Wed, 17 Jul 2024 00:13:51 +0200 Subject: [PATCH 1/2] Fix `blurb` import in the runpy interface When `blurb` was being restructured, the import paths moved to deeper levels of the project layout. It was updated in the console scripts so invoking just the `blurb` command worked but `python -m blurb` didn't. This resulted in breaking the MSI installer smoke testing workflow in CPython's CI [[1]]. Blurb's own CI never invokes said interface, so it had no chance of catching the regression. This patch corrects the import but does not make an attempt to improve testing. [1]: https://github.com/python/cpython/issues/121879 --- src/blurb/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blurb/__main__.py b/src/blurb/__main__.py index 6aff72b..a173b94 100644 --- a/src/blurb/__main__.py +++ b/src/blurb/__main__.py @@ -1,5 +1,5 @@ -"""Run blurb using `python3 blurb/`.""" -import blurb +"""Run blurb using ``python3 -m blurb``.""" +from blurb import blurb if __name__ == '__main__': From 3529a9ea3b5d850f4aaa1acb4f72f6b76314a725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sviatoslav=20Sydorenko=20=28=D0=A1=D0=B2=D1=8F=D1=82=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1=D0=B8=D0=B4=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE=29?= Date: Wed, 17 Jul 2024 00:19:49 +0200 Subject: [PATCH 2/2] Integrate a runpy smoke test in tox This just adds simple `python -m blurb` invocations, nothing fancy. --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 29d8a8a..793f226 100644 --- a/tox.ini +++ b/tox.ini @@ -19,3 +19,5 @@ commands = {posargs} blurb test blurb help + {envpython} -I -m blurb test + {envpython} -I -m blurb help