Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750946AbdFSOML convert rfc822-to-8bit (ORCPT ); Mon, 19 Jun 2017 10:12:11 -0400 Received: from smtp3.goneo.de ([85.220.129.37]:43528 "EHLO smtp3.goneo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbdFSOMK (ORCPT ); Mon, 19 Jun 2017 10:12:10 -0400 X-Spam-Flag: NO X-Spam-Score: -2.736 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH] changes.rst: explain the usage of virtual environment From: Markus Heiser In-Reply-To: <20170619074653.4fbcdd36@lwn.net> Date: Mon, 19 Jun 2017 16:11:56 +0200 Cc: Christoph Hellwig , Mauro Carvalho Chehab , Linux Doc Mailing List , Mauro Carvalho Chehab , "linux-kernel@vger.kernel.org org List" , Greg Kroah-Hartman , SeongJae Park , Masahiro Yamada , Max Filippov Content-Transfer-Encoding: 8BIT Message-Id: <59B0A362-D044-4FA8-9286-6D955B8DB241@darmarit.de> References: <736d4f4128feaf09f0de91e665dd0666ffa07a18.1497870046.git.mchehab@s-opensource.com> <20170619130837.GA25524@infradead.org> <20170619074653.4fbcdd36@lwn.net> To: Jonathan Corbet 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: 2399 Lines: 78 > Am 19.06.2017 um 15:46 schrieb Jonathan Corbet : > > On Mon, 19 Jun 2017 06:08:37 -0700 > Christoph Hellwig wrote: > >> On Mon, Jun 19, 2017 at 08:24:10AM -0300, Mauro Carvalho Chehab wrote: >>> As the Sphinx build seems very fragile, specially for >>> PDF output, add a notice about how to use it on a virtual >>> environment. >> >> Please don't. python venv are good at one thing only, and that is >> making a mess of your python module path. Don't ever use them on a >> system that has proper package management. > > Well, they are also good for running specific versions of a given package > without disrupting the setup of your system as a whole, and when even a > system with proper package management may not offer the version you need. > > I guess my question with the patch is whether this text really belongs in > changes.rst, or whether it should be part of the doc-guide. Hi, here are my 5cents: Typically I have a PY_ENV target in my projects, building a virtualenv in a folder named ./local. E.g. in LinuxDoc [1] I use something like this: PY ?=3 PYTHON ?= python$(PY) .. VIRTUALENV = virtualenv --python=$(PYTHON) VTENV_OPTS = "--no-site-packages" PY_ENV = ./local/py$(PY) .. quiet_cmd_virtualenv = PYENV $@ cmd_virtualenv = \ if [ ! -d "./$(PY_ENV)" ];then \ $(VIRTUALENV) $(VIRTUALENV_VERBOSE) $(VTENV_OPTS) $2; \ else \ echo "using virtualenv from $2"; \ fi ... # to build *local* environment, python and virtualenv from the OS is needed! $(PY_ENV): virtualenv-exe python-exe $(call cmd,virtualenv,$(PY_ENV)) @$(PY_ENV_BIN)/pip install $(PIP_VERBOSE) -r requirements.txt .. And the sphinxbuild coammand is used from there:: SPHINXBUILD ?= $(PY_ENV_BIN)/sphinx-build By this I can stick versions packages. E.g. to select last version of RTD theme and Sphinx version 1.5 or upper, I add the following lines to my reqierements.txt:: Sphinx>=1.5 sphinx_rtd_theme If you are interested, I can prepare a patch, to add such functionality (as option) to Documents/Makefile (which will be documented in the doc-guide). [1] https://github.com/return42/linuxdoc/blob/master/utils/makefile.python -- Markus -- > > jon > -- > To unsubscribe from this list: send the line "unsubscribe linux-doc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html