Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 416760 Details for
Bug 565280
dev-vcs/git-cola-2.3 - ImportError: cannot import name main
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test script
test.py (text/x-python), 1.86 KB, created by
Justin Lecher (RETIRED)
on 2015-11-12 07:38:35 UTC
(
hide
)
Description:
test script
Filename:
MIME Type:
Creator:
Justin Lecher (RETIRED)
Created:
2015-11-12 07:38:35 UTC
Size:
1.86 KB
patch
obsolete
>#!/usr/bin/python2.7 ># -*- python-mode -*- >"""git-cola: The highly caffeinated Git GUI >""" > >from __future__ import division, absolute_import, unicode_literals, print_function > >__copyright__ = """ >Copyright (C) 2007-2015 >David Aguilar <davvid@gmail.com> and contributors > >This program is free software; you can redistribute it and/or modify >it under the terms of the GNU General Public License version 2 as >published by the Free Software Foundation. > >This program is distributed in the hope that it will be useful, >but WITHOUT ANY WARRANTY; without even the implied warranty of >MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >GNU General Public License for more details. > >""" > >import os >import sys >from os.path import abspath >from os.path import dirname >from os.path import join >from os.path import realpath > > >def setup_environment(): > """Provides access to the cola modules""" > # Try to detect where it is run from and set prefix and the search path. > # It is assumed that the user installed Cola using the --prefix= option > python2 = sys.version_info[0] == 2 > prefix = dirname(dirname(realpath(abspath(__file__)))) > if python2: > cola_mod = join(prefix, str('cola'), str('__init__.py')) > install_lib = join(prefix, str('share'), str('git-cola'), str('lib')) > else: > # Look for modules in the source or install trees > cola_mod = os.path.join(prefix, 'cola', '__init__.py') > install_lib = os.path.join(prefix, 'share', 'git-cola', 'lib') > > if os.path.exists(cola_mod): > # Source tree > sys.path.insert(1, prefix) > else: > # Install tree > sys.path.insert(1, install_lib) > print("cola mod: " + cola_mod) > print("install lib: " + install_lib) > > > >if __name__ == '__main__': > print("syspath before: " + " ".join(sys.path)) > setup_environment() > print("syspath after:" + " ".join(sys.path))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 565280
: 416760