-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate absolute paths #5
Comments
-1 |
I'm not sure I understand. Which part do you mean? The The proposed extraction of Regarding the absolute paths: AFAICS the projects generated are already "not-moveable". Or do I get something wrong? There are already a couple of The intention behind was simply to offer some help after reading the comment on hooks/post_gen_project.py#L1f:
|
You are right. |
Now I'm really confused. Which other cookie cutter do you mean? I'm here in the "wrong movie"? |
yes, I am confused and been in the wrong movie. Sorry. m( |
ok, all fine, I need more coffee in the morning. |
When creating a structure like the following (see below) we must run
cookiecutter-zope-instance
in theparts
directory. Having previously runmkzeoinstance
from${PLONE_HOME}
which creates theparts
directory.Some paths (
CHAMELEON_CACHE
,args
in the sectionshandler_accesslog
andhandler_eventlog
) are generated relative to the directorycookiecutter-zope-instance
was called from from.Starting
runwsgi
with the generated${PLONE_HOME}/parts/client/etc/zope.ini
from another directory thanparts
will not work.I'd like to propose the following two steps as a solution:
ABSPATH()
toargs
in the sectionshandler_accesslog
andhandler_eventlog
:ABSPATH()
toCHAMELEON_CACHE
.This is not trivial since the template zope.conf assumes a dictionary and is not aware of its items types.
On the other side, adding
ABSPATH()
toCHAMELEON_CACHE
incookiecutter.json
is not a solution because this variable is used inpost generation step 3: generate directories
inpost_gen_project.py
.post generation step 3
also assumes thatcookiecutter.environment['CHAMELEON_CACHE']
exists to generate the cache's directory.One could then remove this variable from the
environment
dictionary incookiecutter.json
and adding the
CHAMELEON_CACHE
as extra variable. This way the variable could be inserted in the template withABSPATH
. The conditionalif cookiecutter.environmentt
would be redundant.This way we could start
runwsgi
from any directory.The text was updated successfully, but these errors were encountered: