[Distutils] Which buildout to use?

2011-08-16 Thread Reinout van Rees

Hi,

There's buildout 1.4.4, 1.5.2 and an alpha of 2.0.

The 2.0 seems to aim at python 3 and is, according to the docs, in a 
very early alpha stage, so I'll leave that one out.


What I'm using now is 1.4.4 with the special bootstrap.py that ensures 
it picks 1.4.4 instead of a newer one. The reason: it works with 
http://pypi.python.org/pypi/osc.recipe.sysegg which finds system wide 
python packages (numpy and other stuff better installed through the OS).


I tried 1.5.x half a year ago, but it didn't find numpyfriends on 
ubuntu even though 1.5 is supposed to allow just that. I tried it this 
morning on OSX with 1.5.2 but still no luck. It doesn't want to find the 
OS-level packages.


But... sticking to ye olde 1.4.4 seems wrong to me. So I phoned my 
brother Maurits (hi!) who is working with plone: plone is a heavy 
buildout user, so what's the status there? He said plone is basically 
also still on 1.4.4!



a) I feel a bit better sticking to 1.4.4, knowing that plone also does it.

b) Is anyone actually using 1.5.2 with system packages? And by that I 
mean that you have a dependency on something like numpy and buildout 
actually finds that package locally and won't try and grab it off pypi?


Am I doing something wrong? I dare say I've got an above average 
experience with buidout and I just can't get this to work.




Reinout


p.s.: Here's my buildout config. Am I doing something completely wrong?

  [buildout]
  parts = scripts
  include-site-packages = true
  allowed-eggs-from-site-packages =
  numpy

  [scripts]
  recipe = zc.recipe.egg
  eggs =
  numpy


--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
If you're not sure what to do, make something. -- Paul Graham

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Which buildout to use?

2011-08-16 Thread Fred Drake
On Tue, Aug 16, 2011 at 7:45 AM, Reinout van Rees rein...@vanrees.org wrote:
 But... sticking to ye olde 1.4.4 seems wrong to me. So I phoned my brother
 Maurits (hi!) who is working with plone: plone is a heavy buildout user, so
 what's the status there? He said plone is basically also still on 1.4.4!

We're mostly using zc.buildout 1.4.4 at Zope Corporation (home of zc.buildout)
as well.  Except where we're using older version (which will get updated
before too much longer).

Buildout 1.5.x introduced features we just haven't needed.


  -Fred

-- 
Fred L. Drake, Jr.    fdrake at acm.org
A person who won't read has no advantage over one who can't read.
   --Samuel Langhorne Clemens
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Which buildout to use?

2011-08-16 Thread Attila Oláh
Hello,

On Tue, Aug 16, 2011 at 13:45, Reinout van Rees rein...@vanrees.org wrote:
 b) Is anyone actually using 1.5.2 with system packages? And by that I mean
 that you have a dependency on something like numpy and buildout actually
 finds that package locally and won't try and grab it off pypi?

Yes, we use zc.buildout-1.5.2 with a project that runs Pyramid on
Google's App Engine. I run the development environment in Gentoo, and
I have net-zope/zope-interface installed in
/usr/lib64/python?.?/site-packages/zope/interface. When I run buildout
with a system Python that's ABI is supported by the zope-inteface
ebuild, it will use the one from the system site-packages. IOW,
worksforme.

Have you tried the allowed-eggs-from-site-packages [1] option?

[1] http://pypi.python.org/pypi/zc.buildout/1.5.2#working-with-a-system-python

Attila
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Which buildout to use?

2011-08-16 Thread Reinout van Rees

On 16-08-11 14:41, Attila Oláh wrote:

Hello,

On Tue, Aug 16, 2011 at 13:45, Reinout van Reesrein...@vanrees.org  wrote:

b) Is anyone actually using 1.5.2 with system packages? And by that I mean
that you have a dependency on something like numpy and buildout actually
finds that package locally and won't try and grab it off pypi?


Yes, we use zc.buildout-1.5.2 with a project that runs Pyramid on
Google's App Engine. I run the development environment in Gentoo, and
I have net-zope/zope-interface installed in
/usr/lib64/python?.?/site-packages/zope/interface. When I run buildout
with a system Python that's ABI is supported by the zope-inteface
ebuild, it will use the one from the system site-packages. IOW,
worksforme.


Just making sure: you have a dependency on zope.interface in your 
setup.py's install_requires? So that buildout actively searches for it?



(ABI compatibility... I *did* upgrade to OSX Lion and installing some 
things give me an cannot find gcc-4.0 error. But when running my 
sites, mapnik and the other libraries work just fine, so I think that 
shouldn't be the problem. But I don't know what buildout 1.5 does in 
detail.)



Have you tried the allowed-eggs-from-site-packages [1] option?


Yes. Didn't have any effect, it seemed.



Reinout

--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
If you're not sure what to do, make something. -- Paul Graham

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Which buildout to use?

2011-08-16 Thread Chris Withers

On 16/08/2011 04:45, Reinout van Rees wrote:

Hi,

There's buildout 1.4.4, 1.5.2 and an alpha of 2.0.


I've used 1.5.2 happily for ages, but I don't use the stuff Gary 
introduced there...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] buildout-versions now on github

2011-08-16 Thread Chris Withers

On 16/08/2011 05:34, Reinout van Rees wrote:

On 13-08-11 11:15, Chris Withers wrote:

Hi All,

In an effort to make it easier to get involved, I've moved
buildout-versions to github:

https://github.com/Simplistix/buildout-versions


buildout-versions 1.6 requires buildout = 1.5

Your recipe was one of the things that prompted me to re-investigate
whether I could get buildout 1.5 to work :-)


I have a suspicion, the problems solved with 1.6 only appear when used 
with Buildout 1.5+, but I can't remember for sure...



Not getting buildout 1.5 to work means I have to pin more and more
things to older versions, which isn't something I want to keep doing
obviously. It is also something that's virtually impossible to explain
to potential new buildout users.


What needs explaining?

If you have problems with 1.5, Gary Poster is your man :-)

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] buildout-versions not showing pinned versions

2011-08-16 Thread Chris Withers

Hi,

I've CC'ed in the correct mailing list for these discussions, you should 
mail there first in future.


Right, replaying our discussion in it's original order:

 On 13/08/2011 04:04, B.Nanda Kishore wrote:

 when my buildout.cfg is having content like:
 *[buildout]*
 *parts = deps*
 *extensions = buildout-versions*
 *
 *
 *[deps]*
 *recipe = zc.recipe.egg*
 *eggs = Django*

 and when I run buildout its printing the latest Django 
version(1.3).

 Thats fine. But.
 when I pin the version number of Django in buildout.cfg to 
something


Okay, so it looks like you're pinning versions as follows:

On 15/08/2011 06:20, B.Nanda Kishore wrote:
 Here is my buildout.cfg:
 [buildout]
 parts = deps
 extensions = buildout-versions

 [deps]
 recipe = zc.recipe.egg
 eggs = *Django==1.0.4*

As an aside, I'll point out that the above buildout.cfg doesn't do 
anything useful as Django doesn't expose any setuptools-style console 
scripts.


Now, buildout-versions won't report any versions here since you've 
pinned Django to 1.0.4. It only warns about un-pinned versions of eggs.


Here's a minimal useful recipe that pins Django in a more orthodox 
fashion and provides a bin/py interpreter that will that version 1.0.4 
of django available:


[buildout]
parts = deps
extensions = buildout-versions
versions = versions

[versions]
buildout-versions = 1.6
Django = 1.0.4
setuptools = 0.6c12dev-r88846
zc.buildout = 1.5.2
zc.recipe.egg = 1.3.2

[deps]
recipe = zc.recipe.egg
eggs = Django
interpreter = py

However, I'd suggest looking at the djangorecipe package as a much more 
useful way of dealing with Django in buildout!


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Which buildout to use?

2011-08-16 Thread Reinout van Rees

On 16-08-11 17:04, Attila Oláh wrote:

Getting required 'nose'
   required by vemble 0.
We have the best distribution that satisfies 'nose'.
Egg from site-packages: nose 1.1.2
Getting required 'scipy'
   required by vemble 0.
We have the best distribution that satisfies 'scipy'.
Egg from site-packages: scipy 0.9.0
Getting required 'numpy'
   required by vemble 0.
We have the best distribution that satisfies 'numpy'.
Egg from site-packages: numpy 1.6.1
Getting required 'zope.interface'
   required by vemble 0.
We have the best distribution that satisfies 'zope.interface'.
Egg from site-packages: zope.interface 3.7.0


That's pretty convincing, thanks for trying it out!

So on gentoo it works. On Ubuntu it doesn't (at least half a year ago, 
but that was already with 1.5.2 iirc) and on OSX it doesn't (as far as I 
can see).


Anyone on OSX or ubuntu who got it to work? I'd dearly like to get it to 
work, too.




Reinout

--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
If you're not sure what to do, make something. -- Paul Graham

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Which buildout to use?

2011-08-16 Thread Sebastien Douche
On Tue, Aug 16, 2011 at 13:45, Reinout van Rees rein...@vanrees.org wrote:
  recipe = zc.recipe.egg

zc.recipe.egg can handle the new buildout options? When I want system
packages I use z3.recipe.scripts :
http://pypi.python.org/pypi/z3c.recipe.scripts/

-- 
Sebastien Douche sdou...@gmail.com
Twitter : @sdouche
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Which buildout to use?

2011-08-16 Thread Reinout van Rees

On 16-08-11 17:46, Sebastien Douche wrote:

On Tue, Aug 16, 2011 at 13:45, Reinout van Reesrein...@vanrees.org  wrote:

recipe = zc.recipe.egg

zc.recipe.egg can handle the new buildout options? When I want system
packages I use z3.recipe.scripts :
http://pypi.python.org/pypi/z3c.recipe.scripts/


I'm pretty sure zc.recipe.egg can, as it is bundled with buildout 
itself! But I *did* test out z3c.recipe.scripts and I had the same 
problem: buildout would try and build numpy from source.


And numpy for sure is installed (and osc.recipe.sysegg finds it just fine):

  $ python
  Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51)
  [GCC 4.0.1 (Apple Inc. build 5493)] on darwin
  Type help, copyright, credits or license for more information.
   import numpy
   numpy.__file__

'/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/__init__.pyc'


And my bin/buildout is:

  $ cat bin/buildout

#!/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python 
-S


  import sys
  sys.path[0:0] = [
  '/private/tmp/numpytest/parts/buildout',
  ]


  import os
  path = sys.path[0]
  if os.environ.get('PYTHONPATH'):
  path = os.pathsep.join([path, os.environ['PYTHONPATH']])
  os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = 
os.environ.get('PYTHONPATH', '')

  os.environ['PYTHONPATH'] = path
  import site # imports custom buildout-generated site.py

  import zc.buildout.buildout

  if __name__ == '__main__':
  zc.buildout.buildout.main()


And just to make sure, here's my buildout.cfg:

  [buildout]
  parts = scripts
  include-site-packages = true
  allowed-eggs-from-site-packages =
  numpy

  [scripts]
  recipe = zc.recipe.egg
  eggs =
  numpy



Anyone spot anything suspicious?


Reinout

--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
If you're not sure what to do, make something. -- Paul Graham

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] buildout-versions not showing pinned versions

2011-08-16 Thread B.Nanda Kishore
Its not just with Django. I have faced the same problem with a different
custom package
also. I have developed two sample packages(having just a setup.py with name
and version mentioned)
and I have tried installing both those packages using buildout. One of those
packages version number is pinned.
Here is the buildout.cfg

[buildout]
index=http://localhost:8000/
parts = deps
extensions = buildout-versions

[deps]
recipe = zc.recipe.egg
eggs = PkgA
PkgB==0.1.0

When I ran the buildout, this is the output I got.

[versions]
PkgA = 0.1.0
buildout-versions = 1.6
distribute = 0.6.19
zc.buildout = 1.5.2
zc.recipe.egg = 1.3.2

Notice that PkgB's version is not printed. My doubt was regarding the
Line#33 in 
buildout-versions/__init__.pyhttps://github.com/Simplistix/buildout-versions/blob/master/src/buildout_versions/__init__.py#L33.
That is the one which is filtering
the pinned distributions. I wanted to know why is it doing it ?

Regards,
Nandakishore


On Tue, Aug 16, 2011 at 8:20 PM, Chris Withers ch...@simplistix.co.ukwrote:

 Hi,

 I've CC'ed in the correct mailing list for these discussions, you should
 mail there first in future.

 Right, replaying our discussion in it's original order:


  On 13/08/2011 04:04, B.Nanda Kishore wrote:
 
  when my buildout.cfg is having content like:
  *[buildout]*
  *parts = deps*
  *extensions = buildout-versions*
  *
  *
  *[deps]*
  *recipe = zc.recipe.egg*
  *eggs = Django*
 
  and when I run buildout its printing the latest Django
 version(1.3).
  Thats fine. But.
  when I pin the version number of Django in buildout.cfg to
 something

 Okay, so it looks like you're pinning versions as follows:


 On 15/08/2011 06:20, B.Nanda Kishore wrote:
  Here is my buildout.cfg:
  [buildout]
  parts = deps
  extensions = buildout-versions
 
  [deps]
  recipe = zc.recipe.egg
  eggs = *Django==1.0.4*

 As an aside, I'll point out that the above buildout.cfg doesn't do anything
 useful as Django doesn't expose any setuptools-style console scripts.

 Now, buildout-versions won't report any versions here since you've pinned
 Django to 1.0.4. It only warns about un-pinned versions of eggs.

 Here's a minimal useful recipe that pins Django in a more orthodox fashion
 and provides a bin/py interpreter that will that version 1.0.4 of django
 available:


 [buildout]
 parts = deps
 extensions = buildout-versions
 versions = versions


 [versions]
 buildout-versions = 1.6
 Django = 1.0.4
 setuptools = 0.6c12dev-r88846

 zc.buildout = 1.5.2
 zc.recipe.egg = 1.3.2

 [deps]
 recipe = zc.recipe.egg
 eggs = Django
 interpreter = py

 However, I'd suggest looking at the djangorecipe package as a much more
 useful way of dealing with Django in buildout!


 cheers,

 Chris

 --
 Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] buildout-versions not showing pinned versions

2011-08-16 Thread Chris Withers

On 16/08/2011 18:31, B.Nanda Kishore wrote:

[buildout]
index=http://localhost:8000/
parts = deps
extensions = buildout-versions

[deps]
recipe = zc.recipe.egg
eggs = PkgA
 PkgB==0.1.0

When I ran the buildout, this is the output I got.

[versions]
PkgA = 0.1.0
buildout-versions = 1.6
distribute = 0.6.19
zc.buildout = 1.5.2
zc.recipe.egg = 1.3.2

Notice that PkgB's version is not printed.


Yes, as I said before, this is intended and will not change.

Here's an example buildout.cfg that shows why:

[buildout]
parts = part1 part2
extensions = buildout-versions
versions = versions

[versions]
SomePackage = 2.0

[part1]
recipe = zc.recipe.egg
eggs =
  SomePackage

[part2]
recipe = zc.recipe.egg
eggs =
  SomeOtherPackage
  SomePackage==1.0

To explain, SomeOtherPackage has a dependency on SomePackage, but hasn't 
been updated to work with version 2.0, so needs to be pinned to 1.0. 
However, the rest of the buildout is fine to use with the new version 2.0.


In general, buildout-versions should be used as described in its docs 
and versions should *only* be pinned in a [versions] section.


*Why* are you pinning in the eggs line?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Which buildout to use?

2011-08-16 Thread Chris Withers

On 16/08/2011 08:56, Reinout van Rees wrote:

Anyone spot anything suspicious?


Maybe pin numpy to the version provided by the system?

Just a guess and nothing I've tried...

cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] buildout-versions not showing pinned versions

2011-08-16 Thread B.Nanda Kishore
Well that was something new for me. Having two versions of the same package
in
the same buildout file.

Actually I was installing a few distributions in my workplace. So some
distros have
version pinned in their setup.py install_requires section, and when I run
the buildout
expecting the versions to be printed, its not printing those alone. So
mentioning the version
was not in the buildout file originally, but I see your point of putting
them in [versions] section.
But tell me this. In the above example(pinning a version number in
install_requires section of setup.py)
expecting the version of the package to be printed is a valid usecase right
? Is it not ? I know from the
example which you gave previously there seems to be some ambiguity from
which version to pick if
there are multiple versions. right ? Thats why its left out or ?

Regards,
Nandakishore


On Wed, Aug 17, 2011 at 7:44 AM, Chris Withers ch...@simplistix.co.ukwrote:

 On 16/08/2011 18:31, B.Nanda Kishore wrote:

 [buildout]
 index=http://localhost:8000/
 parts = deps
 extensions = buildout-versions

 [deps]
 recipe = zc.recipe.egg
 eggs = PkgA
 PkgB==0.1.0

 When I ran the buildout, this is the output I got.

 [versions]
 PkgA = 0.1.0
 buildout-versions = 1.6
 distribute = 0.6.19
 zc.buildout = 1.5.2
 zc.recipe.egg = 1.3.2

 Notice that PkgB's version is not printed.


 Yes, as I said before, this is intended and will not change.

 Here's an example buildout.cfg that shows why:

 [buildout]
 parts = part1 part2

 extensions = buildout-versions
 versions = versions

 [versions]
 SomePackage = 2.0

 [part1]

 recipe = zc.recipe.egg
 eggs =
  SomePackage

 [part2]

 recipe = zc.recipe.egg
 eggs =
  SomeOtherPackage
  SomePackage==1.0

 To explain, SomeOtherPackage has a dependency on SomePackage, but hasn't
 been updated to work with version 2.0, so needs to be pinned to 1.0.
 However, the rest of the buildout is fine to use with the new version 2.0.

 In general, buildout-versions should be used as described in its docs and
 versions should *only* be pinned in a [versions] section.

 *Why* are you pinning in the eggs line?


 cheers,

 Chris

 --
 Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig