You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2022/07/02 10:03:09 UTC

[plc4x] branch develop updated: chore(build): Removed unnecessary checks from the prerequisiteCheck.groovy and updated the documentation for mac and linux accordingly.

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 4ce92db78 chore(build): Removed unnecessary checks from the prerequisiteCheck.groovy and updated the documentation for mac and linux accordingly.
4ce92db78 is described below

commit 4ce92db78ed1726f64942a4184524d18f81df0e3
Author: christoferdutz <ch...@c-ware.de>
AuthorDate: Sat Jul 2 12:03:01 2022 +0200

    chore(build): Removed unnecessary checks from the prerequisiteCheck.groovy and updated the documentation for mac and linux accordingly.
---
 src/main/script/prerequisiteCheck.groovy          | 156 +---------------------
 src/site/asciidoc/developers/preparing/linux.adoc |  65 +--------
 src/site/asciidoc/developers/preparing/macos.adoc |  42 ++----
 3 files changed, 13 insertions(+), 250 deletions(-)

diff --git a/src/main/script/prerequisiteCheck.groovy b/src/main/script/prerequisiteCheck.groovy
index 2a7a4d3bd..72357cb24 100644
--- a/src/main/script/prerequisiteCheck.groovy
+++ b/src/main/script/prerequisiteCheck.groovy
@@ -75,29 +75,6 @@ def checkVersionAtMost(String current, String maximum) {
     curNotShorter
 }
 
-def checkBison() {
-    print "Detecting Bison version:   "
-    def output
-    try {
-        output = "bison --version".execute().text
-    } catch (IOException e) {
-        output = ""
-    }
-    Matcher matcher = extractVersion(output)
-    if (matcher.size() > 0) {
-        def curVersion = matcher[0][1]
-        def result = checkVersionAtLeast(curVersion, "2.4.0")
-        if (!result) {
-            allConditionsMet = false
-        }
-
-        // TODO: Ensure the path of the `bison` binary doesn't contain any spaces.
-    } else {
-        println "missing"
-        allConditionsMet = false
-    }
-}
-
 def checkDotnet() {
     print "Detecting Dotnet version:  "
     def output
@@ -119,28 +96,6 @@ def checkDotnet() {
     }
 }
 
-def checkGo() {
-    print "Detecting Go version:      "
-    def output
-    try {
-        output = "go version".execute().text
-    } catch (IOException e) {
-        output = ""
-    }
-    Matcher matcher = extractVersion(output)
-    if (matcher.size() > 0) {
-        def curVersion = matcher[0][1]
-        def result = checkVersionAtLeast(curVersion, "1.18.0")
-        if (!result) {
-            allConditionsMet = false
-        }
-    } else {
-        println "missing"
-        allConditionsMet = false
-    }
-}
-
-
 def checkJavaVersion(String minVersion, String maxVersion) {
     print "Detecting Java version:    "
     def curVersion = System.properties['java.version']
@@ -181,27 +136,6 @@ def checkMavenVersion(String minVersion, String maxVersion) {
     }
 }
 
-def checkFlex() {
-    print "Detecting Flex version:    "
-    def output
-    try {
-        output = "flex --version".execute().text
-    } catch (IOException e) {
-        output = ""
-    }
-    Matcher matcher = extractVersion(output)
-    if (matcher.size() > 0) {
-        def curVersion = matcher[0][1]
-        def result = checkVersionAtLeast(curVersion, "2.0.0")
-        if (!result) {
-            allConditionsMet = false
-        }
-    } else {
-        println "missing"
-        allConditionsMet = false
-    }
-}
-
 def checkGcc() {
     print "Detecting Gcc version:     "
     // TODO: For windows, check that mingw32-make is on the PATH
@@ -245,69 +179,6 @@ def checkGit() {
     }
 }
 
-def checkGpp() {
-    print "Detecting G++ version:     "
-    def output
-    try {
-        output = "g++ --version".execute().text
-    } catch (IOException e) {
-        output = ""
-    }
-    Matcher matcher = extractVersion(output)
-    if (matcher.size() > 0) {
-        def curVersion = matcher[0][1]
-        def result = checkVersionAtLeast(curVersion, "1.0.0")
-        if (!result) {
-            allConditionsMet = false
-        }
-    } else {
-        println "missing"
-        allConditionsMet = false
-    }
-}
-
-def checkClang() {
-    print "Detecting clang version:   "
-    def output
-    try {
-        output = "clang --version".execute().text
-    } catch (IOException e) {
-        output = ""
-    }
-    Matcher matcher = extractVersion(output)
-    if (matcher.size() > 0) {
-        def curVersion = matcher[0][1]
-        def result = checkVersionAtLeast(curVersion, "1.0.0")
-        if (!result) {
-            allConditionsMet = false
-        }
-    } else {
-        println "missing"
-        allConditionsMet = false
-    }
-}
-
-def checkCmake() {
-    print "Detecting cmake version:   "
-    def output
-    try {
-        output = "cmake --version".execute().text
-    } catch (IOException e) {
-        output = ""
-    }
-    Matcher matcher = extractVersion(output)
-    if (matcher.size() > 0) {
-        def curVersion = matcher[0][1]
-        def result = checkVersionAtLeast(curVersion, "3.0.0")
-        if (!result) {
-            allConditionsMet = false
-        }
-    } else {
-        println "missing"
-        allConditionsMet = false
-    }
-}
-
 def checkPython() {
     print "Detecting Python version:  "
     try {
@@ -333,27 +204,6 @@ def checkPython() {
     }
 }
 
-def checkOpenSSL() {
-    print "Detecting OpenSSL version: "
-    def output
-    try {
-        output = "openssl version".execute().text
-    } catch (IOException e) {
-        output = ""
-    }
-    Matcher matcher = extractVersion(output)
-    if (matcher.size() > 0) {
-        def curVersion = matcher[0][1]
-        def result = checkVersionAtLeast(curVersion, "1.0.0")
-        if (!result) {
-            allConditionsMet = false
-        }
-    } else {
-        println "missing"
-        allConditionsMet = false
-    }
-}
-
 // When building the StreamPipes modules we need Docker.
 // Not only should the docker executable be available, but also should the docker daemon be running.
 def checkDocker() {
@@ -491,10 +341,6 @@ if (dotnetEnabled) {
     checkDotnet()
 }
 
-if (goEnabled) {
-//    checkGo()
-}
-
 if (javaEnabled) {
     checkGit()
 }
@@ -509,7 +355,7 @@ if (pythonEnabled) {
     checkPython()
 }
 
-if (sandboxEnabled && dockerEnabled) {
+if (dockerEnabled) {
     checkDocker()
 }
 
diff --git a/src/site/asciidoc/developers/preparing/linux.adoc b/src/site/asciidoc/developers/preparing/linux.adoc
index 4e6abf55e..3355dd377 100644
--- a/src/site/asciidoc/developers/preparing/linux.adoc
+++ b/src/site/asciidoc/developers/preparing/linux.adoc
@@ -67,22 +67,6 @@ Yum based systems:
 
  sudo yum install gcc
 
-=== g++
-
-Checking:
-
- g++ --version
-
-If you get any successful output, you probably don't need to do anything.
-
-Apt-based systems:
-
- sudo apt-get install g++
-
-Yum based systems:
-
- sudo yum install g++
-
 === dotnet
 
 Checking:
@@ -95,9 +79,7 @@ Microsoft has documented what is needed to install `.Net SDK` https://dotnet.mic
 
 For Ubuntu this would be:
 
- wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u4_amd64.deb
- sudo dpkg -i libicu57_57.1-6+deb9u4_amd64.deb
- wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
+ wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb
  sudo dpkg -i packages-microsoft-prod.deb
  sudo apt-get install apt-transport-https
  sudo apt-get update
@@ -126,48 +108,3 @@ Yum based systems:
  cd Python-2.7.10
  ./configure
  make altinstall
-
-=== Python setuptools
-
-Checking:
-
- python -c "import setuptools"
-
-If this just exists and doesn't report an error, you're ok. If it complains about "No module named setuptools", then you need to install it.
-
-Apt-based systems:
-
- sudo apt-get install python-setuptools
-
-
-=== bison
-
-Checking:
-
- bison --version
-
-If you get a version above 2.3 output, you don't need to do anything.
-
-Apt-based systems:
-
- sudo apt-get install bison
-
-Yum based systems:
-
- sudo yum install bison-devel
-
-=== flex
-
-Checking:
-
- flex --version
-
-If you get any successful output, you probably don't need to do anything.
-
-Apt-based systems:
-
- sudo apt-get install flex
-
-Yum based systems:
-
- sudo yum install flex
diff --git a/src/site/asciidoc/developers/preparing/macos.adoc b/src/site/asciidoc/developers/preparing/macos.adoc
index ef097a8da..12f37986d 100644
--- a/src/site/asciidoc/developers/preparing/macos.adoc
+++ b/src/site/asciidoc/developers/preparing/macos.adoc
@@ -53,16 +53,6 @@ If you get any successful output, you probably don't need to do anything.
 
 It seems macOS comes with a version of gcc which is good enough for our usecases.
 
-=== g++
-
-Checking:
-
- g++ --version
-
-If you get any successful output, you probably don't need to do anything.
-
-It seems macOS comes with a version of g++ which is good enough for our usecases.
-
 === dotnet
 
 Checking:
@@ -81,37 +71,27 @@ Alternatively you can also install it via homebrew:
 
 Checking:
 
- python3 --version
+ python --version
 
 If you get a version of 3.0.0 or higher reported, you probably don't need to do anything.
 
 In order to install it, please execute the following command:
 
- brew install python
+ brew install pyenv
 
-=== bison
+Then use pyenv to install python:
 
-Checking:
-
- bison --version
+ pyenv install 3.9.13
 
-If you get a version above 2.3 output, you don't need to do anything.
+Then set this as the global python version:
 
-macOS comes with a pre-installed version of bison, however this version is 2.3 and hereby too old.
-So you need to update to a more recent version:
+ pyenv global 3.9.13
 
- brew install bison
- brew link bison --force
- echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >> ~/.bash_profile
+And add pyenv to the PATH:
 
-Be sure to reboot or at least restart your IDE or commandline in order for the changes to become effective.
+ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.zshrc
+ $ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
 
-=== flex
-
-Checking:
-
- flex --version
-
-If you get any successful output, you probably don't need to do anything.
+After opening a new terminal, `python` should be configured
 
-It seems macOS comes with a version of flex which is good enough for our usecases.
+ python --version