-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-378] integrate setuptools in Maven build #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
427be24
23f42c3
061ef0a
98ca6f8
2acaed2
43bcc7a
231ff54
1d815bb
97b52ad
d7874fe
12fedce
831d4b0
d676108
79b69fd
1895047
dcb5ea3
e424fbf
137c4a0
a0a788e
65fde8d
c952964
c583094
b045a97
27917a0
456501e
08502f7
3da6884
3674690
93c31df
72d128b
f0290bd
ebe4d0e
aa8e9d1
49b1901
0a193fa
d733f86
62646b5
71b59bf
7f3c4cb
36b4d80
2d19489
dc1e983
a38a3a8
684cfb2
db7dd39
f1f354f
c7be1d3
6e616d8
69fe354
ec578d2
6457f55
78779bb
c7093e7
2620bfb
23003ac
a923207
1d9378a
fd7ddf0
e044d8d
cb82ec1
cd9432f
4422207
a0ecce5
d232892
51b13f5
f0d79f7
be837b3
b404a42
32a6348
e9fc5f0
403c425
cf0bb30
4c60253
f7c8a13
909889d
5014ed1
82a8515
35c6e2c
7020e73
86b3419
bbd48b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # | ||
| # 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. | ||
| # | ||
|
|
||
| # This file is used from Python to sync versions | ||
| include pom.xml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,169 @@ | ||
| <?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>0.3.0-incubating-SNAPSHOT</version> | ||
| <relativePath>../pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <artifactId>beam-sdks-python</artifactId> | ||
|
|
||
| <packaging>pom</packaging> | ||
|
|
||
| <name>Apache Beam :: SDKs :: Python</name> | ||
|
|
||
| <properties> | ||
| <python.interpreter.bin>python2</python.interpreter.bin> | ||
| <python.pip.bin>pip2</python.pip.bin> | ||
| <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 by @aaltay to skip inheritance --> | ||
| <phase>none</phase> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </pluginManagement> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>exec-maven-plugin</artifactId> | ||
| <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> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how comprehensive is this clean? e.g., does it delete random files created by tox or lint, etc? I think we want to go as far as we can here. for example, I wonder if we shouldn't be deleting all the files we added to apache rat plugin ignore below -- I don't think they're checked in.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's a good point, @dhalperi for the moment I'm just doing a |
||
| </arguments> | ||
| </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-test</id> | ||
| <phase>test</phase> | ||
| <goals> | ||
| <goal>exec</goal> | ||
| </goals> | ||
| <configuration> | ||
| <executable>${python.user.base}/bin/tox</executable> | ||
| <arguments> | ||
| <argument>-e</argument> | ||
| <argument>py27</argument> | ||
| <argument>-c</argument> | ||
| <argument>tox.ini</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> | ||
| </arguments> | ||
| <environmentVariables> | ||
| <PYTHONUSERBASE>${python.user.base}</PYTHONUSERBASE> | ||
| </environmentVariables> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
|
|
||
| </project> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python distribution will package this file and not any of its parents. Could you add a comment somewhere here that, in Python we use this to read the version string and and it is fine to package as a standalone file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll add a comment in the
MANIFEST.infile.