I am building a turbogears project application.

My setup.py looked something like this:
==============================================================
# -*- coding: utf-8 -*-
try:
    from setuptools import setup, find_packages
except ImportError:
    from ez_setup import use_setuptools
    use_setuptools()
    from setuptools import setup, find_packages

setup(
    name='appname',
    version='0.1',
    description='',
    author='',
    author_email='',
    #url='',
    install_requires=[
        #kb start
        "SQLAlchemy >= 0.6",
        "tg.devtools >= 2.0.1",
        "psycopg2 >= 2.0.11",
        "TurboGears2 >= 2.0.1.1",
        "Catwalk >= 2.0.2",
        "Babel >=0.9.4",
        #can be removed iif use_toscawidgets = False
        "toscawidgets >= 0.9.7.1",
        "zope.sqlalchemy >= 0.4 ",
        "repoze.tm2 >= 1.0a4",
        "xmllayout >= 0.3",
        "repoze.what-quickstart >= 1.0",
        "sprox >= 0.6.6",
        "BeautifulSoup", "fixture"
        #kb stop
                ],
    setup_requires=["PasteScript >= 1.7"],
    paster_plugins=['PasteScript', 'Pylons', 'TurboGears2',
'tg.devtools'],
    packages=find_packages(exclude=['ez_setup']),
    include_package_data=True,
    test_suite='nose.collector',
    tests_require=['WebTest', 'BeautifulSoup'],
    package_data={'pylotengine': ['i18n/*/LC_MESSAGES/*.mo',
                                 'templates/*/*',
                                 'public/*/*']},
    message_extractors={'pylotengine': [
            ('**.py', 'python', None),
            ('templates/**.mako', 'mako', None),
            ('templates/**.html', 'genshi', None),
            ('public/**', 'ignore', None)]},

    entry_points="""
    [paste.app_factory]
    main = pylotengine.config.middleware:make_app

    [paste.app_install]
    main = pylons.util:PylonsInstaller
    """,
)
==============================================================


Because I want a consistent platform, I save all eggs/tars in a
thirdparty/ directory and when someone runs "python setup.py install"
or "python setup.py develop" with the above file, I wish for
dependencies to be taken *only* from my ../../thirdparty folder, and
*not* fetched from the internet.

This guarantees no updated thirdparty dependency will be the sole
cause of something breaking that was working.

To accomplish this, with version c9, I added the following lines to
setup.cfg:
-------------------------------------------
[easy_install]
find_links = ../../thirdparty
-------------------------------------------

This used to work until I upgrade setuptools to version c11.  Now,
when a dependency (for example, "tg.devtools >= 2.0.1", from the above
'install_requires' list) is being installed, it has its own
dependencies, such as

install_requirements = [
                        'TurboGears2 >= 2.0.1',
                        'sqlalchemy-migrate >= 0.5.1',
                        'SQLAlchemy >= 0.5',
                        'repoze.what-quickstart >= 1.0',
                        'repoze.who >= 1.0.10'
                        ]

and each of these can have their own requirements.

setuptools used to pass my find_links = ../../thirdparty command down
to all these dependencies and their dependencies, such that when
looking for 'repoze.who >= 1.0.10' (a dependency listed above, for my
"tg.devtools >= 2.0.1" dependency), easy_setup would know to look in
"../../thirdparty".

In c11, it no longer seems to pass this "find_links = ../../
thirdparty" along to dependencies to search for their dependencies.

Now, I've worked around this by placing code in my setup.py that
dynamically creates and deletes a '~/.pydistutils.cfg' file.  I
discovered that what I really wanted was 'index_url' instead of
'find_links', so my '~/.pydistutils.cfg' looks like this:

[easy_install]
index_url = <absolute path to thirdparty/ directory>
allow_hosts = None


This seems to work for me, but I was struggling trying to understand
a) why this changed and b) why I couldn't find anyone else complaining
that it changed.

Is there a better way to accomplish this?  While dynamically creating
a ~/.pydistutils.cfg file works, it seems idealistically the wrong
approach...

Thanks for your help.






On May 4, 2:30 pm, "P.J. Eby" <[email protected]> wrote:
> At 05:36 AM 5/4/2010 -0700, Kent wrote:
>
>
>
> >Something seems to have changed with a recent release of setuptools.
> >I recently upgraded to -0.6c11 from c9.
>
> >Under c9, my setup.cfg could specify this:
>
> >[easy_install]
> >find_links = ../../thirdparty
>
> >in order to direct setuptools to install from the ../../thirdparty
> >directory instead of searching the internet.  This worked for my
> >project's dependencies and the dependencies' dependencies.
>
> >Now, under c11, settings in the setup.cfg only pass to my project's
> >direct dependencies (install_requires=[] list).
>
> >They no longer are passed to those dependencies' dependencies.
>
> >What happened?  I've googled and googled and am having no luck.  Is my
> >assertion correct?
>
> I need more information than this to understand what you mean.  Are
> you talking about running from "setup.py install", or using
> "easy_install myproject"?  What exactly are the dependencies, and the
> contents of the thirdparty directory?
>
> >P.S. I also can't find an official PEAK software setuptools forum...
> >is this the best forum to ask this question?
>
>  Fromhttp://peak.telecommunity.com/DevCenter/setuptools#mailing-list-and-b...
> :
>
> "Please use the
> <http://mail.python.org/pipermail/distutils-sig/>distutils-sig
> mailing list for questions and discussion about setuptools"
>
> _______________________________________________
> Distutils-SIG maillist  -  
> [email protected]http://mail.python.org/mailman/listinfo/distutils-sig
>
> --
> You received this message because you are subscribed to the Google Groups 
> "distutils-sig" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/distutils-sig?hl=en.
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to