Skip to content

Commit 15c542c

Browse files
JacekPliszkapitrou
andcommitted
ARROW-8237: [Python][Documentation] Minor corrections to python minimal build documentation
* Fedora instructions changed to podman with disclaimer added * venv script modified to use environment variables more allowing user to put all build related files to single directory (before some were in HOME, other in / ) Closes apache#6845 from JacekPliszka/ARROW-8237 Lead-authored-by: Jacek Pliszka <jacek.pliszka@gmail.com> Co-authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent b1d4c86 commit 15c542c

2 files changed

Lines changed: 34 additions & 21 deletions

File tree

‎python/examples/minimal_build/README.md‎

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@ environments.
2626

2727
## Fedora 31
2828

29-
Build image:
30-
29+
First, build the Docker image using:
3130
```
32-
docker build -t arrow_fedora_minimal -f Dockerfile.fedora
31+
docker build -t arrow_fedora_minimal -f Dockerfile.fedora .
3332
```
3433

35-
Build with conda or pip/virtualenv:
36-
34+
Then build PyArrow with conda or pip/virtualenv, respectively:
3735
```
3836
# With pip/virtualenv
3937
docker run --rm -t -i -v $PWD:/io arrow_fedora_minimal /io/build_venv.sh
@@ -44,18 +42,32 @@ docker run --rm -t -i -v $PWD:/io arrow_fedora_minimal /io/build_conda.sh
4442

4543
## Ubuntu 18.04
4644

47-
Build image:
48-
45+
First, build the Docker image using:
4946
```
50-
docker build -t arrow_ubuntu_minimal -f Dockerfile.ubuntu
47+
docker build -t arrow_ubuntu_minimal -f Dockerfile.ubuntu .
5148
```
5249

53-
Build with conda or pip/virtualenv:
54-
50+
Then build PyArrow with conda or pip/virtualenv, respectively:
5551
```
5652
# With pip/virtualenv
5753
docker run --rm -t -i -v $PWD:/io arrow_ubuntu_minimal /io/build_venv.sh
5854
5955
# With conda
6056
docker run --rm -t -i -v $PWD:/io arrow_ubuntu_minimal /io/build_conda.sh
6157
```
58+
59+
## Building on Fedora - Podman and SELinux
60+
61+
In addition to using Podman instead of Docker, you need to specify `:Z`
62+
for SELinux relabelling when binding a volume.
63+
64+
First, build the image using:
65+
```
66+
podman build -t arrow_fedora_minimal -f Dockerfile.fedora
67+
```
68+
69+
Then build PyArrow with pip/virtualenv:
70+
```
71+
# With pip/virtualenv
72+
podman run --rm -i -v $PWD:/io:Z -t arrow_fedora_minimal /io/build_venv.sh
73+
```

‎python/examples/minimal_build/build_venv.sh‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,21 @@ set -e
2121
#----------------------------------------------------------------------
2222
# Change this to whatever makes sense for your system
2323

24-
MINICONDA=$HOME/miniconda-for-arrow
25-
LIBRARY_INSTALL_DIR=$HOME/local-libs
26-
CPP_BUILD_DIR=$HOME/arrow-cpp-build
27-
ARROW_ROOT=/arrow
28-
export ARROW_HOME=/dist
29-
export LD_LIBRARY_PATH=/dist/lib:$LD_LIBRARY_PATH
24+
WORKDIR=${WORKDIR:-$HOME}
25+
MINICONDA=$WORKDIR/miniconda-for-arrow
26+
LIBRARY_INSTALL_DIR=$WORKDIR/local-libs
27+
CPP_BUILD_DIR=$WORKDIR/arrow-cpp-build
28+
ARROW_ROOT=$WORKDIR/arrow
29+
export ARROW_HOME=$WORKDIR/dist
30+
export LD_LIBRARY_PATH=$ARROW_HOME/lib:$LD_LIBRARY_PATH
3031

31-
git clone https://github.com/apache/arrow.git /arrow
32+
virtualenv $WORKDIR/venv
33+
source $WORKDIR/venv/bin/activate
3234

33-
virtualenv /venv
34-
source /venv/bin/activate
35+
git clone https://github.com/apache/arrow.git $ARROW_ROOT
3536

36-
pip install -r /arrow/python/requirements-build.txt \
37-
-r /arrow/python/requirements-test.txt
37+
pip install -r $ARROW_ROOT/python/requirements-build.txt \
38+
-r $ARROW_ROOT/python/requirements-test.txt
3839

3940
#----------------------------------------------------------------------
4041
# Build C++ library

0 commit comments

Comments
 (0)