sphinx-pre-install: use a requirements file
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 17 Jul 2017 21:46:38 +0000 (18:46 -0300)
committerJonathan Corbet <corbet@lwn.net>
Sun, 23 Jul 2017 21:51:24 +0000 (15:51 -0600)
Instead of using 3 commands to install a virtualenv, use
a single one, reading the requirements from this file:

Documentation/sphinx/requirements.txt

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/sphinx/requirements.txt [new file with mode: 0644]
scripts/sphinx-pre-install

diff --git a/Documentation/sphinx/requirements.txt b/Documentation/sphinx/requirements.txt
new file mode 100644 (file)
index 0000000..742be3e
--- /dev/null
@@ -0,0 +1,3 @@
+docutils==0.12
+Sphinx==1.4.9
+sphinx_rtd_theme
index bcd6f79..230d9cc 100755 (executable)
@@ -14,6 +14,7 @@ use strict;
 # GNU General Public License for more details.
 
 my $virtenv_dir = "sphinx_1.4";
+my $requirement_file = "Documentation/sphinx/requirements.txt";
 
 #
 # Static vars
@@ -467,9 +468,7 @@ sub check_needs()
 
                        printf "\t$virtualenv $virtenv_dir\n";
                        printf "\t. $activate\n";
-                       printf "\tpip install 'docutils==0.12'\n";
-                       printf "\tpip install 'Sphinx==1.4.9'\n";
-                       printf "\tpip install sphinx_rtd_theme\n";
+                       printf "\tpip install -r $requirement_file\n";
                        $need++;
                }
        }