get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64346,
    "url": "http://patches.dpdk.org/api/patches/64346/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200109115631.500056-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": "<20200109115631.500056-6-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200109115631.500056-6-bruce.richardson@intel.com",
    "date": "2020-01-09T11:56:30",
    "name": "[5/6] doc/guides: rebuild with meson whenever a file changes",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e2c1b7e67f6b4a400aed606a029ae797d59b914a",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200109115631.500056-6-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 8030,
            "url": "http://patches.dpdk.org/api/series/8030/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8030",
            "date": "2020-01-09T11:56:25",
            "name": "meson build improvements",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8030/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64346/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64346/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 E3926A046B;\n\tThu,  9 Jan 2020 12:57:19 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 935511DCAC;\n\tThu,  9 Jan 2020 12:56:57 +0100 (CET)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id EFF441DCAC\n for <dev@dpdk.org>; Thu,  9 Jan 2020 12:56:55 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 09 Jan 2020 03:56:54 -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; 09 Jan 2020 03:56:53 -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,413,1571727600\"; d=\"scan'208\";a=\"254571929\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "david.marchand@6wind.com,\n\tjohn.mcnamara@intel.com,\n\tbluca@debian.org",
        "Cc": "dev@dpdk.org,\n\tBruce Richardson <bruce.richardson@intel.com>",
        "Date": "Thu,  9 Jan 2020 11:56:30 +0000",
        "Message-Id": "<20200109115631.500056-6-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.24.1",
        "In-Reply-To": "<20200109115631.500056-1-bruce.richardson@intel.com>",
        "References": "<20200109115631.500056-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 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>\n---\n buildtools/call-sphinx-build.py | 29 +++++++++++++++++++++++++++++\n buildtools/meson.build          |  6 ++++--\n doc/guides/meson.build          | 22 ++++++++--------------\n 3 files changed, 41 insertions(+), 16 deletions(-)\n create mode 100755 buildtools/call-sphinx-build.py",
    "diff": "diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py\nnew file mode 100755\nindex 000000000..027317b9b\n--- /dev/null\n+++ b/buildtools/call-sphinx-build.py\n@@ -0,0 +1,29 @@\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+import os.path\n+import subprocess\n+\n+sphinx = sys.argv[1]\n+src = sys.argv[2]\n+dst = sys.argv[3]\n+depfile = os.path.join(dst,'.html.d')\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+    for f in files:\n+        srcfiles.append(os.path.join(root, f))\n+\n+# run sphinx, putting the html output in a \"html\" directory\n+subprocess.run([sphinx, '-j', 'auto', '-b', 'html', src,\n+                os.path.join(dst, 'html')], check = True)\n+\n+# create a gcc format .d file giving all the dependencies of this doc build\n+with open(depfile, 'w') as d:\n+    d.write('html: ' + ' '.join(srcfiles) + '\\n')\n+subprocess.run(['cp', '-f', depfile, '/tmp'])\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": [
        "5/6"
    ]
}