Cannot run buildout on custom zope/plone app

We have a custom written zope/plone app where the developers have gone missing. In an effort to at least have some documentation on how to deploy this I'm trying to re-deploy our app in a VM so I know how to do so in the future.

Unfortunately I am stuck. The buildout fails.

This should be using a virtualenv which seems to have setuptools loaded in the site-packages directory. The setup.py where I'm running the buildout from has an "import setup from setuptools" line, rather than a distutils line like I've seen google mention for the errors in the pastebin post.

 bin/buildout -v -c ./deploy.cfg labcore:etc-user=labcore labcore:prefix=$PWD install pyuno-link pyuno-setup pyuno py app test apache-solr builddeps
Installing 'zc.buildout', 'setuptools'.
We have the distribution that satisfies 'zc.buildout==1.6.1'.
We have the distribution that satisfies 'setuptools==0.6c11'.
Develop: '/home/labcore/labcore.lims/.'
While:
  Installing.
  Processing develop directory '/home/labcore/labcore.lims/.'.
Error: Installing develop egg failed: /usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution 
option: 'extras_require'
warnings.warn(msg)
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'namespace_packages'
warnings.warn(msg)
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'include_package_data'
warnings.warn(msg)
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'develop'

Can anyone give me any suggestions on what to try?

Here is my deploy.cfg

[buildout]
extends = ../labcore.appDP/dpmdeploy.cfg
eggs-directory = /home/labcore/.buildout/eggs
download-cache = /home/labcore/.buildout/download
develop +=
        .
        ../labcore.appDP
        ../labcore.datapackage
eggs +=
    pyodbc

[versions]
labcore.appDP =
labcore.datapackage =
#paramiko = 1.7.5
#pycrypto = 2.0.1
pyodbc = 3.0.6 ; 3.x required by freetds-0.91

[pyuno-link]
#symlink_base = /usr/lib/python2.6/site-packages
symlink_base = /usr/lib64/python2.6/site-packages

[lims]
url = mssql+pyodbc://labcore:p4ssword@DSN/?schema_name=dbo
package = labcore.lims

[data]
base-dir = /opt/labcore/data

[labcore]
user = labcore
;etc-user = labcore

[rsyncd]
zdaemon.conf =
  <runner>
    umask 0027
  </runner>

[rsyncd.conf]
;address = labcore
hosts-allow = *

[solr]
config-template = ${buildout:directory}/../labcore.appDP/solrconfig.xml.tmpl
schema-template = ${buildout:directory}/../labcore.appDP/schema.xml.tmpl
jetty-template = ${buildout:directory}/../labcore.appDP/jetty.xml.tmpl

[solr-instance]
zdaemon.conf =
  <runner>
    directory ${buildout:parts-directory}/solr
    transcript /dev/null
    umask 0027
  </runner>

[zeoserver]
zdaemon.conf =
  <runner>
    umask 0027
  </runner>

[zeoclient]
zconfig =
  <zodb>
    cache-size 100000
    cache-size-bytes 400MB
    pool-size 15
    <zeoclient>
      server localhost:${zeoserver:zeoport}
      blob-dir ${data:blob-dir}
      shared-blob-dir yes
      cache-size 500MB
    </zeoclient>
  </zodb>

[instance]
zdaemon.conf =
  <runner>
    umask 0027
  </runner>

[builddeps]
recipe = z3c.recipe.scripts
eggs =
    cns.recipe.symlink
    collective.recipe.solrinstance
    collective.recipe.template
    gocept.download
    z3c.recipe.mkdir
    z3c.recipe.scripts
    zc.recipe.deployment
    zc.recipe.egg
    zc.recipe.filestorage
    zc.recipe.rhrc
    zc.recipe.testrunner
    zc.zdaemonrecipe
    zc.zodbrecipes
    zc.zope3recipes
    ${buildout:eggs}
scripts =
dependent-scripts =

the bin/buildout:

#!/home/labcore/labcore.lims/../bin/python2.6

import sys
sys.path[0:0] = [
    '/home/labcore/.buildout/eggs/setuptools-0.6c11-py2.6.egg',
    '/home/labcore/.buildout/eggs/zc.buildout-1.6.1-py2.6.egg',
    ]


import zc.buildout.buildout

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

It looks as if labcore.lims would not use setuptools. Check the setup.py" file in this folder and import the functionsetupthere fromsetuptools`.

That's what I gathered too, but the setup.py references setuptools and not distutils.

Here's the setup.py:

import os.path
from setuptools import setup, find_packages

version = '0.0.9.dev0'

setup_dir = os.path.dirname(os.path.abspath(__file__))
src_dir = os.path.join(setup_dir, 'src')
def read(fname):
    return open(os.path.join(setup_dir, fname)).read()

tests_require = [
    ]

setup(
    name = "labcore.lims",
    version = version,
    author = "redacted",
    author_email = "redacted",
    maintainer = "redacted",
    maintainer_email = "redacted",
    url = "redacted",
    packages = find_packages(src_dir),
    package_dir = {'': 'src'},
    namespace_packages = [
        "labcore",
        ],
    include_package_data = True,
    zip_safe = False,
    platforms = ["any"],
    description = ("A LabCORE package"),
    long_description = read('README.txt'),
    install_requires = [
        "SQLAlchemy",
        "labcore.datapackage",
        "reportlab",
        "setuptools",
        "zope.cachedescriptors",
        "zope.component",
        "zope.interface",
        ],
    tests_require = tests_require,
    extras_require = {
        'test': tests_require,
        },
)

buildout has an option to enter pdb (the Python debugger) in case of errors. You could try to use this in order to analyse the error context.

Sadly that just leads me.. presumably past the error?

Starting pdb:
> /home/labcore/.buildout/eggs/zc.buildout-1.6.1-py2.6.egg/zc/buildout/easy_install.py(1188)develop()
-> raise zc.buildout.UserError("Installing develop egg failed: %s" % p.stderr.read())

Here's the traceback:

Traceback (most recent call last):
  File "/home/labcore/.buildout/eggs/zc.buildout-1.6.1-py2.6.egg/zc/buildout/buildout.py", line 1848, in main
    getattr(buildout, command)(args)
  File "/home/labcore/.buildout/eggs/zc.buildout-1.6.1-py2.6.egg/zc/buildout/buildout.py", line 480, in install
    installed_develop_eggs = self._develop()
  File "/home/labcore/.buildout/eggs/zc.buildout-1.6.1-py2.6.egg/zc/buildout/buildout.py", line 720, in _develop
    zc.buildout.easy_install.develop(setup, dest)
  File "/home/labcore/.buildout/eggs/zc.buildout-1.6.1-py2.6.egg/zc/buildout/easy_install.py", line 1188, in develop
    raise zc.buildout.UserError("Installing develop egg failed: %s" % p.stderr.read())

Well good news is I got further on it. I figured out the setuptools egg didn't have an EGG-INFO directory, it was named setuptools.egg-info instead of just EGG-INFO (not sure why?)

But now I'm stuck with

We have no distributions for cns.recipe.symlink that satisfies 'cns.recipe.symlink==0.2.3'.

But cns.recipe.symlink is in my find-files URL for sure.

Check that the cns.recipe.symlink there has the correct version.

Well I found out part of the problem. The buildout config find-links URL I was using was an IIS based host. And while I could see the file list in a browser the buildout wouldn't fetch them. When I moved the files to a Linux web server it was able to fetch them.

Might be a setting I missed in IIS?

Either way the build appears to finish but I'm missing other stuff.