g-pypi
======
`http://code.google.com/p/g-pypi/ `_
g-pypi creates Python package ebuilds for Gentoo Linux by querying The Cheese Shop.
Although it's in the early stages of development, testing has generated over 1,200 ebuilds automatically.
Note: g-pypi will only be as good at creating ebuilds as The Python Package Index information is. People can leave out a lot of information when submitting info to PyPI, making ebuild creation impossible.
Basic Usage
===========
Output ebuild to stdout:
::
g-pypi -p package_name
Write ebuild to your overlay:
::
g-pypi package_name
Create live svn ebuild (if subversion URI is listed in PyPI):
::
g-pypi -s package_name
By default your first overlay listed in /etc/make.conf PORTDIR_OVERLAY
is used. If you want to use a different one, edit ~/.g-pypirc
By default your first KEYWORD listed in /etc/make.conf KEYWORDS
is used. If you want to use a different one, edit ~/.g-pypirc or prefix your command with ACCEPT_KEYWORDS e.g.
::
$ ACCEPT_KEYWORDS='~amd64' g-pypi foopkg
You can over-ride some variables if g-pypi can't figure out the
PN, PV etc.
::
-n or --PN=package-name
-v or --PV=version
--MY_P=my_p
--MY_PN=my_pn
--MY_PV=my_pv
If you don't specify a portage category with '-c' the ebuild will be
placed in dev-python
Use '-V' for verbose output for debugging.
Testing
=======
Use nose_ to run unitests::
$ PYTHONPATH=.:../gentoolkit/pym nosetests tests/test_enamer.py
Note that some of the tests in :file:`tests` run on all PyPI packages,
so it's good to glance at a given test's docstring before you run it.
.. _nose: http://somethingaboutorange.com/mrl/projects/nose/
INSTALL
=======
g-pypi is available in my overlay directory.
If you haven't emerged and configured app-portage/layman::
# emerge layman
# layman --add pythonhead
# echo "source /var/lib/layman/make.conf" >> /etc/make.conf
# emerge g-pypi
If you have emerged and configured app-portage/layman::
# layman --add pythonhead
# emerge g-pypi
Permisions
==========
To run ``g-pypi`` without portage permissions, you can try something like
DISTDIR=/tmp PORTAGE_TMPDIR=/tmp g-pypi -Y ~/my/overlay
Which will do all the requisite mucking about in the :file:`/tmp`
directory, which your average user can write to. Note that you *will*
need to be part of the ``portage`` group. I'm not sure how to work
around that yet.
Subversion
==========
`subversion repository `_
Hint: You can use to create a live svn ebuild for g-pypi ;)
::
g-pypi -s g-pypi