qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: "Fam Zheng" <fam@euphon.net>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@virtuozzo.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	qemu-block@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>, "Max Reitz" <mreitz@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH 0/7] python: create installable package
Date: Fri, 19 Jun 2020 11:04:12 -0400	[thread overview]
Message-ID: <5944404f-3833-3bc5-d3e4-1cf459b4c0c1@redhat.com> (raw)
In-Reply-To: <20200618092319.GA6012@linux.fritz.box>



On 6/18/20 5:23 AM, Kevin Wolf wrote:
> Am 17.06.2020 um 22:27 hat John Snow geschrieben:
>>> In the Avocado project, we have a `make develop` rule that does that
>>> for the main setup.py file, and for all plugins we carry on the same
>>> tree, which is similar in some regards to the "not at the project root
>>> directory" situation here with "qemu/python/setup.py".
>>>
>>
>> Ah, yeah. If we're going this far, I'd prefer using a VENV over
>> modifying the user's environment. That way you can blast it all away
>> with a `make distclean`.
>>
>> Maybe the "make develop" target could even use the presence of a .venv
>> directory to know when it needs to make the environment or not ...
> [..]
>> For QEMU developers, installing with develop is going to be the smart
>> way to go. When your git tree is updated, your package will be updated
>> along with it. You can do it once and then probably forget about it.
> 
> I don't think we can make this a manual step at all. Building QEMU
> requires running some Python scripts (e.g. the QAPI generator), so the
> setup needs to be done either in configure or in a Makefile target that
> is specified as a dependency of any rule that would run a Python script.
> Building QEMU once would then be enough.
> 

I am imagining that we might treat "building" and "testing" separately
-- as it is, builds require python3.5 and tests requires 3.6 which
definitely necessitates two distinct environments.

I will admit that I haven't constructed a full, coherent vision of
python management that encapsulates both building ad testing yet. For
example, should configure/make expect to be run inside of a venv, or
should they expect to create and then enter the venv? That's not clear
to me yet. I'm simultaneously trying to work out with Peter Maydell how
the sphinx dependency should work. Sphinx is presently our only python
dependency for our build environment.)

Perhaps starting with the testing step is a good starting point and we
can use an implicit dependency on a `make develop` style step so it
happens automatically.

(But perhaps keeping it as a standalone target that CAN be invoked
manually would be nice if you want to do some more intensive debugging
or development of new tests.)

> Doing it automatically also means that we have to keep things local to
> the QEMU directory rather than installing them globally into the user
> directory. This is desirable anyway: Most of us deal with more than one
> QEMU source tree, so conflicts would be inevitable.
> 

I think it should be easy enough to put the VENV in the build directory
to prevent cross-contamination.

> Kevin
> 



  reply	other threads:[~2020-06-19 15:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03  0:15 [PATCH 0/7] python: create installable package John Snow
2020-06-03  0:15 ` [PATCH 1/7] python/qemu: create qemu.lib module John Snow
2020-06-05 12:33   ` Vladimir Sementsov-Ogievskiy
2020-06-03  0:15 ` [PATCH 2/7] python/qemu: formalize as package John Snow
2020-06-05 14:40   ` Vladimir Sementsov-Ogievskiy
2020-06-05 15:42     ` John Snow
2020-06-05 19:23     ` John Snow
2020-06-03  0:15 ` [PATCH 3/7] python/qemu: add README.rst John Snow
2020-06-05 14:56   ` Vladimir Sementsov-Ogievskiy
2020-06-05 16:18     ` John Snow
2020-06-03  0:15 ` [PATCH 4/7] python/qemu: Add pipenv support John Snow
2020-06-05 15:37   ` Vladimir Sementsov-Ogievskiy
2020-06-05 15:54     ` John Snow
2020-06-05 16:21   ` Vladimir Sementsov-Ogievskiy
2020-06-05 17:11     ` John Snow
2020-06-06  5:31       ` Vladimir Sementsov-Ogievskiy
2020-06-03  0:15 ` [PATCH 5/7] python/qemu: add pylint to pipenv John Snow
2020-06-03  0:15 ` [PATCH 6/7] python/qemu: Add flake8 " John Snow
2020-06-03  0:15 ` [PATCH 7/7] python/qemu: add mypy " John Snow
2020-06-06  5:53 ` [PATCH 0/7] python: create installable package Vladimir Sementsov-Ogievskiy
2020-06-08 14:14   ` John Snow
2020-06-17 19:52 ` Cleber Rosa
2020-06-17 20:27   ` John Snow
2020-06-18  9:23     ` Kevin Wolf
2020-06-19 15:04       ` John Snow [this message]
2020-06-19 16:44         ` Kevin Wolf
2020-06-19 17:14           ` John Snow
2020-06-19 15:09       ` Philippe Mathieu-Daudé
2020-06-19 15:15     ` Philippe Mathieu-Daudé
2020-06-19 16:10       ` John Snow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5944404f-3833-3bc5-d3e4-1cf459b4c0c1@redhat.com \
    --to=jsnow@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).