Skip to content

Commit

Permalink
servo: Merge #10749 - Prepare related files to make it easier to spli…
Browse files Browse the repository at this point in the history
…t up the Mako template (from servo:split-mako); r=nox

servo/servo#10586 (comment)

r? nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 3bfa4cc7414fea760ce5c503bfbcf25262acb9d7

UltraBlame original commit: 75af6f5e3e2d5876694d389cfcaf04de2120ab6e
  • Loading branch information
marco-c committed Oct 1, 2019
1 parent f4029a9 commit c96f847
Show file tree
Hide file tree
Showing 12 changed files with 2,728 additions and 2,327 deletions.
166 changes: 16 additions & 150 deletions servo/components/style/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,6 @@ use
std
:
:
fs
:
:
File
;
use
std
:
:
io
:
:
Write
;
use
std
:
:
path
:
:
Expand All @@ -98,7 +80,6 @@ process
:
{
Command
Stdio
exit
}
;
Expand Down Expand Up @@ -313,7 +294,6 @@ main
let
python
=
match
env
:
:
Expand All @@ -323,27 +303,18 @@ var
PYTHON
"
)
{
Ok
.
ok
(
python_path
)
=
>
python_path
Err
.
unwrap_or_else
(
_
)
=
>
find_python
(
)
}
;
let
style
script
=
Path
:
Expand All @@ -363,40 +334,20 @@ parent
unwrap
(
)
;
let
mako
=
style
.
join
(
"
Mako
-
0
.
9
.
1
.
zip
properties
"
)
;
let
template
=
style
.
join
(
"
properties
build
.
mako
.
rs
py
"
)
;
Expand Down Expand Up @@ -426,7 +377,7 @@ servo
}
;
let
result
status
=
Command
:
Expand All @@ -436,52 +387,27 @@ new
python
)
.
env
(
"
PYTHONPATH
"
&
mako
)
.
env
arg
(
"
TEMPLATE
"
&
template
script
)
.
env
arg
(
"
PRODUCT
"
product
)
.
arg
(
"
generate_properties_rs
.
py
style
-
crate
"
)
.
stderr
(
Stdio
:
:
inherit
(
)
)
.
output
status
(
)
.
Expand All @@ -491,8 +417,6 @@ unwrap
;
if
!
result
.
status
.
success
Expand All @@ -504,62 +428,4 @@ exit
1
)
}
let
out
=
env
:
:
var
(
"
OUT_DIR
"
)
.
unwrap
(
)
;
File
:
:
create
(
&
Path
:
:
new
(
&
out
)
.
join
(
"
properties
.
rs
"
)
)
.
unwrap
(
)
.
write_all
(
&
result
.
stdout
)
.
unwrap
(
)
;
}
Loading

0 comments on commit c96f847

Please sign in to comment.