famsaraiva
(Fred Saraiva)
1
Hi there,
i'm trying to define mount points in plone 5.2. I'm newbie in plone 5.2. So, i added to buildout.cfg:
[filestorage]
recipe=collective.recipe.filestorage
zopes = instance
blob-storage = ${buildout:var-dir}/%(fs_part_name)s/blobstorage
location = ${buildout:var-dir}/%(fs_part_name)s/filestorage/Data.fs
zodb-container-class = OFS.Folder.Folder
parts =
my-fs
But, when i run bin/buildout:
While:
Installing.
Getting section filestorage.
Initializing section filestorage.
Loading zc.buildout recipe entry collective.recipe.filestorage:default.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
[...]
File "/opt/plone/Portal/zeocluster/lib/python3.8/site-packages/pkg_resources/init.py", line 2449, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/opt/plone/Portal/buildout-cache/eggs/collective.recipe.filestorage-0.6-py3.8.egg/collective/recipe/filestorage/init.py", line 22
raise UserError, '[collective.recipe.filestorage] "%s" part specifies nonexistant zeo part "%s".' % (name, self.zeo_part)
^
SyntaxError: invalid syntax
I appreciate any help.
Thanks
-Fred Saraiva
dinandev
(Dinandev)
2
A workaround could be:
2to3 -w /opt/plone/Portal/buildout-cache/eggs/collective.recipe.filestorage-0.6-py3.8.egg/collective/recipe/filestorage/init.py
1letter
(Jan)
3
Use the Python3 Branch of the Repro in your Buildout
famsaraiva
(Fred Saraiva)
4
Thanks for your answer. But, i'm a newbie. So, could you give me more instructions or show me where i may get it?
Thanks a lot!
Fred
1letter
(Jan)
5
in your buildout.cfg exists a section with label source, this section should contain the checkout of the python3 branch
[sources]
collective.recipe.filestorage = git git@github.com:collective/collective.recipe.filestorage.git branch=python3
or if you checkout the package in your src directory, use this
[sources]
collective.recipe.filestorage = fs collective.recipe.filestorage
if i remember right, filestorage
should be the first entry in the parts
section, so much for the theory
Example:
> mkdir ./sample
> cd sample
> python3 -m venv .
> source bin/activate
> touch requirements.txt
> touch buildout.cfg
edit the files:
# requirements.txt
setuptools==42.0.2
zc.buildout==2.13.3
wheel
# buidlout.cfg
[buildout]
index = https://pypi.org/simple/
extensions = mr.developer
develop =
sources = sources
auto-checkout = *
always-checkout = force
site1 = mp-my-site1
site2 = mp-my-site2
parts =
filestorage
instance
[filestorage]
recipe = collective.recipe.filestorage
parts =
${buildout:site1}
${buildout:site2}
location = ${buildout:directory}/var/%(fs_part_name)s/filestorage/Data.fs
blob-storage = ${buildout:directory}/var/%(fs_part_name)s/blobstorage
[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs =
Plone
[sources]
collective.recipe.filestorage = git git@github.com:collective/collective.recipe.filestorage.git branch=python3
> bin/pip install -r requirements.txt
> bin/buildout
> bin/instance fg
Now, you can add the two created mountpoints in the ZMI.