On 6/18/20 11: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. > > 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.
Indeed. Each of the source tree I use has its own virtual environment. I personally stopped using the distribution packages, they don't make sense when you develop, the tree changes too quickly. Distributions use stable releases, so IMO it only makes sense to generate a package along with releases. Else use venv.
