get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/64442/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 64442,
    "url": "http://patches.dpdk.org/api/patches/64442/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200110215205.513185-6-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200110215205.513185-6-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200110215205.513185-6-bruce.richardson@intel.com",
    "date": "2020-01-10T21:52:04",
    "name": "[v4,5/6] doc/guides: rebuild with meson whenever a file changes",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2070730abd84f73bca81eea214e2cf78b3f5cefb",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200110215205.513185-6-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 8056,
            "url": "http://patches.dpdk.org/api/series/8056/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8056",
            "date": "2020-01-10T21:51:59",
            "name": "meson build improvements",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/8056/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64442/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64442/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D7284A04F9;\n\tFri, 10 Jan 2020 22:52:52 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 641941EBE8;\n\tFri, 10 Jan 2020 22:52:25 +0100 (CET)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id D796A1EC0A\n for <dev@dpdk.org>; Fri, 10 Jan 2020 22:52:23 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 10 Jan 2020 13:52:23 -0800",
            "from silpixa00399126.ir.intel.com (HELO\n silpixa00399126.ger.corp.intel.com) ([10.237.223.2])\n by fmsmga002.fm.intel.com with ESMTP; 10 Jan 2020 13:52:21 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.69,418,1571727600\"; d=\"scan'208\";a=\"255163014\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "david.marchand@redhat.com,\n\tjohn.mcnamara@intel.com,\n\tbluca@debian.org",
        "Cc": "dev@dpdk.org, aconole@redhat.com, thomas@monjalon.net,\n Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Fri, 10 Jan 2020 21:52:04 +0000",
        "Message-Id": "<20200110215205.513185-6-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.24.1",
        "In-Reply-To": "<20200110215205.513185-1-bruce.richardson@intel.com>",
        "References": "<20200109115631.500056-1-bruce.richardson@intel.com>\n <20200110215205.513185-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 5/6] doc/guides: rebuild with meson whenever a\n\tfile changes",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add proper support for calling sphinx whenever a file in the doc\ndirectory changes. This is accomplished by using a wrapper script\nfor sphinx, which runs sphinx but also emits a gcc-format dependency\nfile listing all the doc files. This is used by ninja so that any\nchange to the doc files triggers a rebuild of the docs.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nAcked-by: Aaron Conole <aconole@redhat.com>\nAcked-by: Luca Boccassi <bluca@debian.org>\n---\n MAINTAINERS                     |  1 +\n buildtools/call-sphinx-build.py | 31 +++++++++++++++++++++++++++++++\n buildtools/meson.build          |  6 ++++--\n doc/guides/meson.build          | 22 ++++++++--------------\n 4 files changed, 44 insertions(+), 16 deletions(-)\n create mode 100755 buildtools/call-sphinx-build.py",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 4395d8df1..aa32bfc59 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -128,6 +128,7 @@ F: meson.build\n F: lib/librte_eal/freebsd/BSDmakefile.meson\n F: meson_options.txt\n F: config/rte_config.h\n+F: buildtools/call-sphinx-build.py\n F: buildtools/gen-pmdinfo-cfile.sh\n F: buildtools/map_to_def.py\n F: buildtools/symlink-drivers-solibs.sh\ndiff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py\nnew file mode 100755\nindex 000000000..b9a3994e1\n--- /dev/null\n+++ b/buildtools/call-sphinx-build.py\n@@ -0,0 +1,31 @@\n+#! /usr/bin/env python3\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2019 Intel Corporation\n+#\n+\n+import sys\n+import os\n+from os.path import join\n+from subprocess import run, PIPE\n+from distutils.version import StrictVersion\n+\n+(sphinx, src, dst) = sys.argv[1:]  # assign parameters to variables\n+\n+# for sphinx version >= 1.7 add parallelism using \"-j auto\"\n+ver = run([sphinx, '--version'], stdout=PIPE).stdout.decode().split()[-1]\n+sphinx_cmd = [sphinx]\n+if StrictVersion(ver) >= StrictVersion('1.7'):\n+    sphinx_cmd += ['-j', 'auto']\n+\n+# find all the files sphinx will process so we can write them as dependencies\n+srcfiles = []\n+for root, dirs, files in os.walk(src):\n+    srcfiles.extend([join(root, f) for f in files])\n+\n+# run sphinx, putting the html output in a \"html\" directory\n+process = run(sphinx_cmd + ['-b', 'html', src, join(dst, 'html')], check=True)\n+print(str(process.args) + ' Done OK')\n+\n+# create a gcc format .d file giving all the dependencies of this doc build\n+with open(join(dst, '.html.d'), 'w') as d:\n+    d.write('html: ' + ' '.join(srcfiles) + '\\n')\ndiff --git a/buildtools/meson.build b/buildtools/meson.build\nindex 6ef2c5721..cd1d05403 100644\n--- a/buildtools/meson.build\n+++ b/buildtools/meson.build\n@@ -10,10 +10,12 @@ check_experimental_syms = find_program('check-experimental-syms.sh')\n # set up map-to-def script using python, either built-in or external\n python3 = import('python').find_installation(required: false)\n if python3.found()\n-\tmap_to_def_cmd = [python3, files('map_to_def.py')]\n+\tpy3 = [python3]\n else\n-\tmap_to_def_cmd = ['meson', 'runpython', files('map_to_def.py')]\n+\tpy3 = ['meson', 'runpython']\n endif\n+map_to_def_cmd = py3 + files('map_to_def.py')\n+sphinx_wrapper = py3 + files('call-sphinx-build.py')\n \n # stable ABI always starts with \"DPDK_\"\n is_experimental_cmd = [find_program('grep', 'findstr'), '^DPDK_']\ndiff --git a/doc/guides/meson.build b/doc/guides/meson.build\nindex 80c21d168..732e7ad3a 100644\n--- a/doc/guides/meson.build\n+++ b/doc/guides/meson.build\n@@ -7,24 +7,18 @@ if not sphinx.found()\n \tsubdir_done()\n endif\n \n-htmldir = join_paths('share', 'doc', 'dpdk')\n+htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')\n html_guides = custom_target('html_guides',\n-\tinput: meson.current_source_dir(),\n-\toutput: 'guides',\n-\tcommand: [sphinx, '-b', 'html',\n-\t\t'-d', meson.current_build_dir() + '/.doctrees',\n-\t\t'@INPUT@', meson.current_build_dir() + '/guides'],\n+\tinput: files('index.rst'),\n+\toutput: 'html',\n+\tcommand: [sphinx_wrapper, sphinx, meson.current_source_dir(), meson.current_build_dir()],\n+\tdepfile: '.html.d',\n \tbuild_by_default: get_option('enable_docs'),\n \tinstall: get_option('enable_docs'),\n \tinstall_dir: htmldir)\n \n+install_data(files('custom.css'),\n+\t\t\tinstall_dir: join_paths(htmldir,'_static', 'css'))\n+\n doc_targets += html_guides\n doc_target_names += 'HTML_Guides'\n-\n-# sphinx leaves a .buildinfo in the target directory, which we don't\n-# want to install. Note that sh -c has to be used, otherwise the\n-# env var does not get expanded if calling rm/install directly.\n-meson.add_install_script('sh', '-c',\n-\t'rm -f $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/.buildinfo')\n-meson.add_install_script('sh', '-c',\n-\t'install -D -m0644 $MESON_SOURCE_ROOT/doc/guides/custom.css $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/_static/css/custom.css')\n",
    "prefixes": [
        "v4",
        "5/6"
    ]
}