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

--new-pr problem on Fedora 23? #2670

Closed
verdurin opened this issue Mar 8, 2016 · 7 comments
Closed

--new-pr problem on Fedora 23? #2670

verdurin opened this issue Mar 8, 2016 · 7 comments
Milestone

Comments

@verdurin
Copy link
Member

verdurin commented Mar 8, 2016

Just trying --new-pr on my Fedora 23 test build machine, and there seems to be a problem...:

[adam@marcel Xerces-C++]$ eb --new-pr
== temporary log file in case of crash /tmp/eb-3ioxWD/easybuild-oeMsuZ.log
Traceback (most recent call last):
  File "/home/adam/.local/easybuild/software/Python/2.7.10-foss-2015b/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/adam/.local/easybuild/software/Python/2.7.10-foss-2015b/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/adam/.local/easybuild/software/EasyBuild/2.6.0/lib/python2.7/site-packages/easybuild_framework-2.6.0-py2.7.egg/easybuild/main.py", line 381, in <module>
    main()
  File "/home/adam/.local/easybuild/software/EasyBuild/2.6.0/lib/python2.7/site-packages/easybuild_framework-2.6.0-py2.7.egg/easybuild/main.py", line 248, in main
    new_pr(orig_paths, title=options.pr_title, descr=options.pr_descr, commit_msg=options.pr_commit_msg)
  File "/home/adam/.local/easybuild/software/EasyBuild/2.6.0/lib/python2.7/site-packages/easybuild_framework-2.6.0-py2.7.egg/easybuild/tools/utilities.py", line 145, in error
    raise ImportError(msg)
ImportError: 'gitdb' could not be found in your PYTHONPATH; required module 'git' is not available (provided by Python package GitPython, available from https://pypi.python.org/pypi/GitPython)

GitPython is installed:

 rpm -qi GitPython
Name        : GitPython
Version     : 1.0.1
Release     : 4.fc23
Architecture: noarch
Install Date: Thu 07 Jan 2016 23:16:00 GMT
Group       : Development/Languages
Size        : 2151788
License     : BSD
Signature   : RSA/SHA256, Sun 27 Dec 2015 17:20:09 GMT, Key ID 32474cf834ec9cba
Source RPM  : GitPython-1.0.1-4.fc23.src.rpm
Build Date  : Sun 27 Dec 2015 09:10:42 GMT
Build Host  : buildvm-26.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://pypi.python.org/pypi/GitPython/
Summary     : Python Git Library
Description :
GitPython is a python library used to interact with Git repositories.

GitPython provides object model access to your git repository. Once you have
created a repository object, you can traverse it to find parent commit(s),
trees, blobs, etc.

GitPython is a port of the grit library in Ruby created by Tom Preston-Werner
and Chris Wanstrath.
@boegel
Copy link
Member

boegel commented Mar 8, 2016

@verdurin: do you get the same ImportError when running python -c "import git"?

@verdurin
Copy link
Member Author

verdurin commented Mar 8, 2016

No, it's fine:

[adam@marcel ~]$ python -c "import git"
[adam@marcel ~]$

@boegel
Copy link
Member

boegel commented Mar 8, 2016

That's... weird.

Are you running that when you have eb available?

Can you try this?

python -c "print __import__('git')"

and also this:


@boegel boegel added this to the v2.7.0 milestone Mar 8, 2016
@verdurin
Copy link
Member Author

verdurin commented Mar 8, 2016

@boegel - I think you forgot to paste the second thing to try...

@verdurin
Copy link
Member Author

verdurin commented Mar 8, 2016

Actually, this looks like a false alarm. I had a Python module loaded.

With that removed, eb --new-pr works as expected.

Might be nice for it to cope better with this situation, but am happy to close if you agree.

@boegel
Copy link
Member

boegel commented Mar 8, 2016

@verdurin: I meant to scratch the 2nd thing to try... ;-)

Well, it kind of works as expected, since git is not available for the Python that was active.

I do get that the traceback you were getting was scary.

Rather than raising an ImportError, we could raise an EasyBuildError, which would have resulted in an error like:

$ eb --new-pr ...
== temporary log file in case of crash /tmp/eb-uts8ZU/easybuild-nm6hF1.log
ERROR: No module named git; required module 'git' is not available (provided by Python package GitPython, available from https://pypi.python.org/pypi/GitPython)

@boegel
Copy link
Member

boegel commented Mar 9, 2016

suggested change is made in easybuilders/easybuild-framework#1662

@boegel boegel closed this as completed Mar 9, 2016
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

No branches or pull requests

2 participants