Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nirbheek Chauhan
cerbero
Commits
c6e7a1af
Commit
c6e7a1af
authored
Mar 07, 2013
by
Andoni Morales Alastruey
Browse files
pep8: fix more errors
parent
97727771
Changes
6
Hide whitespace changes
Inline
Side-by-side
cerbero/bootstrap/bootstraper.py
View file @
c6e7a1af
...
...
@@ -19,8 +19,8 @@
import
logging
from
cerbero.errors
import
FatalError
from
cerbero.utils
import
_
from
cerbero.utils
import
messages
as
m
from
cerbero.utils
import
_
from
cerbero.utils
import
messages
as
m
from
cerbero.bootstrap.build_tools
import
BuildTools
...
...
@@ -58,8 +58,7 @@ class Bootstraper (object):
raise
FatalError
(
_
(
"No bootstrapper for the distro %s"
%
d
))
if
v
not
in
bootstrapers
[
d
]:
# Be tolerant with the distro version
m
.
warning
(
_
(
"No bootstrapper for the distro version %s"
%
v
))
m
.
warning
(
_
(
"No bootstrapper for the distro version %s"
%
v
))
v
=
None
bs
.
append
(
bootstrapers
[
d
][
v
](
config
))
...
...
cerbero/bootstrap/build_tools.py
View file @
c6e7a1af
...
...
@@ -29,9 +29,9 @@ class BuildTools (BootstraperBase):
BUILD_TOOLS
=
[
'automake'
,
'autoconf'
,
'm4'
,
'libtool'
,
'pkg-config'
,
'orc-tool'
,
'gettext-m4'
,
'gettext-tools'
]
PLAT_BUILD_TOOLS
=
{
Platform
.
DARWIN
:
[
'intltool'
,
'yasm'
,
'cmake'
],
Platform
.
WINDOWS
:
[
'intltool'
,
'yasm'
,
'cmake'
],
}
Platform
.
DARWIN
:
[
'intltool'
,
'yasm'
,
'cmake'
],
Platform
.
WINDOWS
:
[
'intltool'
,
'yasm'
,
'cmake'
],
}
def
__init__
(
self
,
config
):
BootstraperBase
.
__init__
(
self
,
config
)
...
...
@@ -41,7 +41,9 @@ class BuildTools (BootstraperBase):
if
self
.
config
.
platform
==
Platform
.
DARWIN
:
self
.
BUILD_TOOLS
.
append
(
'gperf'
)
# We need tar with support for .xz in Snow Leopard
if
self
.
config
.
distro_version
in
[
DistroVersion
.
OS_X_LION
,
DistroVersion
.
OS_X_SNOW_LEOPARD
,
DistroVersion
.
OS_X_LEOPARD
]:
if
self
.
config
.
distro_version
in
[
DistroVersion
.
OS_X_LION
,
DistroVersion
.
OS_X_SNOW_LEOPARD
,
DistroVersion
.
OS_X_LEOPARD
]:
self
.
BUILD_TOOLS
.
insert
(
0
,
'tar'
)
if
self
.
config
.
target_platform
==
Platform
.
IOS
:
self
.
BUILD_TOOLS
.
append
(
'gas-preprocessor'
)
...
...
cerbero/bootstrap/ios.py
View file @
c6e7a1af
...
...
@@ -3,7 +3,7 @@
# ios.py
#
# Copyright (C) 2013 Thibault Saunier <thibaul.saunier@collabora.com>
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
...
...
@@ -29,6 +29,7 @@ from cerbero.config import Distro
class
IOSBootstraper
(
BootstraperBase
):
def
start
(
self
):
# FIXME: enable it when buildbots are properly configured
return
...
...
cerbero/bootstrap/linux.py
View file @
c6e7a1af
...
...
@@ -50,14 +50,14 @@ class DebianBootstraper (UnixBootstraper):
'build-essential'
,
'devscripts'
,
'fakeroot'
,
'transfig'
,
'gperf'
,
'libdbus-glib-1-dev'
,
'wget'
,
'glib-networking'
]
distro_packages
=
{
DistroVersion
.
DEBIAN_SQUEEZE
:
[
'libgtk2.0-dev'
],
DistroVersion
.
UBUNTU_MAVERICK
:
[
'libgtk2.0-dev'
],
DistroVersion
.
UBUNTU_LUCID
:
[
'libgtk2.0-dev'
],
DistroVersion
.
UBUNTU_NATTY
:
[
'libgtk2.0-dev'
],
DistroVersion
.
DEBIAN_WHEEZY
:
[
'libgdk-pixbuf2.0-dev'
],
DistroVersion
.
UBUNTU_ONEIRIC
:
[
'libgdk-pixbuf2.0-dev'
],
DistroVersion
.
UBUNTU_PRECISE
:
[
'libgdk-pixbuf2.0-dev'
],
}
DistroVersion
.
DEBIAN_SQUEEZE
:
[
'libgtk2.0-dev'
],
DistroVersion
.
UBUNTU_MAVERICK
:
[
'libgtk2.0-dev'
],
DistroVersion
.
UBUNTU_LUCID
:
[
'libgtk2.0-dev'
],
DistroVersion
.
UBUNTU_NATTY
:
[
'libgtk2.0-dev'
],
DistroVersion
.
DEBIAN_WHEEZY
:
[
'libgdk-pixbuf2.0-dev'
],
DistroVersion
.
UBUNTU_ONEIRIC
:
[
'libgdk-pixbuf2.0-dev'
],
DistroVersion
.
UBUNTU_PRECISE
:
[
'libgdk-pixbuf2.0-dev'
],
}
def
__init__
(
self
,
config
):
UnixBootstraper
.
__init__
(
self
,
config
)
...
...
@@ -70,7 +70,6 @@ class DebianBootstraper (UnixBootstraper):
self
.
packages
.
remove
(
'autopoint'
)
class
RedHatBootstraper
(
UnixBootstraper
):
tool
=
'su -c "yum install %s"'
...
...
cerbero/bootstrap/osx.py
View file @
c6e7a1af
...
...
@@ -28,11 +28,12 @@ from cerbero.utils import shell
class
OSXBootstraper
(
BootstraperBase
):
GCC_BASE_URL
=
'https://github.com/downloads/kennethreitz/osx-gcc-installer/'
GCC_BASE_URL
=
'https://github.com/downloads/kennethreitz/'
\
'osx-gcc-installer/'
GCC_TAR
=
{
DistroVersion
.
OS_X_MOUNTAIN_LION
:
'GCC-10.7-v2.pkg'
,
DistroVersion
.
OS_X_LION
:
'GCC-10.7-v2.pkg'
,
DistroVersion
.
OS_X_SNOW_LEOPARD
:
'GCC-10.6.pkg'
}
DistroVersion
.
OS_X_MOUNTAIN_LION
:
'GCC-10.7-v2.pkg'
,
DistroVersion
.
OS_X_LION
:
'GCC-10.7-v2.pkg'
,
DistroVersion
.
OS_X_SNOW_LEOPARD
:
'GCC-10.6.pkg'
}
def
start
(
self
):
# FIXME: enable it when buildbots are properly configured
...
...
cerbero/bootstrap/windows.py
View file @
c6e7a1af
...
...
@@ -37,8 +37,8 @@ MINGWGET_DEPS = ['msys-wget']
GNOME_FTP
=
'http://ftp.gnome.org/pub/gnome/binaries/win32/'
WINDOWS_BIN_DEPS
=
[
'intltool/0.40/intltool_0.40.4-1_win32.zip'
]
PTHREADS_URL
=
\
'''http://downloads.sourceforge.net/project/mingw-w64/External%20binary%20
\
packages%20%28Win64%20hosted%29/pthreads/pthreads-20100604.zip'''
'''http://downloads.sourceforge.net/project/mingw-w64/External%20binary%20
\
packages%20%28Win64%20hosted%29/pthreads/pthreads-20100604.zip'''
class
WindowsBootstraper
(
BootstraperBase
):
...
...
@@ -50,8 +50,8 @@ class WindowsBootstraper(BootstraperBase):
def
start
(
self
):
if
not
git
.
check_line_endings
(
self
.
config
.
platform
):
raise
ConfigurationError
(
"git is configured to use automatic line
endings
"
" conversion. You can fix it running:
\n
"
raise
ConfigurationError
(
"git is configured to use automatic line "
"
endings
conversion. You can fix it running:
\n
"
"$git config core.autocrlf false"
)
self
.
prefix
=
self
.
config
.
toolchain_prefix
self
.
platform
=
self
.
config
.
target_platform
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment