Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
6
Merge Requests
6
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
6176fc44
Commit
6176fc44
authored
Feb 18, 2013
by
pombredanne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use more explicit variable names
parent
c6772294
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+21
-18
No files found.
src/zc/buildout/buildout.py
View file @
6176fc44
...
...
@@ -1437,35 +1437,38 @@ def _default_globals():
globals_defs
=
{
'sys'
:
sys
,
'os'
:
os
,
'platform'
:
platform
,
're'
:
re
,}
# major python versions as python2 and python3
vertu
=
platform
.
python_version_tuple
()
globals_defs
.
update
({
'python2'
:
vertu
[
0
]
==
'2'
,
'python3'
:
vertu
[
0
]
==
'3'
})
# major python major_python_versions as python2 and python3
major_python_versions
=
platform
.
python_version_tuple
()
globals_defs
.
update
({
'python2'
:
major_python_versions
[
0
]
==
'2'
,
'python3'
:
major_python_versions
[
0
]
==
'3'
})
# minor python versions as python24, python25 ... python36
pyver
=
(
'24'
,
'25'
,
'26'
,
'27'
,
'30'
,
'31'
,
'32'
,
'33'
,
'34'
,
'35'
,
'36'
)
for
v
in
pyver
:
globals_defs
[
'python'
+
v
]
=
''
.
join
(
vertu
[:
2
])
==
v
# minor python major_python_versions as python24, python25 ... python36
minor_python_versions
=
(
'24'
,
'25'
,
'26'
,
'27'
,
'30'
,
'31'
,
'32'
,
'33'
,
'34'
,
'35'
,
'36'
)
for
v
in
minor_python_versions
:
globals_defs
[
'python'
+
v
]
=
''
.
join
(
major_python_versions
[:
2
])
==
v
# interpreter type
sys
ver
=
sys
.
version
.
lower
()
pypy
=
'pypy'
in
sys
ver
jython
=
'java'
in
sys
ver
ironpython
=
'iron'
in
sys
ver
sys
_version
=
sys
.
version
.
lower
()
pypy
=
'pypy'
in
sys
_version
jython
=
'java'
in
sys
_version
ironpython
=
'iron'
in
sys
_version
# assume CPython, if nothing else.
cpython
=
not
any
((
pypy
,
jython
,
ironpython
,))
globals_defs
.
update
({
'cpython'
:
cpython
,
'pypy'
:
pypy
,
'jython'
:
jython
,
'ironpython'
:
ironpython
})
# operating system
sys
plat
=
str
(
sys
.
platform
).
lower
()
globals_defs
.
update
({
'linux'
:
'linux'
in
sys
plat
,
'windows'
:
'win32'
in
sys
plat
,
'cygwin'
:
'cygwin'
in
sys
plat
,
'solaris'
:
'sunos'
in
sys
plat
,
'macosx'
:
'darwin'
in
sys
plat
,
sys
_platform
=
str
(
sys
.
platform
).
lower
()
globals_defs
.
update
({
'linux'
:
'linux'
in
sys
_platform
,
'windows'
:
'win32'
in
sys
_platform
,
'cygwin'
:
'cygwin'
in
sys
_platform
,
'solaris'
:
'sunos'
in
sys
_platform
,
'macosx'
:
'darwin'
in
sys
_platform
,
'posix'
:
'posix'
in
os
.
name
.
lower
()})
#bits and endianness
import
struct
void_ptr_size
=
struct
.
calcsize
(
'P'
)
*
8
...
...
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