Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
controlhost
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
km3py
controlhost
Commits
12f4d5b0
Commit
12f4d5b0
authored
9 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Changes version
parent
307f72a3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
controlhost/__version__.py
+7
-12
7 additions, 12 deletions
controlhost/__version__.py
setup.py
+2
-2
2 additions, 2 deletions
setup.py
with
9 additions
and
14 deletions
controlhost/__version__.py
+
7
−
12
View file @
12f4d5b0
#!/usr/bin/env python
# coding=utf-8
# Filename: __version__.py
# pylint: disable=C0103
"""
Pep 386 compliant version info.
(major, minor, micro, alpha/beta/rc/final, #)
Example:
>>>
get_version
((
1
,
1
,
2
,
'
alpha
'
,
0
))
'
1.1.2.dev
'
>>>
get_version
((
1
,
2
,
0
,
'
beta
'
,
2
))
'
1.2b2
'
(1, 1, 2,
'
alpha
'
, 0) =>
"
1.1.2.dev
"
(1, 2, 0,
'
beta
'
, 2) =>
"
1.2b2
"
"""
VERSION
=
(
0
,
1
,
0
,
'
final
'
,
0
)
version_info
=
(
0
,
2
,
0
,
'
final
'
,
0
)
def
get_version
(
version_info
):
def
_
get_version
(
version_info
):
"""
Return a PEP 386-compliant version number.
"""
assert
len
(
version_info
)
==
5
assert
version_info
[
3
]
in
(
'
alpha
'
,
'
beta
'
,
'
rc
'
,
'
final
'
)
parts
=
2
if
version_info
[
2
]
==
0
else
3
main
=
'
.
'
.
join
(
[
str
(
part
)
for
part
in
version_info
[:
parts
]
]
)
main
=
'
.
'
.
join
(
map
(
str
,
version_info
[:
parts
]
)
)
sub
=
''
if
version_info
[
3
]
==
'
alpha
'
and
version_info
[
4
]
==
0
:
...
...
@@ -33,5 +29,4 @@ def get_version(version_info):
return
str
(
main
+
sub
)
version
=
get_version
((
0
,
1
,
0
,
'
final
'
,
0
))
version
=
_get_version
(
version_info
)
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
2
View file @
12f4d5b0
from
setuptools
import
setup
import
controlhost
from
controlhost
import
version
setup
(
name
=
'
controlhost
'
,
version
=
controlhost
.
__
version
__
,
version
=
version
,
url
=
'
https://github.com/tamasgal/controlhost/
'
,
description
=
'
A set of classes and tools wich uses the ControlHost protocol.
'
,
author
=
'
Tamas Gal
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment