Skip to content
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

[BEAM-1746] Include LICENSE and NOTICE in python dist files #2245

Closed
wants to merge 2 commits into from

Conversation

aaltay
Copy link
Member

@aaltay aaltay commented Mar 14, 2017

R: @davorbonaci

Davor, is this the right way to approach the problem? (I would like to copy files before packaging and delete copied files post packaging.)

Copy link
Member

@davorbonaci davorbonaci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd try to avoid this approach.

I'd attempt to do this with an assembly plugin at the top-level, just like the project-wide source release is built. We just specify there to take LICENSE & NOTICE + all stuff in the Python directory.

<executions>
<execution>
<id>copy-project-files-clean</id>
<phase>clean</phase>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much better served by configuring the maven-clean-plugin directly, as opposed to creating a new execution to delete a file.

</goals>
<configuration>
<tasks>
<copy file="../../LICENSE" tofile="${basedir}/LICENSE"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't do this -- reaching outside the current context generally breaks things.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.003%) to 70.177% when pulling 8ecaa46 on aaltay:licnot into cc12fd3 on apache:master.

@asfbot
Copy link

asfbot commented Mar 14, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/8402/
--none--

@aaltay aaltay changed the title Include LICENSE and NOTICE in python dist files [BEAM-1746] Include LICENSE and NOTICE in python dist files Mar 17, 2017
file.

Add copied files to clean-up list and gitignore; as these are just
copies of the originals in the root.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 70.283% when pulling 0b16ceb on aaltay:licnot into b47fd52 on apache:master.

@aaltay
Copy link
Member Author

aaltay commented Apr 21, 2017

@davor updated the PR, PTAL.

This changes moves the copying piece to the root pom.xml. At root level these two files needed for Python packaging (LICENSE and NOTICE) pushed down to the right folder.

One may ask, why are we not packaging python at root instead of pushing down these files. The reason is we need to execute setup.py for packaging. The resulting package could only contain files that exist in the same sub-directory tree as the location of setup.py. And building the python package at root would require copying the whole sdks/python path to root.

Another question would be, what happens if mvn is invoked directly as sdks/python directory. In this case, packaging will succeed however resulting artifacts would not have the necessary files. This should not be a problem since our release procedure requires running mvn at root for packaging all needed artifacts.

@asfgit asfgit closed this in 3bb0f8e May 2, 2017
@davorbonaci
Copy link
Member

LGTM

@aaltay aaltay deleted the licnot branch May 12, 2017 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants