Hi all,

I'm facing a problem trying to bootstrap a buildout with its latest
bootstrap script under Windows, using Python 3.3. I'm looking for some
hint to decide whether the issue is with buildout, Python 3, or with my
own installation ...

The problem is that executing the bootstrap script I obtain an
ImportError on the standard `getopt` module.

Digging a bit, I see that ``site.getsitepackages()`` returns a list
composed by two elements, ``c:\\Python33`` and
``c:\\Python33\\lib\\site-packages``: effectively even the 3.4 code at
http://hg.python.org/cpython/file/bc160f985b7b/Lib/site.py#l312
explicitly puts the plain "prefix" into the list.

Then the buildout bootstrap script does something like::

  for sitepackage_path in site.getsitepackages():
      sys.path[:] = [x for x in sys.path if sitepackage_path not in x]

and obviously after that ``sys.path`` does *not* contain any standard
library path (which lives under "c:\\Python33\\Lib"), just the current
working directory and `c:\\Windows\\system32\\python33.zip`.

The code in the bootstrap script seems correct (even if it should
probably use something like ``not x.startswith(sitepackage_path)``),
what seems strange is that, under Windows, the ``getsitepackages()``
result contains a bare ``c:\\Python33``... for comparison, on my Debian
sid I get::

  Python 3.3.5 (default, Mar 22 2014, 13:24:53) 
  [GCC 4.8.2] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import site
  >>> site.getsitepackages()
  ['/usr/local/lib/python3.3/dist-packages',
   '/usr/lib/python3/dist-packages', '/usr/lib/python3.3/dist-packages',
   '/usr/lib/dist-python']
  >>> 

What is going wrong here?

Thanks a lot for any suggestion,
ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  |                 -- Fortunato Depero, 1929.

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to