diff mbox series

[qemu.qmp,02/13] fork qemu.qmp from qemu.git

Message ID 20220330182424.3438872-3-jsnow@redhat.com
State New
Headers show
Series python: fork qemu.qmp python lib into independent repo | expand

Commit Message

John Snow March 30, 2022, 6:24 p.m. UTC
Split python/ from qemu.git, using these commands:

> git subtree split -P python/ -b python-split-v3
> mkdir ~/src/tmp
> cd ~/src/tmp
> git clone --no-local --branch python-split-v3 --single-branch ~/src/qemu
> cd qemu
> git filter-repo --path qemu/machine/           \
                  --path qemu/utils/             \
                  --path tests/iotests-mypy.sh   \
                  --path tests/iotests-pylint.sh \
                  --invert-paths

This commit, however, only performs some minimum cleanup to reflect the
deletion of the other subpackages. It is not intended to be exhaustive,
and further edits are made in forthcoming commits.

These fixes are broken apart into micro-changes to facilitate mailing
list review subject-by-subject. They *could* be squashed into a single
larger commit on merge if desired, but due to the nature of the fork,
bisectability across the fork boundary is going to be challenging
anyway. It may be better value to just leave these initial commits
as-is.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 .gitignore |  2 +-
 Makefile   | 16 ++++++++--------
 setup.cfg  | 24 +-----------------------
 setup.py   |  2 +-
 4 files changed, 11 insertions(+), 33 deletions(-)

Comments

Kashyap Chamarthy April 1, 2022, 5:05 p.m. UTC | #1
On Wed, Mar 30, 2022 at 02:24:13PM -0400, John Snow wrote:
> Split python/ from qemu.git, using these commands:
> 
> > git subtree split -P python/ -b python-split-v3
> > mkdir ~/src/tmp
> > cd ~/src/tmp
> > git clone --no-local --branch python-split-v3 --single-branch ~/src/qemu
> > cd qemu
> > git filter-repo --path qemu/machine/           \
>                   --path qemu/utils/             \
>                   --path tests/iotests-mypy.sh   \
>                   --path tests/iotests-pylint.sh \
>                   --invert-paths
> 
> This commit, however, only performs some minimum cleanup to reflect the
> deletion of the other subpackages. It is not intended to be exhaustive,
> and further edits are made in forthcoming commits.
> 
> These fixes are broken apart into micro-changes to facilitate mailing
> list review subject-by-subject. They *could* be squashed into a single
> larger commit on merge if desired, but due to the nature of the fork,
> bisectability across the fork boundary is going to be challenging
> anyway. It may be better value to just leave these initial commits
> as-is.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  .gitignore |  2 +-
>  Makefile   | 16 ++++++++--------
>  setup.cfg  | 24 +-----------------------
>  setup.py   |  2 +-
>  4 files changed, 11 insertions(+), 33 deletions(-)

The changes here look fine to me (and thanks for making it a "micro
change").  I'll let sharper eyes than mine to give a closer look at the
`git filter-repo` surgery.  Although, that looks fine to me too.

[...]

>  .PHONY: distclean
>  distclean: clean
> -	rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> +	rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
>  	rm -f .coverage .coverage.*
>  	rm -rf htmlcov/
> diff --git a/setup.cfg b/setup.cfg
> index e877ea5..4ffab73 100644
> --- a/setup.cfg
> +++ b/setup.cfg
> @@ -1,5 +1,5 @@
>  [metadata]
> -name = qemu
> +name = qemu.qmp
>  version = file:VERSION
>  maintainer = QEMU Developer Team

In the spirit of patch 04 ("update maintainer metadata"), do you also
want to update here too? s/QEMU Developer Team/QEMU Project?

FWIW:

Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>    

[...]
John Snow April 4, 2022, 6:54 p.m. UTC | #2
On Fri, Apr 1, 2022 at 1:05 PM Kashyap Chamarthy <kchamart@redhat.com> wrote:
>
> On Wed, Mar 30, 2022 at 02:24:13PM -0400, John Snow wrote:
> > Split python/ from qemu.git, using these commands:
> >
> > > git subtree split -P python/ -b python-split-v3
> > > mkdir ~/src/tmp
> > > cd ~/src/tmp
> > > git clone --no-local --branch python-split-v3 --single-branch ~/src/qemu
> > > cd qemu
> > > git filter-repo --path qemu/machine/           \
> >                   --path qemu/utils/             \
> >                   --path tests/iotests-mypy.sh   \
> >                   --path tests/iotests-pylint.sh \
> >                   --invert-paths
> >
> > This commit, however, only performs some minimum cleanup to reflect the
> > deletion of the other subpackages. It is not intended to be exhaustive,
> > and further edits are made in forthcoming commits.
> >
> > These fixes are broken apart into micro-changes to facilitate mailing
> > list review subject-by-subject. They *could* be squashed into a single
> > larger commit on merge if desired, but due to the nature of the fork,
> > bisectability across the fork boundary is going to be challenging
> > anyway. It may be better value to just leave these initial commits
> > as-is.
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
> >  .gitignore |  2 +-
> >  Makefile   | 16 ++++++++--------
> >  setup.cfg  | 24 +-----------------------
> >  setup.py   |  2 +-
> >  4 files changed, 11 insertions(+), 33 deletions(-)
>
> The changes here look fine to me (and thanks for making it a "micro
> change").  I'll let sharper eyes than mine to give a closer look at the
> `git filter-repo` surgery.  Although, that looks fine to me too.
>
> [...]
>
> >  .PHONY: distclean
> >  distclean: clean
> > -     rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> > +     rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> >       rm -f .coverage .coverage.*
> >       rm -rf htmlcov/
> > diff --git a/setup.cfg b/setup.cfg
> > index e877ea5..4ffab73 100644
> > --- a/setup.cfg
> > +++ b/setup.cfg
> > @@ -1,5 +1,5 @@
> >  [metadata]
> > -name = qemu
> > +name = qemu.qmp
> >  version = file:VERSION
> >  maintainer = QEMU Developer Team
>
> In the spirit of patch 04 ("update maintainer metadata"), do you also
> want to update here too? s/QEMU Developer Team/QEMU Project?
>

Good spot.

> FWIW:
>
> Reviewed-by: Kashyap Chamarthy <kchamart@redhat.com>
>
> [...]
>
> --
> /kashyap
>
John Snow April 4, 2022, 6:56 p.m. UTC | #3
On Mon, Apr 4, 2022 at 2:54 PM John Snow <jsnow@redhat.com> wrote:
>
> On Fri, Apr 1, 2022 at 1:05 PM Kashyap Chamarthy <kchamart@redhat.com> wrote:
> >
> > On Wed, Mar 30, 2022 at 02:24:13PM -0400, John Snow wrote:
> > > Split python/ from qemu.git, using these commands:
> > >
> > > > git subtree split -P python/ -b python-split-v3
> > > > mkdir ~/src/tmp
> > > > cd ~/src/tmp
> > > > git clone --no-local --branch python-split-v3 --single-branch ~/src/qemu
> > > > cd qemu
> > > > git filter-repo --path qemu/machine/           \
> > >                   --path qemu/utils/             \
> > >                   --path tests/iotests-mypy.sh   \
> > >                   --path tests/iotests-pylint.sh \
> > >                   --invert-paths
> > >
> > > This commit, however, only performs some minimum cleanup to reflect the
> > > deletion of the other subpackages. It is not intended to be exhaustive,
> > > and further edits are made in forthcoming commits.
> > >
> > > These fixes are broken apart into micro-changes to facilitate mailing
> > > list review subject-by-subject. They *could* be squashed into a single
> > > larger commit on merge if desired, but due to the nature of the fork,
> > > bisectability across the fork boundary is going to be challenging
> > > anyway. It may be better value to just leave these initial commits
> > > as-is.
> > >
> > > Signed-off-by: John Snow <jsnow@redhat.com>
> > > ---
> > >  .gitignore |  2 +-
> > >  Makefile   | 16 ++++++++--------
> > >  setup.cfg  | 24 +-----------------------
> > >  setup.py   |  2 +-
> > >  4 files changed, 11 insertions(+), 33 deletions(-)
> >
> > The changes here look fine to me (and thanks for making it a "micro
> > change").  I'll let sharper eyes than mine to give a closer look at the
> > `git filter-repo` surgery.  Although, that looks fine to me too.
> >
> > [...]
> >
> > >  .PHONY: distclean
> > >  distclean: clean
> > > -     rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> > > +     rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> > >       rm -f .coverage .coverage.*
> > >       rm -rf htmlcov/
> > > diff --git a/setup.cfg b/setup.cfg
> > > index e877ea5..4ffab73 100644
> > > --- a/setup.cfg
> > > +++ b/setup.cfg
> > > @@ -1,5 +1,5 @@
> > >  [metadata]
> > > -name = qemu
> > > +name = qemu.qmp
> > >  version = file:VERSION
> > >  maintainer = QEMU Developer Team
> >
> > In the spirit of patch 04 ("update maintainer metadata"), do you also
> > want to update here too? s/QEMU Developer Team/QEMU Project?
> >
>
> Good spot.

...Or, uh. That's exactly what I update in patch 04. Are you asking me
to fold in that change earlier? I'm confused now.

--js
Kashyap Chamarthy April 5, 2022, 8:50 a.m. UTC | #4
On Mon, Apr 04, 2022 at 02:56:10PM -0400, John Snow wrote:
> On Mon, Apr 4, 2022 at 2:54 PM John Snow <jsnow@redhat.com> wrote:

[...]

> > > >  .gitignore |  2 +-
> > > >  Makefile   | 16 ++++++++--------
> > > >  setup.cfg  | 24 +-----------------------
> > > >  setup.py   |  2 +-
> > > >  4 files changed, 11 insertions(+), 33 deletions(-)
> > >
> > > The changes here look fine to me (and thanks for making it a "micro
> > > change").  I'll let sharper eyes than mine to give a closer look at the
> > > `git filter-repo` surgery.  Although, that looks fine to me too.
> > >
> > > [...]
> > >
> > > >  .PHONY: distclean
> > > >  distclean: clean
> > > > -     rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> > > > +     rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> > > >       rm -f .coverage .coverage.*
> > > >       rm -rf htmlcov/
> > > > diff --git a/setup.cfg b/setup.cfg
> > > > index e877ea5..4ffab73 100644
> > > > --- a/setup.cfg
> > > > +++ b/setup.cfg
> > > > @@ -1,5 +1,5 @@
> > > >  [metadata]
> > > > -name = qemu
> > > > +name = qemu.qmp
> > > >  version = file:VERSION
> > > >  maintainer = QEMU Developer Team
> > >
> > > In the spirit of patch 04 ("update maintainer metadata"), do you also
> > > want to update here too? s/QEMU Developer Team/QEMU Project?
> > >
> >
> > Good spot.
> 
> ...Or, uh. That's exactly what I update in patch 04. Are you asking me
> to fold in that change earlier? I'm confused now.

Oops, perils of reviewing late in the day.  I missed to notice it's the
same file.  You're right; please ignore my remark.  Sorry for the noise.
John Snow April 5, 2022, 3:28 p.m. UTC | #5
On Tue, Apr 5, 2022, 4:51 AM Kashyap Chamarthy <kchamart@redhat.com> wrote:

> On Mon, Apr 04, 2022 at 02:56:10PM -0400, John Snow wrote:
> > On Mon, Apr 4, 2022 at 2:54 PM John Snow <jsnow@redhat.com> wrote:
>
> [...]
>
> > > > >  .gitignore |  2 +-
> > > > >  Makefile   | 16 ++++++++--------
> > > > >  setup.cfg  | 24 +-----------------------
> > > > >  setup.py   |  2 +-
> > > > >  4 files changed, 11 insertions(+), 33 deletions(-)
> > > >
> > > > The changes here look fine to me (and thanks for making it a "micro
> > > > change").  I'll let sharper eyes than mine to give a closer look at
> the
> > > > `git filter-repo` surgery.  Although, that looks fine to me too.
> > > >
> > > > [...]
> > > >
> > > > >  .PHONY: distclean
> > > > >  distclean: clean
> > > > > -     rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> > > > > +     rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
> > > > >       rm -f .coverage .coverage.*
> > > > >       rm -rf htmlcov/
> > > > > diff --git a/setup.cfg b/setup.cfg
> > > > > index e877ea5..4ffab73 100644
> > > > > --- a/setup.cfg
> > > > > +++ b/setup.cfg
> > > > > @@ -1,5 +1,5 @@
> > > > >  [metadata]
> > > > > -name = qemu
> > > > > +name = qemu.qmp
> > > > >  version = file:VERSION
> > > > >  maintainer = QEMU Developer Team
> > > >
> > > > In the spirit of patch 04 ("update maintainer metadata"), do you also
> > > > want to update here too? s/QEMU Developer Team/QEMU Project?
> > > >
> > >
> > > Good spot.
> >
> > ...Or, uh. That's exactly what I update in patch 04. Are you asking me
> > to fold in that change earlier? I'm confused now.
>
> Oops, perils of reviewing late in the day.  I missed to notice it's the
> same file.  You're right; please ignore my remark.  Sorry for the noise.
>

I made the same mistake upon reading the feedback, so we're both guilty 😅

Thanks Kashyap, I appreciate the review.

There's three more series here to apply to the new forked package (not yet
re-sent to the ML):

(2) Adding GitLab CI configuration. Not relevant for you, probably.

(3) Adding Sphinx documentation. This builds jsnow.gitlab.io/qemu.qmp/ -
I'd be appreciative of your feedback on this. I'm interested both in
proofreading and in design feedback here. All comments welcome.

[Though more rigorous changes to the design might be a "later" thing, but
the feedback is welcomed all the same.]

(4) Adding automatic package builds and git-based versioning to GitLab.
Maybe also not too relevant for you. 🙂


>
>
> --
> /kashyap
>

Thanks for your time!
diff mbox series

Patch

diff --git a/.gitignore b/.gitignore
index 904f324..b071f02 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,7 @@ 
 # python packaging
 build/
 dist/
-qemu.egg-info/
+qemu.qmp.egg-info/
 
 # editor config
 .idea/
diff --git a/Makefile b/Makefile
index 3334311..a2d2f2c 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@  help:
 	@echo ""
 	@echo "make develop:"
 	@echo "    Install deps needed for for 'make check',"
-	@echo "    and install the qemu package in editable mode."
+	@echo "    and install the qemu.qmp package in editable mode."
 	@echo "    (Can be used in or outside of a venv.)"
 	@echo ""
 	@echo "make pipenv"
@@ -43,7 +43,7 @@  help:
 	@echo "    Remove package build output."
 	@echo ""
 	@echo "make distclean:"
-	@echo "    remove pipenv/venv files, qemu package forwarder,"
+	@echo "    remove pipenv/venv files, qemu.qmp package forwarder,"
 	@echo "    built distribution files, and everything from 'make clean'."
 	@echo ""
 	@echo -e "Have a nice day ^_^\n"
@@ -64,11 +64,11 @@  dev-venv: $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate
 $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate: setup.cfg
 	@echo "VENV $(QEMU_VENV_DIR)"
 	@python3 -m venv $(QEMU_VENV_DIR)
-	@(							\
-		echo "ACTIVATE $(QEMU_VENV_DIR)";		\
-		. $(QEMU_VENV_DIR)/bin/activate;		\
-		echo "INSTALL qemu[devel] $(QEMU_VENV_DIR)";	\
-		make develop 1>/dev/null;			\
+	@(								\
+		echo "ACTIVATE $(QEMU_VENV_DIR)";			\
+		. $(QEMU_VENV_DIR)/bin/activate;			\
+		echo "INSTALL qemu.qmp[devel] $(QEMU_VENV_DIR)";	\
+		make develop 1>/dev/null;				\
 	)
 	@touch $(QEMU_VENV_DIR)
 
@@ -106,6 +106,6 @@  clean:
 
 .PHONY: distclean
 distclean: clean
-	rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
+	rm -rf qemu.qmp.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
 	rm -f .coverage .coverage.*
 	rm -rf htmlcov/
diff --git a/setup.cfg b/setup.cfg
index e877ea5..4ffab73 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@ 
 [metadata]
-name = qemu
+name = qemu.qmp
 version = file:VERSION
 maintainer = QEMU Developer Team
 maintainer_email = qemu-devel@nongnu.org
@@ -25,8 +25,6 @@  classifiers =
 python_requires = >= 3.6
 packages =
     qemu.qmp
-    qemu.machine
-    qemu.utils
 
 [options.package_data]
 * = py.typed
@@ -38,7 +36,6 @@  packages =
 devel =
     avocado-framework >= 90.0
     flake8 >= 3.6.0
-    fusepy >= 2.0.4
     isort >= 5.1.2
     mypy >= 0.780
     pylint >= 2.8.0
@@ -47,10 +44,6 @@  devel =
     urwid-readline >= 0.13
     Pygments >= 2.9.0
 
-# Provides qom-fuse functionality
-fuse =
-    fusepy >= 2.0.4
-
 # QMP TUI dependencies
 tui =
     urwid >= 2.1.2
@@ -59,13 +52,6 @@  tui =
 
 [options.entry_points]
 console_scripts =
-    qom = qemu.utils.qom:main
-    qom-set = qemu.utils.qom:QOMSet.entry_point
-    qom-get = qemu.utils.qom:QOMGet.entry_point
-    qom-list = qemu.utils.qom:QOMList.entry_point
-    qom-tree = qemu.utils.qom:QOMTree.entry_point
-    qom-fuse = qemu.utils.qom_fuse:QOMFuse.entry_point [fuse]
-    qemu-ga-client = qemu.utils.qemu_ga_client:main
     qmp-shell = qemu.qmp.qmp_shell:main
     qmp-shell-wrap = qemu.qmp.qmp_shell:main_wrap
     qmp-tui = qemu.qmp.qmp_tui:main [tui]
@@ -80,19 +66,12 @@  python_version = 3.6
 warn_unused_configs = True
 namespace_packages = True
 
-[mypy-qemu.utils.qom_fuse]
-# fusepy has no type stubs:
-allow_subclassing_any = True
-
 [mypy-qemu.qmp.qmp_tui]
 # urwid and urwid_readline have no type stubs:
 allow_subclassing_any = True
 
 # The following missing import directives are because these libraries do not
 # provide type stubs. Allow them on an as-needed basis for mypy.
-[mypy-fuse]
-ignore_missing_imports = True
-
 [mypy-urwid]
 ignore_missing_imports = True
 
@@ -164,7 +143,6 @@  skip_missing_interpreters = true
 allowlist_externals = make
 deps =
     .[devel]
-    .[fuse]  # Workaround to trigger tox venv rebuild
     .[tui]   # Workaround to trigger tox venv rebuild
 commands =
     make check
diff --git a/setup.py b/setup.py
index c5bc459..aba951a 100755
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@ 
 #!/usr/bin/env python3
 """
-QEMU tooling installer script
+QEMU QMP library installer script
 Copyright (c) 2020-2021 John Snow for Red Hat, Inc.
 """