From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>, "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>,
"Max Reitz" <mreitz@redhat.com>, "John Snow" <jsnow@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [PATCH 2/7] python/qemu: formalize as package
Date: Tue, 2 Jun 2020 20:15:18 -0400 [thread overview]
Message-ID: <20200603001523.18085-3-jsnow@redhat.com> (raw)
In-Reply-To: <20200603001523.18085-1-jsnow@redhat.com>
NB: I am choosing Python 3.6 here. Although our minimum requirement is
3.5, this code is used only by iotests (so far) under which we have been
using a minimum version of 3.6.
3.6 is being preferred here for variable type hint capability, which
enables us to use mypy for this package.
RFC: This uses the version tags of the parent tree here, so packages
will be installed as e.g. 5.0.0, 5.1.0-rc0, etc.
Pros:
- Easy to tell which versions of QEMU it supports
- Simple
Cons:
- Implies semver, which we do NOT follow for QEMU releases
- Implies the package is in a stable state
We could also start a separate versioning for just the Python SDK at
e.g. 0.1;
Pros:
- We can use semver, which is expected of Python packaging
- Allows us to break compatibility for 0.x releases
Cons:
- More complex, the mapping from SDK version to QEMU version
is less obvious
- Requires someone to manage a secondary version commit for
the Python SDK.
Or, perhaps, we could start versioning with 0.5.0.0, 0.5.1.0, etc to
combine a bit of both flavors; bumping the major version number only
when incompatible changes to the Python interface itself are made,
treating the major version number more like an epoch.
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/README.rst | 6 ++++++
python/setup.py | 50 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+)
create mode 100644 python/README.rst
create mode 100755 python/setup.py
diff --git a/python/README.rst b/python/README.rst
new file mode 100644
index 00000000000..25f6d93fd5f
--- /dev/null
+++ b/python/README.rst
@@ -0,0 +1,6 @@
+QEMU Python Tooling
+-------------------
+
+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.
diff --git a/python/setup.py b/python/setup.py
new file mode 100755
index 00000000000..f897ceac970
--- /dev/null
+++ b/python/setup.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env3 python
+"""
+QEMU tooling installer script
+Copyright (c) 2020 John Snow for Red Hat, Inc.
+"""
+
+import setuptools
+
+def main():
+ """
+ QEMU tooling installer
+ """
+
+ kwargs = {
+ 'name': 'qemu',
+ 'use_scm_version': {
+ 'root': '..',
+ 'relative_to': __file__,
+ },
+ 'maintainer': 'QEMU Developer Team',
+ 'maintainer_email': 'qemu-devel@nongnu.org',
+ 'url': 'https://www.qemu.org/',
+ 'download_url': 'https://www.qemu.org/download/',
+ 'packages': setuptools.find_namespace_packages(),
+ 'description': 'QEMU Python Build, Debug and SDK tooling.',
+ 'classifiers': [
+ 'Development Status :: 5 - Production/Stable',
+ 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ ],
+ 'platforms': [],
+ 'keywords': [],
+ 'setup_requires': [
+ 'setuptools',
+ 'setuptools_scm',
+ ],
+ 'install_requires': [
+ ],
+ 'python_requires': '>=3.6',
+ 'long_description_content_type': 'text/x-rst',
+ }
+
+ with open("README.rst", "r") as fh:
+ kwargs['long_description'] = fh.read()
+
+ setuptools.setup(**kwargs)
+
+if __name__ == '__main__':
+ main()
--
2.21.3
next prev parent reply other threads:[~2020-06-03 0:18 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 ` John Snow [this message]
2020-06-05 14:40 ` [PATCH 2/7] python/qemu: formalize as package 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
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=20200603001523.18085-3-jsnow@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).