[python] Separate py from main dist and auto add gpg sign (#8999)
* Add new profile `python` to separate build python package from `release`. Now someone who does not interested in python api could build package without python environment * Add auto gpg asc sign when run `mvn instal -Ppython` * Add property to skip gpg sign `python.sign.skip` * Set `python.sign.skip=false` sign python dist by default Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
This commit is contained in:
parent
48dc0a059c
commit
fd5e79bd80
|
|
@ -70,6 +70,9 @@
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>release</id>
|
<id>release</id>
|
||||||
|
<properties>
|
||||||
|
<python.sign.skip>false</python.sign.skip>
|
||||||
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
@ -104,6 +107,20 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>python</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
|
||||||
<execution>
|
<execution>
|
||||||
<id>python</id>
|
<id>python</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>release</id>
|
<id>python</id>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
<goal>exec</goal>
|
<goal>exec</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<executable>python3</executable>
|
<executable>python</executable>
|
||||||
<workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
|
<workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
|
||||||
<arguments>
|
<arguments>
|
||||||
<argument>-m</argument>
|
<argument>-m</argument>
|
||||||
|
|
@ -138,7 +138,7 @@
|
||||||
<goal>exec</goal>
|
<goal>exec</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<executable>python3</executable>
|
<executable>python</executable>
|
||||||
<workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
|
<workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
|
||||||
<arguments>
|
<arguments>
|
||||||
<argument>setup.py</argument>
|
<argument>setup.py</argument>
|
||||||
|
|
@ -153,7 +153,7 @@
|
||||||
<goal>exec</goal>
|
<goal>exec</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<executable>python3</executable>
|
<executable>python</executable>
|
||||||
<workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
|
<workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
|
||||||
<arguments>
|
<arguments>
|
||||||
<argument>-m</argument>
|
<argument>-m</argument>
|
||||||
|
|
@ -161,6 +161,40 @@
|
||||||
</arguments>
|
</arguments>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>sign-source</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<skip>${python.sign.skip}</skip>
|
||||||
|
<executable>bash</executable>
|
||||||
|
<workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>-c</argument>
|
||||||
|
<!-- We use `bash -c` here cause plugin exec-maven-plugin do not support wildcard-->
|
||||||
|
<argument>gpg --armor --sign dist/*.tar.gz</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>sign-wheel</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<skip>${python.sign.skip}</skip>
|
||||||
|
<executable>bash</executable>
|
||||||
|
<workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
|
||||||
|
<arguments>
|
||||||
|
<argument>-c</argument>
|
||||||
|
<!-- We use `bash -c` here cause plugin exec-maven-plugin do not support wildcard-->
|
||||||
|
<argument>gpg --armor --sign dist/*.whl</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
|
||||||
2
pom.xml
2
pom.xml
|
|
@ -138,6 +138,8 @@
|
||||||
<docker.tag>${project.version}</docker.tag>
|
<docker.tag>${project.version}</docker.tag>
|
||||||
<docker.build.skip>true</docker.build.skip>
|
<docker.build.skip>true</docker.build.skip>
|
||||||
<docker.push.skip>true</docker.push.skip>
|
<docker.push.skip>true</docker.push.skip>
|
||||||
|
|
||||||
|
<python.sign.skip>true</python.sign.skip>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue