| 1 | ==================== |
|---|
| 2 | Getting a bzr repo |
|---|
| 3 | ==================== |
|---|
| 4 | |
|---|
| 5 | If you're just installing pkgcore from a released tarball, skip this section. |
|---|
| 6 | |
|---|
| 7 | The quickest way to get a copy of the integration (release) branch is via |
|---|
| 8 | downloading |
|---|
| 9 | http://dev.gentooexperimental.org/~pkgcore/releases/pkgcore/hourly-snapshot.tar.bz2 |
|---|
| 10 | |
|---|
| 11 | This is a full branched bzr repo; just untar it, run bzr pull --overwrite, and you're |
|---|
| 12 | good to go, full history history. |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | ==================== |
|---|
| 16 | Installing pkgcore |
|---|
| 17 | ==================== |
|---|
| 18 | |
|---|
| 19 | Set PYTHONPATH |
|---|
| 20 | ============== |
|---|
| 21 | |
|---|
| 22 | Set PYTHONPATH to include your pkgcore directory, so that python can find the |
|---|
| 23 | pkgcore code. Fore example:: |
|---|
| 24 | |
|---|
| 25 | $ export PYTHONPATH="${PYTHONPATH}:/home/user/pkgcore/" |
|---|
| 26 | |
|---|
| 27 | Now test to see if it works:: |
|---|
| 28 | |
|---|
| 29 | $ python -c'import pkgcore' |
|---|
| 30 | |
|---|
| 31 | Python will scan pkgcore, see the pkgcore directory in it (and that it has |
|---|
| 32 | __init__.py), and use that. |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | Registering plugins |
|---|
| 36 | =================== |
|---|
| 37 | |
|---|
| 38 | Pkgcore is pluggable, so even to get the basis working some plugins must be |
|---|
| 39 | registered by running as root:: |
|---|
| 40 | |
|---|
| 41 | # pkgcore/bin/utilities/register.bash |
|---|
| 42 | |
|---|
| 43 | If you register plugins manually you need to set PYTHONPATH (note that sudo |
|---|
| 44 | cleanses the env normally). If that fails, your PYTHONPATH is invalid; |
|---|
| 45 | if it works it'll spit back a registering message. So far, good to go. |
|---|
| 46 | |
|---|
| 47 | Test pkgcore |
|---|
| 48 | ============ |
|---|
| 49 | |
|---|
| 50 | Drop back to normal user, and try:: |
|---|
| 51 | |
|---|
| 52 | $ python |
|---|
| 53 | >>> import pkgcore.config |
|---|
| 54 | >>> from pkgcore.ebuild.atom import atom |
|---|
| 55 | >>> conf=pkgcore.config.load_config() |
|---|
| 56 | >>> tree=conf.get_default('domain').repos[1] |
|---|
| 57 | >>> pkg=max(tree.itermatch(atom("dev-util/diffball"))) |
|---|
| 58 | >>> print pkg |
|---|
| 59 | >>> print pkg.depends |
|---|
| 60 | >=dev-libs/openssl-0.9.6j >=sys-libs/zlib-1.1.4 >=app-arch/bzip2-1.0.2 |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | At the time of writing the domain interface is in flux, so this example might |
|---|
| 64 | fail for you. If it doesn't work ask for assistance in #pkgcore on freenode, |
|---|
| 65 | or email ferringb (at) gmail.com' with the traceback. |
|---|
| 66 | |
|---|
| 67 | Build filter-env |
|---|
| 68 | ================ |
|---|
| 69 | |
|---|
| 70 | Finally, you need filter-env for the ebuild daemon:: |
|---|
| 71 | |
|---|
| 72 | $ python setup.py build_filter_env |
|---|