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 13:06:44 UTC
[plc4x] 01/02: chore(build): Updated the python dependency to min 3.3 (as we're using venv)
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 d957f87017480178233fbea2d03cbca8655cbaee
Author: christoferdutz <ch...@c-ware.de>
AuthorDate: Sat Jul 2 15:06:09 2022 +0200
chore(build): Updated the python dependency to min 3.3 (as we're using venv)
---
sandbox/plc4py/pom.xml | 22 +++++++++++-----------
src/main/script/prerequisiteCheck.groovy | 14 ++++++++++++--
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/sandbox/plc4py/pom.xml b/sandbox/plc4py/pom.xml
index 226ae1be0..1833db24c 100644
--- a/sandbox/plc4py/pom.xml
+++ b/sandbox/plc4py/pom.xml
@@ -84,7 +84,7 @@
<goal>exec</goal>
</goals>
<configuration>
- <executable>python</executable>
+ <executable>python3</executable>
<arguments>
<argument>-m</argument>
<argument>venv</argument>
@@ -100,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>
@@ -115,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>
@@ -130,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>
@@ -147,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>
@@ -161,28 +161,28 @@
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
- <version>${maven.clean.plugin.version}</version>
<configuration>
<filesets>
<fileset>
- <directory>venv</directory>
+ <directory>.pytest_cache</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
- <directory>dist</directory>
+ <directory>build</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
- <directory>.pytest_cache</directory>
+ <directory>dist</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
- <directory>plc4py.egg-info</directory>
+ <directory>venv</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
- <directory>build</directory>
+ <directory>plc4py.egg-info</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
diff --git a/src/main/script/prerequisiteCheck.groovy b/src/main/script/prerequisiteCheck.groovy
index 72357cb24..579b97356 100644
--- a/src/main/script/prerequisiteCheck.groovy
+++ b/src/main/script/prerequisiteCheck.groovy
@@ -179,6 +179,8 @@ def checkGit() {
}
}
+// Remark: We're using venv, which was introduced with python 3.3,
+// that's why this is the baseline for python.
def checkPython() {
print "Detecting Python version: "
try {
@@ -190,12 +192,12 @@ def checkPython() {
Matcher matcher = extractVersion(stdOut + stdErr)
if (matcher.size() > 0) {
def curVersion = matcher[0][1]
- def result = checkVersionAtLeast(curVersion, "2.0.0")
+ def result = checkVersionAtLeast(curVersion, "3.3.0")
if (!result) {
allConditionsMet = false
}
} else {
- println "missing (Please install at least version 2.0.0)"
+ println "missing (Please install at least version 3.3.0)"
allConditionsMet = false
}
} catch (Exception e) {
@@ -256,6 +258,10 @@ def checkLibPcap(String minVersion, String os) {
}
}
+def checkLibPcapHeaders() {
+
+}
+
/**
* Version extraction function/macro. It looks for occurrence of x.y or x.y.z
* in passed input text (likely output from `program --version` command if found).
@@ -351,6 +357,10 @@ if (cEnabled) {
checkGcc()
}
+if (goEnabled) {
+ checkLibPcapHeaders()
+}
+
if (pythonEnabled) {
checkPython()
}