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/01 08:39:28 UTC

[plc4x] 01/05: chore(build): Updated the prerequisiteCheck.groovy to the latest settings.

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

commit ada06c1a8ac35b1913315413a0ee8f2a4e9500d9
Author: christoferdutz <ch...@c-ware.de>
AuthorDate: Fri Jul 1 10:35:45 2022 +0200

    chore(build): Updated the prerequisiteCheck.groovy to the latest settings.
---
 sandbox/plc4py/pom.xml                   | 15 ++++----
 src/main/script/prerequisiteCheck.groovy | 61 +++-----------------------------
 2 files changed, 11 insertions(+), 65 deletions(-)

diff --git a/sandbox/plc4py/pom.xml b/sandbox/plc4py/pom.xml
index 66d44937a..f4a7c168a 100644
--- a/sandbox/plc4py/pom.xml
+++ b/sandbox/plc4py/pom.xml
@@ -35,7 +35,6 @@
   <description>Implementation of the protocol adapters for usage as Python library.</description>
 
   <properties>
-    <unity.version>2.5.0</unity.version>
     <!-- Tell Sonar where to find the python sources -->
     <sonar.sources>plc4py</sonar.sources>
     <option.with-proxies>OFF</option.with-proxies>
@@ -85,7 +84,7 @@
               <goal>exec</goal>
             </goals>
             <configuration>
-              <executable>python</executable>
+              <executable>python3</executable>
               <arguments>
                 <argument>-m</argument>
                 <argument>venv</argument>
@@ -101,7 +100,7 @@
               <goal>exec</goal>
             </goals>
             <configuration>
-              <executable>${python.venv.bin}pip</executable>
+              <executable>${python.venv.bin}pip3</executable>
               <arguments>
                 <argument>install</argument>
                 <argument>.</argument>
@@ -116,7 +115,7 @@
               <goal>exec</goal>
             </goals>
             <configuration>
-              <executable>${python.venv.bin}pip</executable>
+              <executable>${python.venv.bin}pip3</executable>
               <arguments>
                 <argument>install</argument>
                 <argument>.[dev]</argument>
@@ -131,7 +130,7 @@
               <goal>exec</goal>
             </goals>
             <configuration>
-              <executable>${python.venv.bin}python</executable>
+              <executable>${python.venv.bin}python3</executable>
               <arguments>
                 <argument>-m</argument>
                 <argument>pytest</argument>
@@ -148,7 +147,7 @@
               <goal>exec</goal>
             </goals>
             <configuration>
-              <executable>${python.venv.bin}pip</executable>
+              <executable>${python.venv.bin}pip3</executable>
               <arguments>
                 <argument>wheel</argument>
                 <argument>.</argument>
@@ -158,7 +157,6 @@
               </arguments>
             </configuration>
           </execution>
-
         </executions>
       </plugin>
 
@@ -190,8 +188,7 @@
           </filesets>
         </configuration>
       </plugin>
-
-      </plugins>
+    </plugins>
   </build>
 
 </project>
diff --git a/src/main/script/prerequisiteCheck.groovy b/src/main/script/prerequisiteCheck.groovy
index ccf58a63b..3da7e9c20 100644
--- a/src/main/script/prerequisiteCheck.groovy
+++ b/src/main/script/prerequisiteCheck.groovy
@@ -311,7 +311,7 @@ def checkCmake() {
 def checkPython() {
     print "Detecting Python version:  "
     try {
-        def process = ("python --version").execute()
+        def process = ("python3 --version").execute()
         def stdOut = new StringBuilder()
         def stdErr = new StringBuilder()
         process.consumeProcessOutput(stdOut, stdErr)
@@ -336,7 +336,7 @@ def checkPython() {
 def checkSetupTools() {
     print "Detecting setuptools:      "
     try {
-        def cmdArray = ["python", "-c", "import setuptools"]
+        def cmdArray = ["python3", "-c", "import setuptools"]
         def process = cmdArray.execute()
         def stdOut = new StringBuilder()
         def stdErr = new StringBuilder()
@@ -354,27 +354,6 @@ def checkSetupTools() {
     }
 }
 
-/*
- * This check does an extremely simple check, if the boost library exists in the maven local repo.
- * We're not checking if it could be resolved.
- */
-
-def checkBoost() {
-    print "Detecting Boost library:   "
-    def localRepoBaseDir = session.getLocalRepository().getBasedir()
-    def expectedFile = new File(localRepoBaseDir, "org/apache/plc4x/plc4x-tools-boost/" + project.version +
-        "/plc4x-tools-boost-" + project.version + "-lib-" + project.properties["os.classifier"] + ".zip")
-    if (!expectedFile.exists()) {
-        println "              missing"
-        println ""
-        println "Missing the Boost library. This has to be built by activating the Maven profile 'with-boost'. This only has to be built once."
-        println ""
-        allConditionsMet = false
-    } else {
-        println "              OK"
-    }
-}
-
 def checkOpenSSL() {
     print "Detecting OpenSSL version: "
     def output
@@ -478,9 +457,7 @@ println "Detected Arch: " + arch
 // Find out which profiles are enabled.
 /////////////////////////////////////////////////////
 
-def boostEnabled = false
 def cEnabled = false
-def cppEnabled = false
 def dockerEnabled = false
 def dotnetEnabled = false
 def goEnabled = false
@@ -491,9 +468,7 @@ def sandboxEnabled = false
 def apacheReleaseEnabled = false
 def activeProfiles = session.request.activeProfiles
 for (def activeProfile : activeProfiles) {
-    if (activeProfile == "with-boost") {
-        boostEnabled = true
-    } else if (activeProfile == "with-c") {
+    if (activeProfile == "with-c") {
         cEnabled = true
     } else if (activeProfile == "with-cpp") {
         cppEnabled = true
@@ -538,14 +513,7 @@ if (dotnetEnabled) {
 }
 
 if (goEnabled) {
-    checkGo()
-}
-
-if (cppEnabled) {
-    checkClang()
-    // The cmake-maven-plugin requires at least java 11
-    checkJavaVersion("11", null)
-    checkGcc()
+//    checkGo()
 }
 
 if (javaEnabled) {
@@ -558,30 +526,16 @@ if (cEnabled) {
     checkGcc()
 }
 
-if (cppEnabled) {
-    checkGpp()
-}
-
 if (pythonEnabled) {
     checkPython()
     checkSetupTools()
 }
 
-// Boost needs the visual-studio `cl` compiler to compile the boostrap.
-if (boostEnabled && (os == "windows")) {
-    // TODO: checkVisualStudio()
-}
-
-// We only need this check, if boost is not enabled but we're enabling cpp.
-if (!boostEnabled && cppEnabled) {
-    checkBoost()
-}
-
 if (sandboxEnabled && dockerEnabled) {
     checkDocker()
 }
 
-if (cppEnabled || cEnabled) {
+if (cEnabled) {
     // CMake requires at least maven 3.6.0
     checkMavenVersion("3.6.0", null)
 }
@@ -590,11 +544,6 @@ if (apacheReleaseEnabled) {
     // TODO: Check libpcap is installed
 }
 
-if (cppEnabled && (os == "windows")) {
-    print "Unfortunately currently we don't support building the 'with-cpp' profile on windows. This will definitely change in the future."
-    allConditionsMet = false
-}
-
 if (os == "mac") {
     // The current system version from mac crashes so we assert for a version coming with brew
     checkLibPcap("1.10.1", os)