Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
27310974
Commit
27310974
authored
May 28, 2018
by
Ibrahn Sahir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed building using scons with python3
I broke python 3 builds by using py2 specific dict functions in commit
98846b39
Fixed with functions in compat.py
parent
38284bc6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
compat.py
compat.py
+4
-0
methods.py
methods.py
+4
-4
No files found.
compat.py
View file @
27310974
...
...
@@ -16,6 +16,8 @@ if sys.version_info < (3,):
return
x
def
iteritems
(
d
):
return
d
.
iteritems
()
def
itervalues
(
d
):
return
d
.
itervalues
()
def
escape_string
(
s
):
if
isinstance
(
s
,
unicode
):
s
=
s
.
encode
(
'ascii'
)
...
...
@@ -44,6 +46,8 @@ else:
return
codecs
.
utf_8_decode
(
x
)[
0
]
def
iteritems
(
d
):
return
iter
(
d
.
items
())
def
itervalues
(
d
):
return
iter
(
d
.
values
())
def
charcode_to_c_escapes
(
c
):
rev_result
=
[]
while
c
>=
256
:
...
...
methods.py
View file @
27310974
import
os
from
compat
import
iteritems
,
open_utf8
,
escape_string
from
compat
import
iteritems
,
itervalues
,
open_utf8
,
escape_string
def
add_source_files
(
self
,
sources
,
filetype
,
lib_env
=
None
,
shared
=
False
):
...
...
@@ -661,7 +661,7 @@ def make_license_header(target, source, env):
reader
.
next_line
()
data_list
=
[]
for
project
in
projects
.
itervalues
(
):
for
project
in
itervalues
(
projects
):
for
part
in
project
:
part
[
"file_index"
]
=
len
(
data_list
)
data_list
+=
part
[
"Files"
]
...
...
@@ -703,7 +703,7 @@ def make_license_header(target, source, env):
f
.
write
(
"const ComponentCopyrightPart COPYRIGHT_PROJECT_PARTS[] = {
\n
"
)
part_index
=
0
part_indexes
=
{}
for
project_name
,
project
in
projects
.
iteritems
(
):
for
project_name
,
project
in
iteritems
(
projects
):
part_indexes
[
project_name
]
=
part_index
for
part
in
project
:
f
.
write
(
"
\t
{
\"
"
+
escape_string
(
part
[
"License"
][
0
])
+
"
\"
, "
...
...
@@ -717,7 +717,7 @@ def make_license_header(target, source, env):
f
.
write
(
"const int COPYRIGHT_INFO_COUNT = "
+
str
(
len
(
projects
))
+
";
\n
"
)
f
.
write
(
"const ComponentCopyright COPYRIGHT_INFO[] = {
\n
"
)
for
project_name
,
project
in
projects
.
iteritems
(
):
for
project_name
,
project
in
iteritems
(
projects
):
f
.
write
(
"
\t
{
\"
"
+
escape_string
(
project_name
)
+
"
\"
, "
+
"©RIGHT_PROJECT_PARTS["
+
str
(
part_indexes
[
project_name
])
+
"], "
+
str
(
len
(
project
))
+
" },
\n
"
)
...
...
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