Skip to content

Commit

Permalink
[fc] Repository: plone.recipe.zeoserver
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2020-08-13T08:20:17+05:30
Author: Fazal S (fazalsulaiman) <fazal.sulaiman@gmail.com>
Commit: plone/plone.recipe.zeoserver@d05c5ee

Fix for "ValueError: Attempted relative import in non-package" - In windows system

Files changed:
A news/42.bugfix
M src/plone/recipe/zeoserver/runzeo.bat
M src/plone/recipe/zeoserver/zeoservice.py.in
Repository: plone.recipe.zeoserver

Branch: refs/heads/master
Date: 2020-08-13T14:13:03+05:30
Author: Fazal Sulaiman (fazalsulaiman) <fazal.sulaiman@gmail.com>
Commit: plone/plone.recipe.zeoserver@abb097f

Merge pull request #43 from fazalsulaiman/master

Fix for "ValueError: Attempted relative import in non-package" - In windows system

Files changed:
A news/42.bugfix
M src/plone/recipe/zeoserver/runzeo.bat
M src/plone/recipe/zeoserver/zeoservice.py.in
  • Loading branch information
fazalsulaiman committed Aug 13, 2020
1 parent 4c6c071 commit 53e6900
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions last_commit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@ Repository: plone.recipe.zeoserver


Branch: refs/heads/master
Date: 2020-08-11T13:30:52+05:30
Author: Fazal Sulaiman (fazalsulaiman) <fazal.sulaiman@gmail.com>
Commit: https://github.com/plone/plone.recipe.zeoserver/commit/e7a6cc57661a534e661ab351760adec7a4fb2178
Date: 2020-08-13T08:20:17+05:30
Author: Fazal S (fazalsulaiman) <fazal.sulaiman@gmail.com>
Commit: https://github.com/plone/plone.recipe.zeoserver/commit/d05c5ee99d683ce89ec1a429ba4477a4555f12bf

Removing ZODB3_HOME from runzeo.bat and zeoservice.py.in files
Fix for "ValueError: Attempted relative import in non-package" - In windows system

Files changed:
A news/41.bugfix
A news/42.bugfix
M src/plone/recipe/zeoserver/runzeo.bat
M src/plone/recipe/zeoserver/zeoservice.py.in

b'diff --git a/news/41.bugfix b/news/41.bugfix\nnew file mode 100644\nindex 0000000..aad1cfa\n--- /dev/null\n+++ b/news/41.bugfix\n@@ -0,0 +1 @@\n+Removing ZODB3_HOME variable from runzeo.bat and zeoservice.py.in files, Fix for windows machine\ndiff --git a/src/plone/recipe/zeoserver/runzeo.bat b/src/plone/recipe/zeoserver/runzeo.bat\nindex d4b3432..cef0f6d 100644\n--- a/src/plone/recipe/zeoserver/runzeo.bat\n+++ b/src/plone/recipe/zeoserver/runzeo.bat\n@@ -1,7 +1,7 @@\n @rem %(PACKAGE)s instance start script\n @set PYTHON=%(PYTHON)s\n-@set ZODB3_HOME=%(zodb3_home)s\n+@set ZODB_HOME=%(zodb3_home)s\n @set CONFIG_FILE=%(INSTANCE_HOME)s/etc/%(PACKAGE)s.conf\n @set PYTHONPATH=%(PYTHONPATH)s\n-@set RUNZEO=%%ZODB3_HOME%%/ZEO/runzeo.py\n+@set RUNZEO=%%ZODB_HOME%%/ZEO/runzeo.py\n "%%PYTHON%%" "%%RUNZEO%%" -C "%%CONFIG_FILE%%" %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9\ndiff --git a/src/plone/recipe/zeoserver/zeoservice.py.in b/src/plone/recipe/zeoserver/zeoservice.py.in\nindex 5ddd049..d2ad0e1 100644\n--- a/src/plone/recipe/zeoserver/zeoservice.py.in\n+++ b/src/plone/recipe/zeoserver/zeoservice.py.in\n@@ -70,11 +70,11 @@ import sys, os\n # these are replacements from mkzopeinstance\n PYTHON = r\'%(PYTHON)s\'\n INSTANCE_HOME = r\'%(INSTANCE_HOME)s\'\n-ZODB3_HOME = r\'%(zodb3_home)s\'\n+ZODB_HOME = r\'%(zodb_home)s\'\n PYTHONPATH = r\'%(PYTHONPATH)s\'\n PID_FILENAME = r\'%(PID_FILENAME)s\'\n \n-ZEO_RUN = r\'%%s\\\\ZEO\\\\runzeo.py\' %% ZODB3_HOME\n+ZEO_RUN = r\'%%s\\\\ZEO\\\\runzeo.py\' %% ZODB_HOME\n CONFIG_FILE= os.path.join(INSTANCE_HOME, \'etc\', \'zeo.conf\')\n \n import win32service\n'
b'diff --git a/news/42.bugfix b/news/42.bugfix\nnew file mode 100644\nindex 0000000..965bb0d\n--- /dev/null\n+++ b/news/42.bugfix\n@@ -0,0 +1 @@\n+fix for "ValueError: Attempted relative import in non-package" - In windows build\ndiff --git a/src/plone/recipe/zeoserver/runzeo.bat b/src/plone/recipe/zeoserver/runzeo.bat\nindex cef0f6d..908d7b2 100644\n--- a/src/plone/recipe/zeoserver/runzeo.bat\n+++ b/src/plone/recipe/zeoserver/runzeo.bat\n@@ -3,5 +3,5 @@\n @set ZODB_HOME=%(zodb3_home)s\n @set CONFIG_FILE=%(INSTANCE_HOME)s/etc/%(PACKAGE)s.conf\n @set PYTHONPATH=%(PYTHONPATH)s\n-@set RUNZEO=%%ZODB_HOME%%/ZEO/runzeo.py\n-"%%PYTHON%%" "%%RUNZEO%%" -C "%%CONFIG_FILE%%" %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9\n+@set RUNZEO=ZEO.runzeo\n+"%%PYTHON%%" -m "%%RUNZEO%%" -C "%%CONFIG_FILE%%" %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9\ndiff --git a/src/plone/recipe/zeoserver/zeoservice.py.in b/src/plone/recipe/zeoserver/zeoservice.py.in\nindex d2ad0e1..5699443 100644\n--- a/src/plone/recipe/zeoserver/zeoservice.py.in\n+++ b/src/plone/recipe/zeoserver/zeoservice.py.in\n@@ -74,7 +74,7 @@ ZODB_HOME = r\'%(zodb_home)s\'\n PYTHONPATH = r\'%(PYTHONPATH)s\'\n PID_FILENAME = r\'%(PID_FILENAME)s\'\n \n-ZEO_RUN = r\'%%s\\\\ZEO\\\\runzeo.py\' %% ZODB_HOME\n+ZEO_RUN = r\'ZEO.runzeo\'\n CONFIG_FILE= os.path.join(INSTANCE_HOME, \'etc\', \'zeo.conf\')\n \n import win32service\n@@ -105,7 +105,7 @@ class InstanceService(Service):\n _exe_name_ = PYTHONSERVICE_EXE\n \n process_runner = PYTHON\n- process_args = \'"%%s" -C "%%s"\' %% (ZEO_RUN, CONFIG_FILE)\n+ process_args = \'-m "%%s" -C "%%s"\' %% (ZEO_RUN, CONFIG_FILE)\n def __init__(self, args):\n self.setReg(\'command\', self.process_runner + " " + self.process_args)\n self.setReg(\'pid_filename\', PID_FILENAME)\n'

Repository: plone.recipe.zeoserver


Branch: refs/heads/master
Date: 2020-08-13T07:55:08+05:30
Date: 2020-08-13T14:13:03+05:30
Author: Fazal Sulaiman (fazalsulaiman) <fazal.sulaiman@gmail.com>
Commit: https://github.com/plone/plone.recipe.zeoserver/commit/26628503cc780e68838844132ced0209bf857720
Commit: https://github.com/plone/plone.recipe.zeoserver/commit/abb097f42b59c4e85f042e2aba0c13ec3b711726

Merge pull request #41 from fazalsulaiman/master
Merge pull request #43 from fazalsulaiman/master

Removing ZODB3_HOME from runzeo.bat and zeoservice.py.in files
Fix for "ValueError: Attempted relative import in non-package" - In windows system

Files changed:
A news/41.bugfix
A news/42.bugfix
M src/plone/recipe/zeoserver/runzeo.bat
M src/plone/recipe/zeoserver/zeoservice.py.in

b'diff --git a/news/41.bugfix b/news/41.bugfix\nnew file mode 100644\nindex 0000000..aad1cfa\n--- /dev/null\n+++ b/news/41.bugfix\n@@ -0,0 +1 @@\n+Removing ZODB3_HOME variable from runzeo.bat and zeoservice.py.in files, Fix for windows machine\ndiff --git a/src/plone/recipe/zeoserver/runzeo.bat b/src/plone/recipe/zeoserver/runzeo.bat\nindex d4b3432..cef0f6d 100644\n--- a/src/plone/recipe/zeoserver/runzeo.bat\n+++ b/src/plone/recipe/zeoserver/runzeo.bat\n@@ -1,7 +1,7 @@\n @rem %(PACKAGE)s instance start script\n @set PYTHON=%(PYTHON)s\n-@set ZODB3_HOME=%(zodb3_home)s\n+@set ZODB_HOME=%(zodb3_home)s\n @set CONFIG_FILE=%(INSTANCE_HOME)s/etc/%(PACKAGE)s.conf\n @set PYTHONPATH=%(PYTHONPATH)s\n-@set RUNZEO=%%ZODB3_HOME%%/ZEO/runzeo.py\n+@set RUNZEO=%%ZODB_HOME%%/ZEO/runzeo.py\n "%%PYTHON%%" "%%RUNZEO%%" -C "%%CONFIG_FILE%%" %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9\ndiff --git a/src/plone/recipe/zeoserver/zeoservice.py.in b/src/plone/recipe/zeoserver/zeoservice.py.in\nindex 5ddd049..d2ad0e1 100644\n--- a/src/plone/recipe/zeoserver/zeoservice.py.in\n+++ b/src/plone/recipe/zeoserver/zeoservice.py.in\n@@ -70,11 +70,11 @@ import sys, os\n # these are replacements from mkzopeinstance\n PYTHON = r\'%(PYTHON)s\'\n INSTANCE_HOME = r\'%(INSTANCE_HOME)s\'\n-ZODB3_HOME = r\'%(zodb3_home)s\'\n+ZODB_HOME = r\'%(zodb_home)s\'\n PYTHONPATH = r\'%(PYTHONPATH)s\'\n PID_FILENAME = r\'%(PID_FILENAME)s\'\n \n-ZEO_RUN = r\'%%s\\\\ZEO\\\\runzeo.py\' %% ZODB3_HOME\n+ZEO_RUN = r\'%%s\\\\ZEO\\\\runzeo.py\' %% ZODB_HOME\n CONFIG_FILE= os.path.join(INSTANCE_HOME, \'etc\', \'zeo.conf\')\n \n import win32service\n'
b'diff --git a/news/42.bugfix b/news/42.bugfix\nnew file mode 100644\nindex 0000000..965bb0d\n--- /dev/null\n+++ b/news/42.bugfix\n@@ -0,0 +1 @@\n+fix for "ValueError: Attempted relative import in non-package" - In windows build\ndiff --git a/src/plone/recipe/zeoserver/runzeo.bat b/src/plone/recipe/zeoserver/runzeo.bat\nindex cef0f6d..908d7b2 100644\n--- a/src/plone/recipe/zeoserver/runzeo.bat\n+++ b/src/plone/recipe/zeoserver/runzeo.bat\n@@ -3,5 +3,5 @@\n @set ZODB_HOME=%(zodb3_home)s\n @set CONFIG_FILE=%(INSTANCE_HOME)s/etc/%(PACKAGE)s.conf\n @set PYTHONPATH=%(PYTHONPATH)s\n-@set RUNZEO=%%ZODB_HOME%%/ZEO/runzeo.py\n-"%%PYTHON%%" "%%RUNZEO%%" -C "%%CONFIG_FILE%%" %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9\n+@set RUNZEO=ZEO.runzeo\n+"%%PYTHON%%" -m "%%RUNZEO%%" -C "%%CONFIG_FILE%%" %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9\ndiff --git a/src/plone/recipe/zeoserver/zeoservice.py.in b/src/plone/recipe/zeoserver/zeoservice.py.in\nindex d2ad0e1..5699443 100644\n--- a/src/plone/recipe/zeoserver/zeoservice.py.in\n+++ b/src/plone/recipe/zeoserver/zeoservice.py.in\n@@ -74,7 +74,7 @@ ZODB_HOME = r\'%(zodb_home)s\'\n PYTHONPATH = r\'%(PYTHONPATH)s\'\n PID_FILENAME = r\'%(PID_FILENAME)s\'\n \n-ZEO_RUN = r\'%%s\\\\ZEO\\\\runzeo.py\' %% ZODB_HOME\n+ZEO_RUN = r\'ZEO.runzeo\'\n CONFIG_FILE= os.path.join(INSTANCE_HOME, \'etc\', \'zeo.conf\')\n \n import win32service\n@@ -105,7 +105,7 @@ class InstanceService(Service):\n _exe_name_ = PYTHONSERVICE_EXE\n \n process_runner = PYTHON\n- process_args = \'"%%s" -C "%%s"\' %% (ZEO_RUN, CONFIG_FILE)\n+ process_args = \'-m "%%s" -C "%%s"\' %% (ZEO_RUN, CONFIG_FILE)\n def __init__(self, args):\n self.setReg(\'command\', self.process_runner + " " + self.process_args)\n self.setReg(\'pid_filename\', PID_FILENAME)\n'

0 comments on commit 53e6900

Please sign in to comment.