From nobody Mon Feb 9 04:29:48 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1603222721; cv=none; d=zohomail.com; s=zohoarc; b=Fe9qVl1VxmSS5BAHOqRDLXppEPoyTKDLc0SObgU7/68q/eZKuwKWXxaRqALIfDMtZgqr0LoFl8ZEFry/Dd9/ypn+pFRFyxbVh91BVqq7Z9OiDYhfSesjdktJ6JEYPnZsGIFSWWFzPoWvmbrhYEi2axHPQRk3J1Jl6msCpcARBLk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603222721; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=O75hBaMeQQS9wNLBbf5GNf/pnbAzK1S+i3IWqrPZjlY=; b=Q6EH3gbpBNaFfEcEphKKUiGD15gbQh6LrnvrV4rDBMgJk6sVJRs1EFplzP0lRmTQ13IsclbBtGY+GYSNOuISXo3B77SNNVSpBlcrTEhHe6ZV4C3HXAFkhHCFbDGJzU0FPdWQraBq1BDgVIcKyaZboXIdBLuOCTnL4WLZF345RDg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160322272135360.249388031589206; Tue, 20 Oct 2020 12:38:41 -0700 (PDT) Received: from localhost ([::1]:48430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUxSx-0007pN-Du for importer@patchew.org; Tue, 20 Oct 2020 15:38:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUxQg-00065l-60 for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:39288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kUxQe-0000yK-3i for qemu-devel@nongnu.org; Tue, 20 Oct 2020 15:36:17 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-334-AuawuyIwP9eiuP_zlxhqfg-1; Tue, 20 Oct 2020 15:36:07 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44032803F5C; Tue, 20 Oct 2020 19:36:06 +0000 (UTC) Received: from scv.redhat.com (ovpn-115-172.rdu2.redhat.com [10.10.115.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D6235C1C2; Tue, 20 Oct 2020 19:36:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603222572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O75hBaMeQQS9wNLBbf5GNf/pnbAzK1S+i3IWqrPZjlY=; b=LSrOnWY42RPZcN0Y+oSzhlh590wbj+q2O3gNJquwtpi8aiAJAb+eJ3kg3+0bJeZTMSBRM/ VOheOi2kXh8MeUPHxmwvXx7SelIGVmgpDoPeJX42Dvn7ds7+SsawMNjIJwTnmeMqHduhS8 OMQ2K5fIDOYnnzptZvu/eYpbAJ4yds4= X-MC-Unique: AuawuyIwP9eiuP_zlxhqfg-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v3 02/15] python: add qemu package installer Date: Tue, 20 Oct 2020 15:35:42 -0400 Message-Id: <20201020193555.1493936-3-jsnow@redhat.com> In-Reply-To: <20201020193555.1493936-1-jsnow@redhat.com> References: <20201020193555.1493936-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 01:15:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Ben Widawsky , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrea Bolognani , Wainer dos Santos Moschetta , Max Reitz , Rohit Shinde , Willian Rampazzo , Cleber Rosa , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add setup.cfg and setup.py, necessary for installing a package via pip. Add a rst document explaining the basics of what this package is for and who to contact for more information. This document will be used as the landing page for the package on PyPI. I am not yet using a pyproject.toml style package manifest, because using pyproject.toml (and PEP-517) style packages means that pip is not able to install in "editable" or "develop" mode, which I consider necessary for the development of this package. Use a light-weight setup.py instead. Signed-off-by: John Snow --- python/PACKAGE.rst | 26 ++++++++++++++++++++++++++ python/setup.cfg | 18 ++++++++++++++++++ python/setup.py | 23 +++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 python/PACKAGE.rst create mode 100755 python/setup.cfg create mode 100755 python/setup.py diff --git a/python/PACKAGE.rst b/python/PACKAGE.rst new file mode 100644 index 0000000000..b82f32f489 --- /dev/null +++ b/python/PACKAGE.rst @@ -0,0 +1,26 @@ +QEMU Python Tooling +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This package provides QEMU tooling used by the QEMU project to build, +configure, and test QEMU. It is not a fully-fledged SDK and it is subject +to change at any time. + +Usage +----- + +The ``qemu.qmp`` subpackage provides a library for communicating with +QMP servers. The ``qemu.machine`` subpackage offers rudimentary +facilities for launching and managing QEMU processes. Refer to each +pacakge's documentation +(``>>> help(qemu.qmp)``, ``>>> help(qemu.machine)``) +for more information. + +Contributing +------------ + +This package is maintained by John Snow as part of +the QEMU source tree. Contributions are welcome and follow the `QEMU +patch submission process +`_. There is a `Gitlab +mirror `_, but +contributions must be sent to the list for inclusion. diff --git a/python/setup.cfg b/python/setup.cfg new file mode 100755 index 0000000000..12b99a796e --- /dev/null +++ b/python/setup.cfg @@ -0,0 +1,18 @@ +[metadata] +name =3D qemu +maintainer =3D QEMU Developer Team +maintainer_email =3D qemu-devel@nongnu.org +url =3D https://www.qemu.org/ +download_url =3D https://www.qemu.org/download/ +description =3D QEMU Python Build, Debug and SDK tooling. +long_description =3D file:PACKAGE.rst +long_description_content_type =3D text/x-rst +classifiers =3D + Development Status :: 3 - Alpha + License :: OSI Approved :: GNU General Public License v2 (GPLv2) + Natural Language :: English + Operating System :: OS Independent + +[options] +python_requires =3D >=3D 3.6 +packages =3D find_namespace: diff --git a/python/setup.py b/python/setup.py new file mode 100755 index 0000000000..e93d0075d1 --- /dev/null +++ b/python/setup.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +""" +QEMU tooling installer script +Copyright (c) 2020 John Snow for Red Hat, Inc. +""" + +import setuptools +import pkg_resources + + +def main(): + """ + QEMU tooling installer + """ + + # https://medium.com/@daveshawley/safely-using-setup-cfg-for-metadata-= 1babbe54c108 + pkg_resources.require('setuptools>=3D39.2') + + setuptools.setup() + + +if __name__ =3D=3D '__main__': + main() --=20 2.26.2