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

allows nesting in the package name and print output from execute command #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions buildconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def checkBaseName(package, info):
if "$" in info["gitPackage"] and "*" not in package:
info["basename"] = info["gitPackage"]
info["gitPackage"] = info["gitPackage"].replace("$PACKAGE_BASENAME",
package.split("/")[-1])
'-'.join((package.split("/")[1:])))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think there are too many brackets.

Copy link
Author

@annaborn annaborn Mar 8, 2018

Choose a reason for hiding this comment

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

@AlexanderFabisch do you mean readability of the line?

Copy link
Collaborator

Choose a reason for hiding this comment

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

(package.split("/")[1:]) is not necessary.



def clonePackage(cfg, package, server, gitPackage, branch):
clonePath = package
Expand Down Expand Up @@ -117,7 +118,9 @@ def clonePackage(cfg, package, server, gitPackage, branch):
cmd = ["git", "clone", "-o", "autobuild", "-q", server+gitPackage, clonePath]
if branch:
cmd += ["-b", branch]
execute.do(cmd, cfg)
out, err, r = execute.do(cmd, cfg)
print out
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want this?

Copy link
Author

Choose a reason for hiding this comment

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

@AlexanderFabisch it is usefull to have output message for debug purposes. is there any debug mode?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think so. @malter should know this.

Copy link
Author

Choose a reason for hiding this comment

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

@AlexanderFabisch
what is the reason not to have output message for debug purpose?

Copy link
Collaborator

Choose a reason for hiding this comment

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

At the moment, this would be the only command that actually prints output to stdout. If we added a debug mode, that would be OK but that should be done in another pull request.

print err
Copy link
Collaborator

Choose a reason for hiding this comment

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

As @malter suggested:

if err:
    print(err)

# apply patch if we have one
patch = cfg["pyScriptDir"] + "/patches/" + package.split("/")[-1] + ".patch"
print "check for patches",
Expand Down