Skip to content

Commit

Permalink
Dockerfile_alpine: fix broken pip six installation (OSGeo#1568)
Browse files Browse the repository at this point in the history
Fixes docker hub error:

```
Step 32/49 : RUN pip3 install --upgrade pip six grass-session
---> Running in 1c63e0d56789
Collecting pip
Downloading pip-21.1.1-py3-none-any.whl (1.5 MB)
Collecting six
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting grass-session
Downloading grass_session-0.5-py2.py3-none-any.whl (31 kB)
Installing collected packages: pip, six, grass-session
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Uninstalling pip-20.0.2:
Successfully uninstalled pip-20.0.2
Attempting uninstall: six
Found existing installation: six 1.15.0
ERROR: Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
```
  • Loading branch information
a0x8o committed Sep 5, 2024
1 parent 5825ad9 commit 136362b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# Introduction

GRASS GIS is written in more than one programming language. While most
of the source code is written in C, about 30% is written in Python. A
compiler is needed to convert the C/C++ source code into executable
files ("binaries"). In contrast, Python is an interpreted language that
can only be executed with Python software.

Now, in order to create an installable binary package from a source
code package, the so-called "compilation step" is required. While the
source code consists of thousands of C and Python files (plus HTML
documentation), the included "makefiles" tell the build system to
generate binaries from the source code in the correct order, render the
manual pages, etc.

The way to install the compiler tools and Python depends on the operating
system. To make this easier, we have collected copy-paste instructions
for most operating systems in our wiki:

[Compile and install instructions](https://grasswiki.osgeo.org/wiki/Compile_and_Install)

# Contributing

There is more than one way of contributing to GRASS GIS.
Expand Down
28 changes: 28 additions & 0 deletions docker/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2203,6 +2203,7 @@ FROM common as grass
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> main
=======
Expand Down Expand Up @@ -2324,6 +2325,10 @@ FROM common as grass
=======
>>>>>>> 8422103f4c (wxpyimgview: explicit conversion to int (#2704))
>>>>>>> osgeo-main
=======
<<<<<<< HEAD:docker/alpine/Dockerfile
=======
>>>>>>> b67db97c2e (Dockerfile_alpine: fix broken pip six installation (#1568))
ENV LC_ALL="en_US.UTF-8"
# Copy GRASS GIS from build image
Expand All @@ -2347,6 +2352,7 @@ COPY --from=build /usr/local/grass* /usr/local/grass/
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> main
=======
Expand Down Expand Up @@ -2390,6 +2396,8 @@ COPY --from=build /usr/local/grass* /usr/local/grass/
>>>>>>> osgeo-main
=======
>>>>>>> osgeo-main
=======
>>>>>>> b67db97c2e (Dockerfile_alpine: fix broken pip six installation (#1568))
# pip 20.0.0 fix
RUN apk add curl && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py pip==20.0.2 && rm get-pip.py
Expand All @@ -2409,6 +2417,7 @@ RUN apk add curl && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && p
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> main
<<<<<<< HEAD:docker/alpine/Dockerfile
Expand Down Expand Up @@ -2733,6 +2742,13 @@ RUN grass --tmp-location EPSG:4326 --exec g.version -rge && \
=======
>>>>>>> 8422103f4c (wxpyimgview: explicit conversion to int (#2704))
>>>>>>> osgeo-main
=======
RUN pip3 install --upgrade grass-session
RUN ln -s /usr/local/grass /usr/local/grass7
RUN ln -s /usr/local/grass `grass --config path`
RUN grass --tmp-location EPSG:4326 --exec g.version -rge && \
>>>>>>> b67db97c2e (Dockerfile_alpine: fix broken pip six installation (#1568))
pdal --version && \
python3 --version
Expand Down Expand Up @@ -2763,6 +2779,7 @@ ENV GRASSBIN=grass
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> main
=======
Expand Down Expand Up @@ -3008,6 +3025,13 @@ RUN grass --tmp-location EPSG:4326 --exec g.extension extension=r.learn.ml
=======
>>>>>>> 8422103f4c (wxpyimgview: explicit conversion to int (#2704))
>>>>>>> osgeo-main
=======
RUN grass --tmp-location EPSG:4326 --exec g.extension extension=r.in.pdal
RUN /usr/bin/python3 /scripts/test_grass_session.py
# Test addon installation
RUN grass --tmp-location EPSG:4326 --exec g.extension extension=r.learn.ml
>>>>>>> b67db97c2e (Dockerfile_alpine: fix broken pip six installation (#1568))
FROM grass as final
Expand All @@ -3030,6 +3054,7 @@ FROM grass as final
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> main
=======
Expand Down Expand Up @@ -3081,6 +3106,9 @@ FROM grass as final
=======
>>>>>>> e526e86235 (Dockerfile_alpine: fix broken pip six installation (#1568)):docker/alpine/Dockerfile_alpine
>>>>>>> 01018c1f62 (Dockerfile_alpine: fix broken pip six installation (#1568))
=======
>>>>>>> e526e86235 (Dockerfile_alpine: fix broken pip six installation (#1568)):docker/alpine/Dockerfile_alpine
>>>>>>> b67db97c2e (Dockerfile_alpine: fix broken pip six installation (#1568))
# GRASS GIS specific
# allow work with MAPSETs that are not owned by current user
<<<<<<< HEAD
Expand Down

0 comments on commit 136362b

Please sign in to comment.