| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.apache.beam</groupId> |
| <artifactId>beam-sdks-parent</artifactId> |
| <version>2.3.0</version> |
| <relativePath>../pom.xml</relativePath> |
| </parent> |
| |
| <artifactId>beam-sdks-python</artifactId> |
| |
| <packaging>pom</packaging> |
| |
| <name>Apache Beam :: SDKs :: Python</name> |
| |
| <modules> |
| <module>container</module> |
| </modules> |
| |
| <properties> |
| <!-- python.interpreter.bin & python.pip.bin |
| is set dynamically by findSupportedPython.groovy --> |
| <python.build.base>${project.build.directory}/build</python.build.base> |
| <python.user.base>${project.build.directory}/python</python.user.base> |
| </properties> |
| |
| <build> |
| <pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <!-- trick to skip inheritance --> |
| <phase>none</phase> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.gmaven</groupId> |
| <artifactId>groovy-maven-plugin</artifactId> |
| <version>${groovy-maven-plugin.version}</version> |
| <inherited>false</inherited> |
| <executions> |
| <execution> |
| <id>find-supported-python-for-clean</id> |
| <phase>pre-clean</phase> |
| <goals> |
| <goal>execute</goal> |
| </goals> |
| <configuration> |
| <source>${project.basedir}/findSupportedPython.groovy</source> |
| </configuration> |
| </execution> |
| <execution> |
| <id>find-supported-python-for-compile</id> |
| <phase>initialize</phase> |
| <goals> |
| <goal>execute</goal> |
| </goals> |
| <configuration> |
| <source>${project.basedir}/findSupportedPython.groovy</source> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <inherited>false</inherited> |
| <executions> |
| <execution> |
| <id>setuptools-clean</id> |
| <phase>clean</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>${python.interpreter.bin}</executable> |
| <arguments> |
| <argument>setup.py</argument> |
| <argument>clean</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>setup-compile-grpcio</id> |
| <phase>compile</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>${python.pip.bin}</executable> |
| <arguments> |
| <argument>install</argument> |
| <argument>--user</argument> |
| <argument>--upgrade</argument> |
| <argument>--ignore-installed</argument> |
| <argument>grpcio-tools</argument> |
| </arguments> |
| <environmentVariables> |
| <PYTHONUSERBASE>${python.user.base}</PYTHONUSERBASE> |
| </environmentVariables> |
| </configuration> |
| </execution> |
| <execution> |
| <id>setuptools-build</id> |
| <phase>compile</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>${python.interpreter.bin}</executable> |
| <arguments> |
| <argument>setup.py</argument> |
| <argument>build</argument> |
| <argument>--build-base</argument> |
| <argument>${python.build.base}</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>setup-test-create-python-base</id> |
| <phase>process-test-resources</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>mkdir</executable> |
| <arguments> |
| <argument>-p</argument> |
| <argument>${python.user.base}</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| <execution> |
| <id>setup-test-tox</id> |
| <phase>process-test-resources</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>${python.pip.bin}</executable> |
| <arguments> |
| <argument>install</argument> |
| <argument>--user</argument> |
| <argument>--upgrade</argument> |
| <argument>--ignore-installed</argument> |
| <argument>tox</argument> |
| </arguments> |
| <environmentVariables> |
| <PYTHONUSERBASE>${python.user.base}</PYTHONUSERBASE> |
| </environmentVariables> |
| </configuration> |
| </execution> |
| <execution> |
| <id>setuptools-sdist</id> |
| <phase>package</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>${python.interpreter.bin}</executable> |
| <arguments> |
| <argument>setup.py</argument> |
| <argument>sdist</argument> |
| <argument>--dist-dir</argument> |
| <argument>${project.build.directory}</argument> |
| <argument>--formats</argument> |
| <argument>zip,gztar</argument> |
| </arguments> |
| <environmentVariables> |
| <PYTHONUSERBASE>${python.user.base}</PYTHONUSERBASE> |
| </environmentVariables> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| |
| <profiles> |
| <profile> |
| <id>test-python-sdk</id> |
| <activation> |
| <property> |
| <name>!skipTests</name> |
| </property> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <inherited>false</inherited> |
| <executions> |
| <execution> |
| <id>setuptools-test</id> |
| <phase>test</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>${python.user.base}/bin/tox</executable> |
| <arguments> |
| <!-- Environments that are only defined in envlist will be triggered. New |
| environments will be excluded by default unless explicitly added to |
| envlist.--> |
| <argument>envlist</argument> |
| <argument>-c</argument> |
| <argument>tox.ini</argument> |
| </arguments> |
| <environmentVariables> |
| <PYTHONUSERBASE>${python.user.base}</PYTHONUSERBASE> |
| </environmentVariables> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |