From 572be4d74d3643e27282b060c6fe2f02e3f185ff Mon Sep 17 00:00:00 2001 From: Brennan Ashton Date: Wed, 2 Sep 2020 11:47:36 -0700 Subject: [PATCH] Docs: Clean up installation requirements and only support pipenv Signed-off-by: Brennan Ashton --- .github/workflows/doc.yml | 8 ++++++ Documentation/Pipfile | 2 +- Documentation/Pipfile.lock | 22 ++------------ Documentation/contributing/documentation.rst | 30 ++++++-------------- Documentation/requirements.txt | 3 -- 5 files changed, 20 insertions(+), 45 deletions(-) delete mode 100644 Documentation/requirements.txt diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 10560aa5222..0801cce6f12 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -20,6 +20,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Generate requirements.txt file + run: | + cd Documentation/ + pip3 install pipenv + pipenv lock -r > requirements.txt - uses: ammaraskar/sphinx-action@master with: docs-folder: "Documentation/" diff --git a/Documentation/Pipfile b/Documentation/Pipfile index 427173299c3..de17ea39926 100644 --- a/Documentation/Pipfile +++ b/Documentation/Pipfile @@ -11,4 +11,4 @@ sphinx_rtd_theme = "*" Sphinx = "*" [requires] -python_version = "3.7" +python_version = "3" diff --git a/Documentation/Pipfile.lock b/Documentation/Pipfile.lock index 69ae687bea7..2b4bcf43164 100644 --- a/Documentation/Pipfile.lock +++ b/Documentation/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "211b83bbd887f84b143e56bfb81a0871f186d934b0c973032464e70f4138d79f" + "sha256": "0f506aecc0f6e03287fd75ac128cf2d561b32ce607fd0559eab0a95641181d8c" }, "pipfile-spec": 6, "requires": { - "python_version": "3.7" + "python_version": "3" }, "sources": [ { @@ -28,7 +28,6 @@ "sha256:1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38", "sha256:d670ea0b10f8b723672d3a6abeb87b565b244da220d76b4dba1b66269ec152d4" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.0" }, "certifi": { @@ -50,7 +49,6 @@ "sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af", "sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==0.16" }, "idna": { @@ -58,7 +56,6 @@ "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.10" }, "imagesize": { @@ -66,7 +63,6 @@ "sha256:6965f19a6a2039c7d48bca7dba2473069ff854c36ae6f19d2cde309d998228a1", "sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.2.0" }, "jinja2": { @@ -74,7 +70,6 @@ "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0", "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==2.11.2" }, "m2r2": { @@ -121,7 +116,6 @@ "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7", "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.1.1" }, "mistune": { @@ -136,7 +130,6 @@ "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8", "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==20.4" }, "pygments": { @@ -144,7 +137,6 @@ "sha256:647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44", "sha256:ff7a40b4860b727ab48fad6360eb351cc1b33cbf9b15a0f689ca5353e9463324" ], - "markers": "python_version >= '3.5'", "version": "==2.6.1" }, "pyparsing": { @@ -152,7 +144,6 @@ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.4.7" }, "pytz": { @@ -167,7 +158,6 @@ "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b", "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==2.24.0" }, "six": { @@ -175,7 +165,6 @@ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.15.0" }, "snowballstemmer": { @@ -206,7 +195,6 @@ "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a", "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58" ], - "markers": "python_version >= '3.5'", "version": "==1.0.2" }, "sphinxcontrib-devhelp": { @@ -214,7 +202,6 @@ "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e", "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4" ], - "markers": "python_version >= '3.5'", "version": "==1.0.2" }, "sphinxcontrib-htmlhelp": { @@ -222,7 +209,6 @@ "sha256:3c0bc24a2c41e340ac37c85ced6dafc879ab485c095b1d65d2461ac2f7cca86f", "sha256:e8f5bb7e31b2dbb25b9cc435c8ab7a79787ebf7f906155729338f3156d93659b" ], - "markers": "python_version >= '3.5'", "version": "==1.0.3" }, "sphinxcontrib-jsmath": { @@ -230,7 +216,6 @@ "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8" ], - "markers": "python_version >= '3.5'", "version": "==1.0.1" }, "sphinxcontrib-qthelp": { @@ -238,7 +223,6 @@ "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72", "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6" ], - "markers": "python_version >= '3.5'", "version": "==1.0.3" }, "sphinxcontrib-serializinghtml": { @@ -246,7 +230,6 @@ "sha256:eaa0eccc86e982a9b939b2b82d12cc5d013385ba5eadcc7e4fed23f4405f77bc", "sha256:f242a81d423f59617a8e5cf16f5d4d74e28ee9a66f9e5b637a18082991db5a9a" ], - "markers": "python_version >= '3.5'", "version": "==1.1.4" }, "urllib3": { @@ -254,7 +237,6 @@ "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a", "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", "version": "==1.25.10" } }, diff --git a/Documentation/contributing/documentation.rst b/Documentation/contributing/documentation.rst index 58b83e5cdd7..565d9ca1d4b 100644 --- a/Documentation/contributing/documentation.rst +++ b/Documentation/contributing/documentation.rst @@ -15,29 +15,17 @@ Building To render the Documentation locally, you should clone the NuttX main repository, and go into ``Documentation`` directory. Then, - 1. Install sphinx and other dependencies. You can do this in one of two ways: + 1. Install Sphinx and other dependencies using pipenv. + You may also find it helpful on platforms such as Windows and MacOS to use *pyenv* + to manage your python installation. You can read about installing that on the + project `site `_. - * **Fast and easy**: + .. code-block:: console - .. code-block:: console - - pip3 install -r requirements.txt - - * **Slower but cleaner**: - - .. code-block:: console - - $ # install pyenv - $ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash - $ # install python - $ pyenv install 3.7.3 - $ pyenv local 3.7.3 - $ # install pipenv - $ pip install pipenv - $ # install sphinx and related software - $ pipenv install - $ # activate the virtual environent - $ pipenv shell + $ pip3 install pipenv + $ pipenv install + $ # activate the virtual environent + $ pipenv shell 2. Build documentation: diff --git a/Documentation/requirements.txt b/Documentation/requirements.txt deleted file mode 100644 index 1734a14b4a4..00000000000 --- a/Documentation/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -sphinx-rtd-theme==0.5.0 -m2r2==0.2.5 -sphinx==3.2.1