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/22 09:01:02 UTC
[plc4x] 01/02: chore(docker): Worked on getting the Docker build working again (Needed work on plc4py)
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 7ffef50064a54a8de99c4c19189a4051592267a4
Author: christoferdutz <ch...@c-ware.de>
AuthorDate: Fri Jul 22 10:59:55 2022 +0200
chore(docker): Worked on getting the Docker build working again (Needed work on plc4py)
---
Dockerfile | 25 ++++++-------------------
pom.xml | 10 +++++-----
sandbox/plc4py/pom.xml | 2 +-
sandbox/plc4py/setup.py | 3 +++
src/main/script/prerequisiteCheck.groovy | 5 +----
5 files changed, 16 insertions(+), 29 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index a72c2fe50..2763bc0c6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -28,17 +28,8 @@ RUN apt update -y
# Install general purpose tools
RUN apt install -y make libpcap-dev libc-dev git
-# Required for "with-boost" profile
-#RUN apt install -y bison flex gcc g++
-
-# Required for "with-cpp" profile
-#RUN apt install -y gcc g++
-
-# Required for "with-proxies" and "with-cpp"
-#RUN apt install -y clang
-
-# Required for "with-proxies" and "with-cpp"
-#RUN apt install -y cmake
+# Required for "with-c" profile
+RUN apt install -y build-essential
# Required for "with-dotnet" profile
RUN apt install -y wget
@@ -50,11 +41,9 @@ RUN apt install -y apt-transport-https
RUN apt update -y
RUN apt install -y dotnet-sdk-6.0
-# Required for "with-go" profile
-RUN apt install -y golang
-
# Required for "with-python" profile
-RUN apt install -y python-setuptools python3 python-is-python3
+RUN apt install -y python3 python3-venv python3-pip
+RUN pip3 install wheel
# Required for running on Windows systems
RUN apt install -y dos2unix
@@ -74,12 +63,10 @@ RUN dos2unix .mvn/wrapper/maven-wrapper.properties
# Tell Maven to fetch all needed dependencies first, so they can get cached
# (Tried a patched version of the plugin to allow exclusion of inner artifacts.
# See https://issues.apache.org/jira/browse/MDEP-568 for details)
-#RUN ./mvnw -P with-boost,with-c,with-cpp,with-dotnet,with-go,with-logstash,with-python,with-sandbox com.offbytwo.maven.plugins:maven-dependency-plugin:3.1.1.MDEP568:go-offline -DexcludeGroupIds=org.apache.plc4x,org.apache.plc4x.examples,org.apache.plc4x.sandbox
-RUN ./mvnw -P with-c,with-dotnet,with-go,with-python,with-sandbox com.offbytwo.maven.plugins:maven-dependency-plugin:3.1.1.MDEP568:go-offline -DexcludeGroupIds=org.apache.plc4x,org.apache.plc4x.examples,org.apache.plc4x.sandbox
+RUN ./mvnw -Dpython.venv.dir=./docker-venv -Dpython.venv.bin=docker-venv/bin/ -P with-c,with-dotnet,with-go,with-python,with-sandbox com.offbytwo.maven.plugins:maven-dependency-plugin:3.1.1.MDEP568:go-offline -DexcludeGroupIds=org.apache.plc4x,org.apache.plc4x.examples,org.apache.plc4x.sandbox
# Build everything with all tests
-#RUN ./mvnw -P skip-prerequisite-check,with-boost,with-c,with-cpp,with-dotnet,with-go,with-logstash,with-python,with-sandbox install
-RUN ./mvnw -P with-c,with-dotnet,with-go,with-python,with-sandbox install
+RUN ./mvnw -Dpython.venv.dir=./docker-venv -Dpython.venv.bin=docker-venv/bin/ -P with-c,with-dotnet,with-go,with-python,with-sandbox install
# Get the version of the project and save it in a local file on the container
RUN ./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -DforceStdout -q -pl . > project_version
diff --git a/pom.xml b/pom.xml
index ac410c0b6..13ed4064d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -729,14 +729,11 @@
<!-- License Files for other licenses -->
<exclude>**/UNLICENSE</exclude>
<exclude>**/EPL-2.0</exclude>
+
<!--
- Explicitly exclude thfese files as I was unable
- to add a new licenses to the configuration.
+ Files licensed under other compatible licenses.
-->
<exclude>**/Expression.g4</exclude>
- <exclude>**/KeyStoreLoader.java</exclude>
- <exclude>**/OPCUAServer.java</exclude>
- <exclude>**/Plc4xNamespace.java</exclude>
<!-- Maven related files -->
<exclude>**/target/**</exclude>
@@ -1577,6 +1574,7 @@
<cmake.root>${project.build.directory}/cmake-${cmake-version}-linux-${os.arch}/bin/</cmake.root>
<cmake.generator>Unix Makefiles</cmake.generator>
<python.venv.bin>venv/bin/</python.venv.bin>
+ <python.venv.dir>./venv</python.venv.dir>
</properties>
</profile>
<!-- Profile for mac (Self-Enabling) -->
@@ -1594,6 +1592,7 @@
<cmake.root>${project.build.directory}/cmake-${cmake-version}-macos-universal/CMake.app/Contents/bin</cmake.root>
<cmake.generator>Unix Makefiles</cmake.generator>
<python.venv.bin>venv/bin/</python.venv.bin>
+ <python.venv.dir>./venv</python.venv.dir>
</properties>
</profile>
<!-- profile for windows (Self-Enabling) -->
@@ -1611,6 +1610,7 @@
<cmake.root>${project.build.directory}/cmake-${cmake-version}-windows-x86_64/bin</cmake.root>
<cmake.generator>MinGW Makefiles</cmake.generator>
<python.venv.bin>venv/Scripts/</python.venv.bin>
+ <python.venv.dir>./venv</python.venv.dir>
</properties>
</profile>
diff --git a/sandbox/plc4py/pom.xml b/sandbox/plc4py/pom.xml
index 1833db24c..796fb2b49 100644
--- a/sandbox/plc4py/pom.xml
+++ b/sandbox/plc4py/pom.xml
@@ -88,7 +88,7 @@
<arguments>
<argument>-m</argument>
<argument>venv</argument>
- <argument> ./venv</argument>
+ <argument>${python.venv.dir}</argument>
</arguments>
</configuration>
</execution>
diff --git a/sandbox/plc4py/setup.py b/sandbox/plc4py/setup.py
index 0ee991aec..192aeae0e 100644
--- a/sandbox/plc4py/setup.py
+++ b/sandbox/plc4py/setup.py
@@ -35,6 +35,9 @@ setup(
author_email="dev@plc4x.apache.org",
license="Apache 2.0",
packages=find_packages(include=["plc4py", "plc4py.*"]),
+ setup_requires=[
+ "wheel",
+ ],
install_requires=[
"pytest-asyncio>=0.18.3",
"pip-tools",
diff --git a/src/main/script/prerequisiteCheck.groovy b/src/main/script/prerequisiteCheck.groovy
index 63e728e74..1666c5c7d 100644
--- a/src/main/script/prerequisiteCheck.groovy
+++ b/src/main/script/prerequisiteCheck.groovy
@@ -359,8 +359,7 @@ if (os == "windows") {
// profiles.
/////////////////////////////////////////////////////
-// Codegen requires at least java 9
-checkJavaVersion("9", null)
+checkJavaVersion("11", null)
if (dotnetEnabled) {
checkDotnet()
@@ -371,8 +370,6 @@ if (javaEnabled) {
}
if (cEnabled) {
- // The cmake-maven-plugin requires at least java 11
- checkJavaVersion("11", null)
checkGcc()
}