margru / pybuilder-smart-copy-resources

PyBuilder plugin for copying additional resources
MIT License
0 stars 2 forks source link

Running before filtering #4

Closed AlexeySanko closed 7 years ago

AlexeySanko commented 7 years ago

If we run smart-copy-resources as separated step copied file will not be affected by filtering (filtering call as after-package). But moving all resources is a part of packaging. So we can call smart-copy-resources as original copying resources (which is part of packaging). The same behaviour for basic and additional copying looks like more expected.

AlexeySanko commented 7 years ago

See #3

margru commented 7 years ago

I probably don't understand what you mean. Is the suggested change just renaming the task from smart_copy_resources to package? What's the sense in that?

AlexeySanko commented 7 years ago

Hi, @margru. No, I suggest to make smart-copy part of original basic task "package". Because basic resource_copy does the same. In this case at the end of task "package" we will have all collected and copied resources.

AlexeySanko commented 7 years ago

I just copied task definition from basic copy_resource: https://github.com/pybuilder/pybuilder/blob/master/src/main/python/pybuilder/plugins/copy_resources_plugin.py#L34 And of course checked it - everything works.

margru commented 7 years ago

Ah, OK, I get it now. I was not aware of the original package task - it's quite a long time I implemented this. However, what else is a part of the package task? As for example me, I am not using it at all.

AlexeySanko commented 7 years ago

In common - package task collects all resouces, scripts and additional files to dist directory for subsequent integration test running and collecting Python distributives. And for other additional tasks or plugin: for example, filter_resources_plugin runs as @after("package", only_once=True).

Package is required by publish task. In this case everybody always use it. Just do not call directly.

AlexeySanko commented 7 years ago

You can see that publish depends on package task: https://github.com/pybuilder/pybuilder/blob/master/src/main/python/pybuilder/plugins/core_plugin.py#L118

AlexeySanko commented 7 years ago

Hi, @margru Do You have any objections? If no could You please do merge, increase version and release to pypi new version? Thanks!

AlexeySanko commented 7 years ago

Any news? If You don't have time do You have possibility to share permissions for repo and pypi module? Thanks.

margru commented 7 years ago

Hi @AlexeySanko , I was away, thus coming back to this now...

margru commented 7 years ago

@AlexeySanko Just released on PyPi.

AlexeySanko commented 7 years ago

@margru, thanks a lot!