forked from openSUSE/osc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sphinx documentation, initial commit
- Loading branch information
Showing
8 changed files
with
560 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
osc | ||
=== | ||
|
||
These are the packages in the osc package. | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
osc.core | ||
osc.util |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. py:module:: osc.core | ||
core | ||
==== | ||
|
||
This is the osc core module. | ||
|
||
basic structures | ||
---------------- | ||
|
||
.. autoclass:: File | ||
:members: | ||
|
||
|
||
.. autoclass:: Serviceinfo | ||
:members: | ||
|
||
|
||
.. autoclass:: Linkinfo | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
osc.util package | ||
================ | ||
|
||
Submodules | ||
---------- | ||
|
||
osc.util.ar module | ||
------------------ | ||
|
||
.. automodule:: osc.util.ar | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
osc.util.archquery module | ||
------------------------- | ||
|
||
.. automodule:: osc.util.archquery | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
osc.util.cpio module | ||
-------------------- | ||
|
||
.. automodule:: osc.util.cpio | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
osc.util.debquery module | ||
------------------------ | ||
|
||
.. automodule:: osc.util.debquery | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
osc.util.packagequery module | ||
---------------------------- | ||
|
||
.. automodule:: osc.util.packagequery | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
osc.util.repodata module | ||
------------------------ | ||
|
||
.. automodule:: osc.util.repodata | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
osc.util.rpmquery module | ||
------------------------ | ||
|
||
.. automodule:: osc.util.rpmquery | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
osc.util.safewriter module | ||
-------------------------- | ||
|
||
.. automodule:: osc.util.safewriter | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: osc.util | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
Tutorial | ||
======== | ||
|
||
This is a tutorial on how to use the osc python api. | ||
|
||
Key to the |obs| are (remote): | ||
|
||
#. A **project** | ||
#. A project has associated multiple **repositories** (linux distributions) | ||
#. Multiple **packages** in a project will hold the builds against the difefrent **repositories** | ||
|
||
|
||
A user will deal with local checkout of a project in a **working copy**: this is similar to the | ||
subversion checkout model. | ||
|
||
|
||
Initial config setup | ||
-------------------- | ||
|
||
Osc the library requires an initial setup: | ||
|
||
>>> import osc.conf | ||
>>> osc.conf.get_config() | ||
|
||
This will read all the external config files (eg. ~/.oscrc) and the internal configuration | ||
values. | ||
|
||
|
||
Acquiring the apiurl | ||
-------------------- | ||
|
||
All the osc operation will use a **apiurl** to lookup for things like passwords, username and other parameters | ||
while performing operations: | ||
|
||
>>> apiurl = osc.conf.config['apiurl'] | ||
|
||
|
||
Operations on a remote build server | ||
----------------------------------- | ||
|
||
osc is similar to subversion, it has a remote server and a local (checkout) **working** directory. | ||
First we'll go through the remote operation on a server **NOT** requiring a checkout. | ||
Operations are contained in the osc.core module: | ||
|
||
>>> import osc.core | ||
|
||
|
||
List all the projects and packages | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
This will show all the projects on the remote |obs|: | ||
|
||
>>> for prj in osc.core.meta_get_project_list(apiurl, deleted=False): | ||
print prj | ||
|
||
|
||
A project has **repositories** associated with it (eg. linux distributions): | ||
|
||
>>> prj = 'home:cavallo71:opt-python-interpreters' | ||
>>> for repo in osc.core.get_repos_of_project(apiurl, prj): | ||
print repo | ||
|
||
|
||
A project contains packages and to list them all: | ||
|
||
>>> prj = 'home:cavallo71:opt-python-interpreters' | ||
>>> for pkg in osc.core.meta_get_packagelist(apiurl, prj): | ||
print pkg | ||
|
||
|
||
Add a package to an existing project | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
||
Operations in a checked out **working copy** | ||
-------------------------------------------- | ||
|
||
|
||
|
||
Create your first project: the hello project | ||
-------------------------------------------- | ||
|
||
.. todo:: add he description on how to init a project | ||
|
||
|
||
Adding your firs package to the project hello: the world package | ||
---------------------------------------------------------------- | ||
|
||
.. todo:: add he description on how to add a package | ||
|
||
|
||
|
||
Setting the build architectures | ||
------------------------------- | ||
|
||
|
Oops, something went wrong.