Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
devflow
Commits
2ec7054e
Commit
2ec7054e
authored
Jan 22, 2013
by
Christos Stavrakakis
Browse files
Pep8 fixes
parent
37866d7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
devflow/autopkg.py
View file @
2ec7054e
...
...
@@ -151,7 +151,7 @@ def main():
config_file
=
options
.
config_file
or
os
.
path
.
join
(
toplevel
,
"autopkg.conf"
)
packages
=
get_packages_to_build
(
config_file
)
if
packages
:
print_green
(
"Will build the following packages:
\n
"
+
\
print_green
(
"Will build the following packages:
\n
"
"
\n
"
.
join
(
packages
))
else
:
raise
RuntimeError
(
"Configuration file is empty."
...
...
@@ -208,16 +208,16 @@ def main():
cd
(
repo_dir
)
python_version
=
versioning
.
get_python_version
()
debian_version
=
versioning
.
\
debian_version_from_python_version
(
python_version
)
debian_version_from_python_version
(
python_version
)
print_green
(
"The new debian version will be: '%s'"
%
debian_version
)
# Update changelog
dch
=
git_dch
(
"--debian-branch=%s"
%
debian_branch
,
"--git-author"
,
"--ignore-regex=
\"
.*
\"
"
,
"--multimaint-merge"
,
"--since=HEAD"
,
"--new-version=%s"
%
debian_version
)
"--git-author"
,
"--ignore-regex=
\"
.*
\"
"
,
"--multimaint-merge"
,
"--since=HEAD"
,
"--new-version=%s"
%
debian_version
)
print_green
(
"Successfully ran '%s'"
%
" "
.
join
(
dch
.
cmd
))
if
mode
==
"release"
:
...
...
@@ -258,7 +258,7 @@ def main():
if
not
options
.
build_dir
:
build_dir
=
create_temp_directory
(
"df-build"
)
print_green
(
"Created directory '%s' to store the .deb files."
%
build_dir
)
build_dir
)
cd
(
repo_dir
)
os
.
system
(
"git-buildpackage --git-export-dir=%s --git-upstream-branch=%s"
...
...
devflow/versioning.py
View file @
2ec7054e
...
...
@@ -286,7 +286,6 @@ def python_version(base_version, vcs_info, mode):
branch
=
vcs_info
.
branch
brnorm
=
normalize_branch_name
(
branch
)
btypestr
=
get_branch_type
(
brnorm
)
...
...
@@ -321,9 +320,9 @@ def python_version(base_version, vcs_info, mode):
snap
=
(
mode
==
"snapshot"
)
if
((
snap
and
not
btype
.
builds_snapshot
)
or
(
not
snap
and
not
btype
.
builds_release
)):
raise
ValueError
(
"Invalid mode '%s' in branch type '%s'"
%
(
mode
,
btypestr
))
(
not
snap
and
not
btype
.
builds_release
)):
# nopep8
raise
ValueError
(
"Invalid mode '%s' in branch type '%s'"
%
(
mode
,
btypestr
))
if
snap
:
v
=
"%s_%d_%s"
%
(
base_version
,
vcs_info
.
revno
,
vcs_info
.
revid
)
...
...
@@ -450,14 +449,13 @@ def update_version(module, name="version", root="."):
b
=
base_version
(
v
)
mode
=
build_mode
()
version
=
python_version
(
b
,
v
,
mode
)
content
=
"""
__version__ = "%(version)s"
content
=
"""__version__ = "%(version)s"
__version_info__ = %(version_info)s
__version_vcs_info__ = %(vcs_info)s
__version_user_info__ = "%(user_info)s"
"""
%
dict
(
version
=
version
,
version_info
=
version
.
split
(
"."
),
vcs_info
=
pprint
.
PrettyPrinter
().
pformat
(
dict
(
v
.
_asdict
())),
user_info
=
user_info
())
vcs_info
=
pprint
.
PrettyPrinter
().
pformat
(
dict
(
v
.
_asdict
())),
user_info
=
user_info
())
module_file
=
file
(
module_filename
,
"w+"
)
module_file
.
write
(
content
)
...
...
Write
Preview
Markdown
is supported
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