collective / zopeskel.dexterity

Paster templates for dexterity
http://plone.org/products/zopeskel.dexterity
2 stars 2 forks source link

Installation bugs: local commands missing, docs/HISTORY.py missing #1

Closed zopyx closed 10 years ago

zopyx commented 12 years ago

Running buildout on a generated skeleton fails because docs/HISTORY.py is missing. In addition it does not create some.package/some/__init__.py and after fixing the issues manually, paster addcontent fails:

[ajung@dev1 nva.borrow]$ ../../bin/paster addcontent
Traceback (most recent call last):
  File "../../bin/paster", line 23, in <module>
    paste.script.command.run()
  File "/home/ajung/.buildout/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py", line 93, in run
    commands = get_commands()
  File "/home/ajung/.buildout/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/command.py", line 135, in get_commands
    plugins = pluginlib.resolve_plugins(plugins)
  File "/home/ajung/.buildout/eggs/PasteScript-1.7.4.2-py2.6.egg/paste/script/pluginlib.py", line 82, in resolve_plugins
    pkg_resources.require(plugin)
  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 686, in require
  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 584, in resolve
pkg_resources.DistributionNotFound: plone.namedfile[blobs]: Not Found for: nva.borrow (did you run python setup.py develop?)

Environment Plone 4.1.4, Dexterity 1.2.1

cewing commented 12 years ago

I can verify that this is the case.

Removing (or commenting out) the setup.py install_requires listing for plone.namedfile[blobs] restores the ability to run local commands.

The addition of this requirement is destroying local commands unless a very narrow set of requirements is met. I've not yet pinned down exactly what the circumstances are that make it work, but adding the new dexterity package to instance eggs causes it to fail, where adding the package to buildout eggs sometimes succeeds.

jean commented 10 years ago

Is this still the case? The official Plone docs now spell out workaround hacks, that's pretty embarrassing :-p

jean commented 10 years ago

Workaround to fix setup.py: comment out plone.app.dexterity and plone.namedfile [blobs]:

        install_requires=[
                  'setuptools',
                  # Comment out the next two lines
                  #'plone.app.dexterity',
                  #'plone.namedfile [blobs]',
                  # -*- Extra requirements: -*-
        ],

Run the command below to apply the changes made above:

        python setup.py develop
plone-foundation commented 10 years ago

Ouch! I'm afraid that document is largely misleading. On my to-do list to clean it up!

On Tue, Oct 7, 2014 at 9:34 PM, Jean Jordaan notifications@github.com wrote:

Is this still the case? The official Plone docs now spell out workaround hacks http://docs.plone.org/develop/addons/dexterity.html#fix-content-generation-in-zopeskel-dexterity, that's pretty embarrassing :-p

— Reply to this email directly or view it on GitHub https://github.com/collective/zopeskel.dexterity/issues/1#issuecomment-58307823 .

macagua commented 10 years ago

@jean +1

smcmahon commented 10 years ago

zopyx's original bug report is from 2012 and specified Plone 4.1.4 and Dexterity 1.2.1. The current version of zopeskel.dexterity targets the current Plone (now 4.3.2) and Dexterity 2.x.

I'm not sure what may have been the case, but the current zopeskel.dexterity does create HISTORY.txt, does create the packaging __init__.py and does work with local commands with no changes.

smcmahon commented 10 years ago

Works for me.

smcmahon commented 10 years ago

Note: the problems people have been having are due to running "python setup.py develop" rather than adding the new package to the buildout. I've added doc notes telling folks not to do that.