Skip to content

Packaging python scripts #2389

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

Merged
merged 10 commits into from
Oct 9, 2018
Merged

Packaging python scripts #2389

merged 10 commits into from
Oct 9, 2018

Conversation

tulinkry
Copy link
Contributor

@tulinkry tulinkry commented Oct 7, 2018

fixes #2251

This includes:

  • renaming tools to opengrok-tools
  • packaging the python scripts as opengrok-tools python package
  • running tests in maven for the package
  • using virtual env
  • including the python package in final distribution in tools/opengrok-tools.tar.gz

@tulinkry
Copy link
Contributor Author

tulinkry commented Oct 7, 2018

There's more to go as I'm not really skilled with maven.

  • the python package should be generated to target directory (now is generated to dist and build directories)
  • maven clean should clean the generated python files
  • think about something what to do with the python package version (replace with the current opengrok version?)

@tulinkry tulinkry force-pushed the package branch 6 times, most recently from 5c15cd3 to 9ce60f9 Compare October 7, 2018 14:28
@tulinkry
Copy link
Contributor Author

tulinkry commented Oct 7, 2018

If anyone can examined these it'd be nice. I didn't write the original scripts so I'm not sure if that was just a copy paste mistake.

opengrok_tools/sync.py:61:5: F821 undefined name 'logger'
opengrok_tools/sync.py:69:5: F841 local variable 'output' is assigned to but never used
opengrok_tools/mirror.py:57:5: F841 local variable 'output' is assigned to but never used
opengrok_tools/mirror.py:58:5: F841 local variable 'dirs_to_process' is assigned to but never used

@coveralls
Copy link

coveralls commented Oct 7, 2018

@vladak
Copy link
Member

vladak commented Oct 7, 2018

think about something what to do with the python package version (replace with the current opengrok version?)

yes please. That said, each major script has its own version.

@vladak
Copy link
Member

vladak commented Oct 7, 2018

The fixes to the lint errors look okay.

@vladak vladak added this to the 1.1 milestone Oct 7, 2018
@tulinkry
Copy link
Contributor Author

tulinkry commented Oct 8, 2018

Name: opengrok-tools
Version: 1.1rc48
Summary: Tools for managing OpenGrok instance
Home-page: https://github.com/OpenGrok/OpenGrok
Author: Oracle
Author-email: [email protected]
License: CDDL
Location: /Users/ktulinger/OpenGrok/opengrok-tools/env/lib/python3.6/site-packages/opengrok_tools-1.1rc48-py3.6.egg
Requires: jsonschema, pyyaml, requests, resource
Y

@tulinkry tulinkry force-pushed the package branch 5 times, most recently from 149e6d3 to dfe69d2 Compare October 9, 2018 07:34

setup(
name='opengrok-tools',
version='1.1rc57',
Copy link
Member

Choose a reason for hiding this comment

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

is there a way how to avoid hardcoding the version ? Should we be using OpenGrok version at all here actually ?

Copy link
Contributor Author

@tulinkry tulinkry Oct 9, 2018

Choose a reason for hiding this comment

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

I think maven can do it, I hope someone how is with better experience with maven can handle this

Copy link
Contributor Author

@tulinkry tulinkry Oct 9, 2018

Choose a reason for hiding this comment

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

think about something what to do with the python package version (replace with the current opengrok version?)

yes please. That said, each major script has its own version.

You've already said that we should use the opengrok version, that's why I changed it.

@vladak vladak merged commit 7ac1f5d into oracle:master Oct 9, 2018
@vladak
Copy link
Member

vladak commented Oct 9, 2018

Pls file a new issue to get the version number resolved.

@tulinkry tulinkry deleted the package branch October 9, 2018 09:17
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.

consider shipping tools Python scripts as python package
3 participants