Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751208AbdGOJwA convert rfc822-to-8bit (ORCPT ); Sat, 15 Jul 2017 05:52:00 -0400 Received: from smtp1.goneo.de ([85.220.129.30]:47440 "EHLO smtp1.goneo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751172AbdGOJv6 (ORCPT ); Sat, 15 Jul 2017 05:51:58 -0400 X-Spam-Flag: NO X-Spam-Score: -2.764 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH RFC] scripts/sphinx-pre-install: add a script to check Sphinx install From: Markus Heiser In-Reply-To: <20170714232140.0608da3c@vento.lan> Date: Sat, 15 Jul 2017 11:51:45 +0200 Cc: Linux Doc Mailing List , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Content-Transfer-Encoding: 8BIT Message-Id: <1719549A-CDF5-4448-8CD6-28B52802E00A@darmarit.de> References: <7ab9f1045ad103f1da56cb6b19948ea107fdb272.1500050599.git.mchehab@s-opensource.com> <042D234A-6B3D-43D4-84BA-8332C0596AA4@darmarit.de> <20170714232140.0608da3c@vento.lan> To: Mauro Carvalho Chehab X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2704 Lines: 94 > Am 15.07.2017 um 04:21 schrieb Mauro Carvalho Chehab : > > Em Fri, 14 Jul 2017 19:35:59 +0200 > Markus Heiser escreveu: > >>> Am 14.07.2017 um 18:49 schrieb Mauro Carvalho Chehab : >>> >>> Solving Sphinx dependencies can be painful. Add a script to >>> check if everything is ok. >> >> just my 5cent: >> >> What we need is a "requirements.txt" file to define a >> **reference environment**. E.g. to stick Sphinx 1.4.9 in >> such a reference environment:: >> >> --- >> Sphinx==1.4.9 >> sphinx_rtd_theme >> --------------------- >> >> The rest is similarly to what you wrote in doc-guide/sphinx.rst ... >> >> The ref-environment can be build with virtualenv & pip:: >> >> $ virtualenv --python=python3 docenv >> (doc-env) $ source ./docenv/bin/activate >> (doc-env) $ pip install -r requirements.txt >> >> From now we can start our build as usual. If not already done, >> first activate the environment:: >> >> $ . ./docenv/bin/activate >> (doc-env) $ make htmldocs >> >> This (requirements.txt) is the way python packaging goes. > > > The above assumes that the user wants to use virtenv and > have python3, virtualenv3 and pip3 already installed. > > I agree that a virtual environment works better than using > distro-specific packaging, as Sphinx toolchain is really > fragile. But we should give an option for the developer to > use whatever he wants. The developer is free to choose the way he like. But we are talking about what is "best practice". I tested sphinx-pre-install and it works fine for me, thats not the point. The point is: what do we recommend? E.g. for me it advices me to run: sudo apt-get install python3-sphinx python3-sphinx-rtd-theme We should not assume that the developer (better: the build-user) owns the privilege to install fine grained OS packages. There is a admin-part and a user-part: The admin (sudoer) installs binaries into the OS: * gcc * make * python3, virtualenv * LiveTex * ImageMagick * perl * graphviz The user (developer) installs additional requirements anywhere under $HOME: * Python best practice here is virtualenv and pip .. and the *recipe* to get a *reference environment* is the requirements.txt * LaTeX what is best practice here? .. I know there is some package managing with "TeX Live Manager" (tlmgr) but I have no experience with. Is there a way to define a *requirements* file and to install such requirements anywhere under $HOME? My english is less eloquent, but I hope its clear what I mean. To have a script is nice, but first lets explore what best practice is. -- Markus --