]>
git.ipfire.org Git - pakfire.git/blob - python/pakfire/api.py
2 ###############################################################################
4 # Pakfire - The IPFire package management system #
5 # Copyright (C) 2011 Pakfire development team #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
26 Pakfire
= base
.Pakfire
28 def install(requires
, **pakfire_args
):
29 pakfire
= Pakfire(**pakfire_args
)
31 return pakfire
.install(requires
)
33 def resolvdep(requires
, **pakfire_args
):
34 pakfire
= Pakfire(**pakfire_args
)
36 return pakfire
.resolvdep(requires
)
38 def localinstall(files
, **pakfire_args
):
39 pakfire
= Pakfire(**pakfire_args
)
41 return pakfire
.localinstall(files
)
43 def remove(what
, **pakfire_args
):
44 pakfire
= Pakfire(**pakfire_args
)
46 return pakfire
.remove(what
)
48 def update(pkgs
, check
=False, **pakfire_args
):
49 pakfire
= Pakfire(**pakfire_args
)
51 return pakfire
.update(pkgs
, check
=check
)
53 def info(patterns
, **pakfire_args
):
54 # Create pakfire instance.
55 pakfire
= Pakfire(**pakfire_args
)
57 return pakfire
.info(patterns
)
59 def search(pattern
, **pakfire_args
):
60 # Create pakfire instance.
61 pakfire
= Pakfire(**pakfire_args
)
63 return pakfire
.search(pattern
)
65 def groupinstall(group
, **pakfire_args
):
66 pakfire
= Pakfire(**pakfire_args
)
68 return pakfire
.groupinstall(group
)
70 def grouplist(group
, **pakfire_args
):
71 pakfire
= Pakfire(**pakfire_args
)
73 return pakfire
.grouplist(group
)
75 def _build(pkg
, resultdir
, **kwargs
):
76 pakfire
= Pakfire(**kwargs
)
78 return pakfire
._build
(pkg
, resultdir
, **kwargs
)
80 def build(pkg
, **kwargs
):
81 return Pakfire
.build(pkg
, **kwargs
)
83 def shell(pkg
, **kwargs
):
84 return Pakfire
.shell(pkg
, **kwargs
)
86 def dist(pkgs
, resultdirs
=None, **pakfire_args
):
87 pakfire
= Pakfire(**pakfire_args
)
89 return pakfire
.dist(pkgs
, resultdirs
=resultdirs
)
91 def provides(patterns
, **pakfire_args
):
92 # Create pakfire instance.
93 pakfire
= Pakfire(**pakfire_args
)
95 return pakfire
.provides(patterns
)
97 def requires(patterns
, **pakfire_args
):
98 # Create pakfire instance.
99 pakfire
= Pakfire(**pakfire_args
)
101 return pakfire
.requires(requires
)
103 def repo_create(path
, input_paths
, type="binary", **pakfire_args
):
104 pakfire
= Pakfire(**pakfire_args
)
106 return pakfire
.repo_create(path
, input_paths
, type=type)
108 def repo_list(**pakfire_args
):
109 pakfire
= Pakfire(**pakfire_args
)
111 return pakfire
.repo_list()
113 def clean_all(**pakfire_args
):
114 pakfire
= Pakfire(**pakfire_args
)
116 return pakfire
.clean_all()
118 def check(**pakfire_args
):
119 pakfire
= Pakfire(**pakfire_args
)
121 return pakfire
.check()