Skip to content

Commit

Permalink
admin/build-doc: s/virtualenv/python3 -m venv/
Browse files Browse the repository at this point in the history
so we don't need to use virtualenv python package for creating a
virtualenv, the "venv" module in Python3 would suffice.

see also https://docs.python.org/3/library/venv.html

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Jul 31, 2021
1 parent 70f05e4 commit 90c4995
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
7 changes: 4 additions & 3 deletions admin/build-doc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if command -v dpkg >/dev/null; then
exit 1
fi
elif command -v yum >/dev/null; then
for package in ant ditaa doxygen libxslt-devel libxml2-devel graphviz python3-devel python3-pip python3-virtualenv python3-Cython; do
for package in ant ditaa doxygen libxslt-devel libxml2-devel graphviz python3-devel python3-pip python3-Cython; do
if ! rpm -q --whatprovides $package >/dev/null ; then
missing="${missing:+$missing }$package"
fi
Expand All @@ -31,7 +31,7 @@ elif command -v yum >/dev/null; then
exit 1
fi
else
for command in dot virtualenv doxygen ant ditaa cython; do
for command in dot doxygen ant ditaa cython; do
if ! command -v "$command" > /dev/null; then
# add a space after old values
missing="${missing:+$missing }$command"
Expand All @@ -51,8 +51,9 @@ set -e
[ -z "$vdir" ] && vdir="$TOPDIR/build-doc/virtualenv"

if [ ! -e $vdir ]; then
virtualenv --python=python3 $vdir
python3 -m venv $vdir

$vdir/bin/pip install --quiet wheel
$vdir/bin/pip install --quiet \
-r $TOPDIR/admin/doc-requirements.txt \
-r $TOPDIR/admin/doc-python-common-requirements.txt
Expand Down
16 changes: 7 additions & 9 deletions doc/start/documenting-ceph.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ the following packages are required:
<table cellpadding="10"><colgroup><col width="30%"><col width="30%"><col width="30%"></colgroup><tbody valign="top"><tr><td><h3>Debian/Ubuntu</h3>

- gcc
- python-dev
- python-pip
- python-virtualenv
- python-sphinx
- python3-dev
- python3-pip
- python3-sphinx
- pytnon3-venv
- libxml2-dev
- libxslt1-dev
- doxygen
Expand All @@ -288,7 +288,6 @@ the following packages are required:
- gcc
- python-devel
- python-pip
- python-virtualenv
- python-docutils
- python-jinja2
- python-pygments
Expand All @@ -307,7 +306,6 @@ the following packages are required:
- gcc
- python-devel
- python-pip
- python-virtualenv
- python-docutils
- python-jinja2
- python-pygments
Expand All @@ -328,14 +326,14 @@ distributions, execute the following:

.. prompt:: bash $

sudo apt-get install gcc python-dev python-pip python-virtualenv libxml2-dev libxslt-dev doxygen graphviz ant ditaa
sudo apt-get install gcc python-dev python-pip libxml2-dev libxslt-dev doxygen graphviz ant ditaa
sudo apt-get install python-sphinx

For Fedora distributions, execute the following:

.. prompt:: bash $

sudo yum install gcc python-devel python-pip python-virtualenv libxml2-devel libxslt-devel doxygen graphviz ant
sudo yum install gcc python-devel python-pip libxml2-devel libxslt-devel doxygen graphviz ant
sudo pip install html2text
sudo yum install python-jinja2 python-pygments python-docutils python-sphinx
sudo yum install jericho-html ditaa
Expand All @@ -353,7 +351,7 @@ For CentOS/RHEL distributions, execute the following:

.. prompt:: bash $

sudo yum install gcc python-devel python-pip python-virtualenv libxml2-devel libxslt-devel doxygen graphviz ant
sudo yum install gcc python-devel python-pip libxml2-devel libxslt-devel doxygen graphviz ant
sudo pip install html2text

For CentOS/RHEL distributions, the remaining python packages are not available
Expand Down
3 changes: 1 addition & 2 deletions doc_deps.deb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ git
gcc
python3-dev
python3-pip
python3-virtualenv
virtualenv
python3-venv
doxygen
ditaa
libxml2-dev
Expand Down

0 comments on commit 90c4995

Please sign in to comment.