1

I Am trying to create a buildout recipe for pywhois on google code.

The site of which is here: http://code.google.com/p/pywhois/

Note: if you use easy_install pywhois it installs another package from pypi (python package index) : http://pypi.python.org/pypi/pywhois/0.1

I Am following the documentation on buildout recipe... (http://pypi.python.org/pypi/djangorecipe/1.3)

and I found out I can clone the sourcecode from here:

hg clone https://code.google.com/p/pywhois/

but I can't get it all stick together in a working buildout script... (to be honoust, this is my first buildout script trial... for all other packages I found an existing recipe and normally I try to avoid anything that's not on pypi)

i created 2 issues on their site... on of them is to use another name than in the python package index, the other one is to get their package over there.

Any buildout guru?

EDIT

(already 2 guys trying to help me, thanks!)

I used this in my buildout.conf:

extensions = 
    buildout.dumppickedversions
    mr.developer
auto-checkout = pywhois

and added to my list develop: develop = src/pywhois

and added to my egg list:

eggs =
    myproject
    pywhois

and declared the source of the repo:

[sources]
pywhois = hg https://code.google.com/p/pywhois/

and off course add to eggs: pywhois

and it's downloading it and creating an egg...

EDIT2

Whatever I do, I keep getting: Source URL for existing package 'pywhois' differs. Expected 'https://code.google.com/p/pywhois/'.";

It seems to me if the package-name of the google code package is gonna be changed, that this issue will be solved... I aleady got response on the issue tracker about this.

see http://code.google.com/p/pywhois/issues/detail?id=33

EDIT 3: Now on PyPI: python-whois

And, a brilliant quick action from the developer (Richard Penman). So the package is renamed to python-whois (he is thinking about another name, but for now this works). And he put it on pypi!

So this issue is resolved for me, but the answers of Martijn and Reinout learned me a lot more about buildout, thanks!

michel.iamit
  • 5,788
  • 9
  • 55
  • 74

1 Answers1

2

I'd use mr.developer to grab a local checkout, and use it as a development egg:

[buildout]
extensions = mr.developer
auto-checkout = pywhois

[sources]
pywhois = hg https://code.google.com/p/pywhois/

Now mr.developer will check out pywhois into src/, run it's setup.py to make it a development egg, and tell buildout it's available as such. Now buildout will use that local copy to satisfy any pywhois requirement.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • 1
    Best option. Alternative is to use the .zip download as find-links with an `#egg=pywhois-0.1` appended directly to the .zip filename (change 0.1 to whatever the version is). And require exactly that version in your versions list. But... mr.developer is handier and shorter. – Reinout van Rees Jan 07 '13 at 20:24
  • trying this I keep getting" "Source URL for existing package 'pywhois' differs. Expected 'https://code.google.com/p/pywhois/'." I already used "sudo easy_install -m pywhois" but this only uninstalls it on the system... how do you remove a with buildout (sysegg) installed package... – michel.iamit Jan 07 '13 at 20:52
  • no, but I Installed pywhois earlier from pypi (unfortunately exactly the same name) and I used sys eggs to install this in my buildout folder... After your suggestion (and installing mercurial for the hg checkout) it made the src/pywhois folder with egg info and the setup.py and other dirs and files.... – michel.iamit Jan 07 '13 at 21:00
  • Not certain what you mean by sys eggs there. You cannot remove the wrong pywhois egg? – Martijn Pieters Jan 07 '13 at 21:03
  • Ai I still had an old part called [pywhois] stayed teher from earlier trials. Removing them... i get "mr.developer: The source definition of 'eggs' needs at least the repository kind and URL. " – michel.iamit Jan 07 '13 at 21:11
  • about the sysegg, Reinout can tell you about them, I have learned them fro him :) see here: http://pypi.python.org/pypi/osc.recipe.sysegg And yes I deleted the other egg folder... – michel.iamit Jan 07 '13 at 21:16
  • @michel.iamit: sounds like `mr.developer` thinks `eggs` is a package it needs to checkout and install. Did you accidentially leave the `eggs = ` line indented? – Martijn Pieters Jan 07 '13 at 21:45
  • Sorry, I had the [sources] part oved to see if that helped, and while moving it back it was accidentally above the [eggs] part. Now I switched back the order: develop=...., eggs= ..., [sources] – michel.iamit Jan 07 '13 at 21:54
  • There is *no* need to add `develop = src/pywhois`; let `mr.developer` do that for you. Use `auto-develop` instead. – Martijn Pieters Jan 07 '13 at 22:12
  • Great, the package I want to install is renamed and posted on PyPi! (thanks and credits to Richard Penman). To python-whois. So now I can put it just in setup.py of my project and auto install! I'll accept Martijn Pieters Answer, because I guess this should be the way if you wanna download the source and install it I(and some points for Reiniouts suggestion). – michel.iamit Jan 08 '13 at 08:22