Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
927071e0
Commit
927071e0
authored
Feb 09, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python/build/project.py: add quilt support
parent
6ba918b2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
project.py
python/build/project.py
+9
-0
quilt.py
python/build/quilt.py
+9
-0
No files found.
python/build/project.py
View file @
927071e0
...
...
@@ -3,10 +3,12 @@ import re
from
build.download
import
download_and_verify
from
build.tar
import
untar
from
build.quilt
import
push_all
class
Project
:
def
__init__
(
self
,
url
,
md5
,
installed
,
name
=
None
,
version
=
None
,
base
=
None
,
patches
=
None
,
edits
=
None
,
use_cxx
=
False
):
if
base
is
None
:
...
...
@@ -29,6 +31,10 @@ class Project:
self
.
md5
=
md5
self
.
installed
=
installed
if
patches
is
not
None
:
srcdir
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)))
patches
=
os
.
path
.
join
(
srcdir
,
patches
)
self
.
patches
=
patches
self
.
edits
=
edits
self
.
use_cxx
=
use_cxx
...
...
@@ -51,6 +57,9 @@ class Project:
parent_path
=
toolchain
.
build_path
path
=
untar
(
self
.
download
(
toolchain
),
parent_path
,
self
.
base
)
if
self
.
patches
is
not
None
:
push_all
(
toolchain
,
path
,
self
.
patches
)
if
self
.
edits
is
not
None
:
for
filename
,
function
in
self
.
edits
.
items
():
with
open
(
os
.
path
.
join
(
path
,
filename
),
'r+t'
)
as
f
:
...
...
python/build/quilt.py
0 → 100644
View file @
927071e0
import
subprocess
def
run_quilt
(
toolchain
,
cwd
,
patches_path
,
*
args
):
env
=
dict
(
toolchain
.
env
)
env
[
'QUILT_PATCHES'
]
=
patches_path
subprocess
.
check_call
([
'quilt'
]
+
list
(
args
),
cwd
=
cwd
,
env
=
env
)
def
push_all
(
toolchain
,
src_path
,
patches_path
):
run_quilt
(
toolchain
,
src_path
,
patches_path
,
'push'
,
'-a'
)
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