<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV><DIV>I included the "ZSI" package in "setup_requires" and "install_requires", but it isn't retrieved/installed before I use it via "make_generated_packages".  </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here is what I'm doing:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>class PGDistribution(_Distribution):</DIV><DIV>    """Indirection so that setuptools grabs "setup_requires" dependencies</DIV><DIV>    before calling "_make_generated_package()"</DIV><DIV>    """</DIV><DIV>    def finalize_options (self):</DIV><DIV>        if _make_generated_package() is True:</DIV><DIV>             self.packages = find_packages()</DIV><DIV>        _Distribution.finalize_options(self)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>What I'm experiencing doesn't seem to jive with the documentation:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier New" size="4"><SPAN class="Apple-style-span" style="font-size: 13.3px;"><B>setup_requires</B></SPAN></FONT></DIV><P style="margin: 0.0px 0.0px 16.0px 0.0px"><FONT class="Apple-style-span" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;">A string or list of strings specifying what other distributions need to be present in order for the </SPAN></FONT><FONT class="Apple-style-span" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;"><I>setup script</I></SPAN></FONT><FONT class="Apple-style-span" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;"> to run.</SPAN></FONT></P><DIV>So I get a big traceback because "fetch_build_egg" uses "self.__class__" to construct another Distribution instance, this time mine, and this ends up calling my "finalize_options" before I want it to...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>There doesn't seem to be a nice way to deal with this issue, I used a boolean in the constructor to make it work, I'd like to be able to specify a different Distribution class for my "distribution" and another for all the stuff setuptools installs.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>$ python setup.py installTraceback (most recent call last):</DIV><DIV>  File "setup.py", line 215, in &lt;module&gt;</DIV><DIV>    main()</DIV><DIV>  File "setup.py", line 209, in main</DIV><DIV>    dependency_links = [</DIV><DIV>  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py", line 112, in setup</DIV><DIV>    _setup_distribution = dist = klass(attrs)</DIV><DIV>  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c3-py2.5.egg/setuptools/dist.py", line 219, in __init__</DIV><DIV>    self.fetch_build_eggs(attrs.pop('setup_requires'))</DIV><DIV>  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c3-py2.5.egg/setuptools/dist.py", line 243, in fetch_build_eggs</DIV><DIV>    parse_requirements(requires), installer=self.fetch_build_egg</DIV><DIV>  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c3-py2.5.egg/pkg_resources.py", line 481, in resolve</DIV><DIV>    dist = best[req.key] = env.best_match(req, self, installer)</DIV><DIV>  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c3-py2.5.egg/pkg_resources.py", line 717, in best_match</DIV><DIV>    return self.obtain(req, installer) # try and download/install</DIV><DIV>  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c3-py2.5.egg/pkg_resources.py", line 729, in obtain</DIV><DIV>    return installer(requirement)</DIV><DIV>  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c3-py2.5.egg/setuptools/dist.py", line 264, in fetch_build_egg</DIV><DIV>    dist = self.__class__({'script_args':['easy_install']})</DIV><DIV>  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/setuptools-0.6c3-py2.5.egg/setuptools/dist.py", line 223, in __init__</DIV><DIV>    _Distribution.__init__(self,attrs)</DIV><DIV>  File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 267, in __init__</DIV><DIV>    self.finalize_options()</DIV><DIV>  File "setup.py", line 155, in finalize_options</DIV><DIV>    if _make_generated_package() is True:</DIV><DIV>  File "setup.py", line 124, in _make_generated_package</DIV><DIV>    _create_generated_files(cp.items(TYPES_SEC), services=False, stubs=False, cp=cp, web2=False)</DIV><DIV>  File "setup.py", line 52, in _create_generated_files</DIV><DIV>    from ZSI.wstools.WSDLTools import WSDLReader</DIV><DIV>ImportError: No module named ZSI.wstools.WSDLTools</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV></DIV></DIV></BODY></HTML>