[Zope] Zope 2.10b2 build issue

Pascal Peregrina Pperegrina at Lastminute.com
Thu Sep 21 05:06:36 EDT 2006


Hi,

Just to let you know that if you use a temporary build directory to build
Zope 2.10, the setup.py script fails.

I know, I am using python 2.5 (making some tests) but this issue is
unrelated.

Below, "build" is an empty directory and "src" is the untared Zope source.

STEP 1

cd build/Zope-2.10.0-b2 &&
/opt/pperegri/F2BUILDS/F2.15/src/Zope-2.10.0-b2/configure
--prefix=/opt/pperegri/F2BUILDS/F2.15/opt/Zope-2.10.0-b2          --optimize
--with-python=/opt/pperegri/F2BUILDS/F2.15/opt/Python-2.5/bin/python

Using Python interpreter at
/opt/pperegri/F2BUILDS/F2.15/opt/Python-2.5/bin/python

Configuring Zope installation

  - Zope top-level binary directory will be
/opt/pperegri/F2BUILDS/F2.15/opt/Zope-2.10.0-b2.
  - Distutils install flags will be "--optimize=1 --no-compile"
  - Makefile written.

  Next, run make.

=> OK (generates makefile in the build directory)

STEP 2

"/opt/pperegri/F2BUILDS/F2.15/opt/Python-2.5/bin/python"
"/opt/pperegri/F2BUILDS/F2.15/src/Zope-2.10.0-b2/setup.py" \
            build 
--build-base="/opt/pperegri/F2BUILDS/F2.15/build/Zope-2.10.0-b2/build-base/p
ython-2.5" 
--build-lib="/opt/pperegri/F2BUILDS/F2.15/build/Zope-2.10.0-b2/build-base/py
thon-2.5/build-lib"
--build-scripts="/opt/pperegri/F2BUILDS/F2.15/build/Zope-2.10.0-b2/build-bas
e/python-2.5/build-scripts"
--build-temp="/opt/pperegri/F2BUILDS/F2.15/build/Zope-2.10.0-b2/build-base/p
ython-2.5/build-temp"

=> FAILURE:
Traceback (most recent call last):
  File "/opt/pperegri/F2BUILDS/F2.15/src/Zope-2.10.0-b2/setup.py", line 53,
in <module>
    import versions
ImportError: No module named versions
make: *** [build] Error 1

CAUSE:

The problem comes from this code in setup.py (which did not exist in Zope
2.8):

sys.path.insert(0, 'inst')
import versions
del sys.path[0]

ZOPE_VERSION = '%s%s-%s' % (versions.ZOPE_MAJOR_VERSION,
versions.ZOPE_MINOR_VERSION, versions.VERSION_RELEASE_TAG)

If I change it to:

try:
    MAKEFILEDIR = os.path.dirname(os.path.abspath(__file__))
except:
    MAKEFILEDIR = os.path.dirname(os.path.abspath(sys.argv[0]))
sys.path.insert(0, '%s/inst'%MAKEFILEDIR)
import versions
del sys.path[0]

ZOPE_VERSION = '%s%s-%s' % (versions.ZOPE_MAJOR_VERSION,
versions.ZOPE_MINOR_VERSION, versions.VERSION_RELEASE_TAG)

Everything works fine.

Thanks for reading up to this point :)

Pascal



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


More information about the Zope mailing list