Find requirement specs in a Plone buildout setup

前端 未结 5 1928
无人及你
无人及你 2021-01-18 03:21

I have a Plone site (something around 4.2.4, telling from a version.txt in the root directory) which I\'d like to update to a recent version (I found this how-t

相关标签:
5条回答
  • 2021-01-18 03:56

    It could be that you have on your buildout configuration to not look for a newer version if you already have one locally. There should be a line like this:

    newest = false
    

    You could try to either remove your local cache of eggs or explicitly set to not use the global one and use a specific one (empty).

    Something like:

    [buildout]
    eggs-directory = /home/USER/SOMEWHERE/eggs
    download-cache = /home/USER/SOMEWHERE/downloads
    extends-cache = /home/USER/SOMEWHERE/extends
    
    0 讨论(0)
  • 2021-01-18 04:00

    Basically there's three places to look for version-pinnings:

    1.) The requires-files of eggs released on PyPi, like Luca Fabbri pointed out, which you can search for pins like this:

    grep -r --include=requires.txt "dependency.to.search.for" path/to/eggs-cache
    

    2.) The setup.py-files of development-eggs, similar searchable like:

    grep -r --include=setup.py "dependency.to.search.for" path/to/dev-eggs-cache
    

    3.) The [versions]-part of config-files, where in this case the version.cfg is pulling more version-configs in, via its extends-option and the pulled one's might also specify more configs via extends.

    You're lucky, admired M. v. Rees has shared a snippet, on how to get all pinnings of all Plone versions: https://gist.github.com/mauritsvanrees/99cb4a25b622479e7dc3

    0 讨论(0)
  • 2021-01-18 04:09

    You can use "eggdeps" (search pypi for it) to get a tree of all dependencies in your buildout - perhaps this can be helpful. Add the egg to your buildout and rerun buildout. Do it on your original, working buildout configuration, before making the changes you mentioned. (Generating the eggdeps script requires buildout to finish successfully).

    add this to your buildout configuration:

    parts +=
        eggdeps
    

    ...

    [eggdeps]
    recipe = zc.recipe.egg
    eggs = tl.eggdeps
           ${instance:eggs}
    scripts = eggdeps
    

    Run buildout again. Now you have a script bin/eggdeps, that prints a tree of all dependencies. Run it:

    ./bin/eggdeps -n
    

    Example output:

    zope.app.pagetemplate 3.11.2
        setuptools 8.0.2
        zope.browserpage 3.12.2 ...
        zope.component 3.9.5 [hook] ...
        zope.configuration 3.7.4 ...
        zope.dublincore 3.7.0
            pytz 2013b0
            setuptools 8.0.2
            zope.component 3.9.5 ...
            zope.datetime 3.4.1 ...
            zope.interface 3.6.7 ...
            zope.lifecycleevent 3.6.2 ...
            zope.location 3.9.1 ...
            zope.schema 4.2.2 ...
            zope.security 3.7.4 ...
          [test]
            zope.annotation 3.5.0 ...
            zope.testing 3.9.7 ...
        zope.i18nmessageid 3.5.3 ...
        zope.interface 3.6.7 ...
        zope.pagetemplate 3.6.3 ...
        zope.schema 4.2.2 ...
    
    0 讨论(0)
  • 2021-01-18 04:19

    but a better way to upgrade the existing installation is probably to get a standard buildout for the plone version you want to upgrade to, and then add your non-standard eggs to this buildout. Finally move your database and blobs over to the new installation, and follow the upgrade guide.

    0 讨论(0)
  • 2021-01-18 04:22

    The dependency is probably inside a 3rd party egg (so: no setup.py in it). Search again inside ./eggs/*/EGG-INFO/requires.txt (if your egg directory is inside the buildout root).

    0 讨论(0)
提交回复
热议问题