i am running Plone 4.3.17 and Python 2.7. I would like to enable users to delete their own created content objects. Therefore, I identified a solution: the "collective.deletepermission" package.
I added the package to the "eggs" section of my buildout.cfg as follows:
eggs =
Plone
Pillow
collective.deletepermission
Then I tried to run .\bin\buildout with the follwing error:
Installing instance.
/home/myuser/Plone/buildout-cache/eggs/setuptools-27.3.0-py2.7.egg/pkg_resources/__init__.py:188: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
stacklevel=1,
Download error on http://download.zope.org/ppix/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Download error on http://download.zope.org/distribution/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Couldn't find index page for 'collective.deletepermission' (maybe misspelled?)
Getting distribution for 'collective.deletepermission'.
Couldn't find index page for 'collective.deletepermission' (maybe misspelled?)
While:
Installing instance.
Getting distribution for 'collective.deletepermission'.
Error: Couldn't find a distribution for 'collective.deletepermission'.
Does your buildout.cfg contain index = https://pypi.python.org/simple in the buildout section? Since some time, pypi requires https which must be chosen via the definition above for older buildout/setuptools versions.
Hi Dieter,
I ran buildout with option -vvv
The beginning looks fine, a lot of packages are listed with their version number. The end section looks like this:
Installing instance.
/home/user/Plone/buildout-cache/eggs/setuptools-27.3.0-py2.7.egg/pkg_resources/init.py:188: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
stacklevel=1,
Installing 'Plone', 'Pillow', 'collective.deletepermission', 'plone.recipe.zope2instance'.
We have the distribution that satisfies 'Plone==4.3.17'.
We have the distribution that satisfies 'Pillow==5.1.0'.
We have no distributions for collective.deletepermission that satisfies 'collective.deletepermission'.
Download error on http://download.zope.org/ppix/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Download error on http://download.zope.org/distribution/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Couldn't find index page for 'collective.deletepermission' (maybe misspelled?)
Getting distribution for 'collective.deletepermission'.
Couldn't find index page for 'collective.deletepermission' (maybe misspelled?)
While:
Installing instance.
Getting distribution for 'collective.deletepermission'.
Error: Couldn't find a distribution for 'collective.deletepermission'.
here is my entire buildout.cfg (comments removed).
I replaced hastags with another notation /* ... */, as hashtags seem to trigger some kind of markup in the forum.
Can a possible solution be just to run buildout with newer versions of zc.buildout and setuptools?
If yes, which most recent versions can you recommend, which can build Plone 4.3.17 on Python 2.7?
If this works, can I simply change the version numbers in the [versions] section of buildout.cfg, or do I have to adjust more stuff in versions.cfg?
collective.deletepermission is on PyPI. Thus, something seems to be wrong with PyPI access.
A client is using Python 2.7.17, setuptools==38.5.1, zc.buildout==2.13.1 with Plone 4. You must defne the new version numbers for setuptools and zc.buildout in the versions section of your buildout configuration but this is not sufficient. How to upgrade setuptools and zc.buildout was discussed in the forum (you could search for this). The client mentioned above did something like: create a new virtual env with the new Python version; install the correct setuptools and zc.buildout versions in this virtual env. Use the zc.buildout in the virtual env to initialize the Plone installation (with will create bin/buildout); run bin/buildout.
Not sure that this will resolve your current problem.
I did get the latest unified installer I could find (4.3.19) and installed a fresh Plone with it. It displays the same error. I am running Ubuntu 18.04, so unless there is a general problem with Ubuntu and Plone I assume that this is a general bug of Plone 4 installers and adding the line "index = https://pypi.python.org/simple" does not fix the problem.
I also saw that there is an even newer version (4.3.20), however I could not find an universal installer for that. May that version fix the problem?
Is there anyone still supporting Plone 4.3.x who could verify the issue?
Can you point me in any other direction?
Can I manually download and add the egg to my buildout?
There is no problem with Ubuntu 18.04 (the formerly mentioned client uses it).Plone 4 is now quite old: it is well possible that its installers have not been updated to new setuptools/zc.buildout versions.
At your place, I would try the setuptools/zc.buildout upgrade.
Running /bin/buildout still delivers an error message:
Installing instance.
Download error on http://download.zope.org/ppix/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Download error on http://download.zope.org/distribution/: hostname 'download.zope.org' doesn't match 'vm06.plyp.com' -- Some packages may not be found!
Download error on https://pypi.python.org/simple/collective.deletepermission/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'collective.deletepermission' (maybe misspelled?)
Getting distribution for 'collective.deletepermission'.
Couldn't find index page for 'collective.deletepermission' (maybe misspelled?)
While:
Installing instance.
Getting distribution for 'collective.deletepermission'.
Error: Couldn't find a distribution for 'collective.deletepermission'.
How new is your Python?
When I remember right, PyPI access now requires SNI (= "Server Name Information" or something similar) support. Python must not be too old to provide this. Check from urllib import urlopen; urlopen("https://pypi.org/simple/collective-deletepermission/").
my python is 2.7.17 and the result of your code is:
Python 2.7.17 (default, Sep 30 2020, 13:38:04)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from urllib import urlopen;
urlopen("Links for collective-deletepermission")
<addinfourl at 140427096804320 whose fp = <socket._fileobject object at 0x7fb7bb3bd8d0>>
just a quick question: do you have any allow-hosts configuration option in your buildout ... you can do a bin/buildout annotate to expose all config options and where they are configured and check if there is a host constrain for downloading packages ...