From nobody Wed Nov 19 00:12:42 2025 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=1613070286; cv=none; d=zohomail.com; s=zohoarc; b=PcWr9VUA5tUSd2gSKnjmpz0E5iRvronjyaclfAuJptILM/JMwSR8CY5aJZmWFcILwjlsl5VggNSQX8N3qxwpNYQZshv6GlPVf06kejcaRND6+ndKMq75iOjU8UoA64k1ifZ9hzU4VuGX+SuXWF92MZ0LB19xvivxpqaRaw5YCUM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613070286; 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=UgYDplUibvLSt3gHorLxDeLk1A8xWorfpLircz8INdA=; b=CnJPSdHsesvk2SwcuLuUtvdVZ13xax9Bsv95LSdSf5/D56qeyd+PXeqZ/Qk9jWPrl/4PaBIjHHzw2BRFIXTZlfKBdJsXl/lvr+8Gw9VlBbRVmwNDQ9oYX4OFKfp6NyJWyLH6iOlAjC5cIOF44zem2khfOQOm6FA0GbODsdTVvzo= 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 1613070286359532.1045030112667; Thu, 11 Feb 2021 11:04:46 -0800 (PST) Received: from localhost ([::1]:55724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAHGf-0007o7-2t for importer@patchew.org; Thu, 11 Feb 2021 14:04:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAHBq-0003tQ-Ov for qemu-devel@nongnu.org; Thu, 11 Feb 2021 13:59:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:46393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lAHBl-0005Oi-Mr for qemu-devel@nongnu.org; Thu, 11 Feb 2021 13:59:46 -0500 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-148-TXeRfvIAOzG8qT2QuGXyLA-1; Thu, 11 Feb 2021 13:59:36 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6B928107AD49; Thu, 11 Feb 2021 18:59:35 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-247.rdu2.redhat.com [10.10.112.247]) by smtp.corp.redhat.com (Postfix) with ESMTP id 76B1E7095A; Thu, 11 Feb 2021 18:59:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613069980; 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=UgYDplUibvLSt3gHorLxDeLk1A8xWorfpLircz8INdA=; b=A0x51KJQDD7jiM8SnYDItDJ3JbvAPynGPhhu01XYLM+5oLyTHiyI8x0xL/YTIHU2gaay3J nerYGsrvcNdnYFf7YsTCjkFgspGmANnqEABX1XiSX9zJmUkpfFov/QsSW9Xo+IhkPg9l3Y 3vS3tcSC+NXL2JXz1qPzEuhXnzuj5MI= X-MC-Unique: TXeRfvIAOzG8qT2QuGXyLA-1 From: John Snow To: qemu-devel@nongnu.org Subject: [PATCH v4 05/24] python: add qemu package installer Date: Thu, 11 Feb 2021 13:58:37 -0500 Message-Id: <20210211185856.3975616-6-jsnow@redhat.com> In-Reply-To: <20210211185856.3975616-1-jsnow@redhat.com> References: <20210211185856.3975616-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.569, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Fam Zheng , Kevin Wolf , Thomas Huth , Eduardo Habkost , qemu-block@nongnu.org, John Snow , Wainer dos Santos Moschetta , Max Reitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Willian Rampazzo , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Beraldo Leal 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 "editable" installs are not defined by PEP-517 and pip did not have support for this for some time; I consider the feature necessary for development. Use a light-weight setup.py instead. Signed-off-by: John Snow --- python/PACKAGE.rst | 32 ++++++++++++++++++++++++++++++++ python/setup.cfg | 19 +++++++++++++++++++ python/setup.py | 23 +++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 python/PACKAGE.rst create mode 100644 python/setup.cfg create mode 100755 python/setup.py diff --git a/python/PACKAGE.rst b/python/PACKAGE.rst new file mode 100644 index 00000000000..0e714c87eb3 --- /dev/null +++ b/python/PACKAGE.rst @@ -0,0 +1,32 @@ +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 +package'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 +`_, which involves +sending patches to the QEMU development mailing list. + +John maintains a `GitLab staging branch +`_, and there is an +official `GitLab mirror `_. + +Please report bugs by sending a mail to qemu-devel@nongnu.org and CC +jsnow@redhat.com. diff --git a/python/setup.cfg b/python/setup.cfg new file mode 100644 index 00000000000..dd71640fc2f --- /dev/null +++ b/python/setup.cfg @@ -0,0 +1,19 @@ +[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 + Programming Language :: Python :: 3 :: Only + +[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 00000000000..e93d0075d16 --- /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.29.2