Обсуждение: More RHEL 6 build issues
Hi, I thought we fixed it at some point, but I'm recently getting this again: in the web/config.py, I changed MINIFY_PAGE = True to False. Still getting sphinx-1.0-build -b html -d _build/doctrees . _build/html Making output directory... Running Sphinx v1.0.8 Exception occurred: File "/usr/lib/python2.6/site-packages/pgadmin4-web/flask_htmlmin.py", line 1, in <module> from htmlmin.mainimport minify ImportError: No module named main Any hints? Regards, -- Devrim Gündüz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
On Tue, Jul 11, 2017 at 11:21 AM, Devrim Gündüz <devrim@gunduz.org> wrote:
--
Hi,
I thought we fixed it at some point, but I'm recently getting this again:
in the web/config.py, I changed
MINIFY_PAGE = True
to False.
Never modify config.py! You should be using config_distro.py.
Still getting
sphinx-1.0-build -b html -d _build/doctrees . _build/html
Making output directory...
Running Sphinx v1.0.8
Exception occurred:
File "/usr/lib/python2.6/site-packages/pgadmin4-web/flask_htmlmin .py", line 1, in <module>
from htmlmin.main import minify
ImportError: No module named main
It was fixed in the code:
# HTMLMIN doesn't work with Python 2.6.
if not config.DEBUG and sys.version_info >= (2,7):
HTMLMIN(app)
Though, we do have an unconditional import (both in web/pgadmin/__init__.py).
Does the app run?
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Hi, On Tue, 2017-07-11 at 11:44 +0100, Dave Page wrote: > Never modify config.py! You should be using config_distro.py. Err, this was what you asked me to do when we had similar issues before. I apply these patches to RHEL 6: https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=rpm/redhat/master/pgadmin4-v1/master/pgadmin4-rhel6-sphinx.patch;h=1fb17567e013ad339223581b60069814b8107f17;hb=refs/heads/master https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f=rpm/redhat/master/pgadmin4-v1/master/pgadmin4-rhel6-htmlminify.patch;h=14ea8989b6b82fc7e1c1605019fa316d624cb59e;hb=refs/heads/master We do this *before* building the package. Isn't that ok? Regards, -- Devrim Gündüz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Hi, Sorry, I missed this part: On Tue, 2017-07-11 at 11:44 +0100, Dave Page wrote: > It was fixed in the code: > > # HTMLMIN doesn't work with Python 2.6. > if not config.DEBUG and sys.version_info >= (2,7): > HTMLMIN(app) > > Though, we do have an unconditional import (both in > web/pgadmin/__init__.py). > > Does the app run? We even cannot build it. Regards, -- Devrim Gündüz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
On Tue, Jul 11, 2017 at 12:07 PM, Devrim Gündüz <devrim@gunduz.org> wrote:
Hi,
On Tue, 2017-07-11 at 11:44 +0100, Dave Page wrote:
> Never modify config.py! You should be using config_distro.py.
Err, this was what you asked me to do when we had similar issues before. I
apply these patches to RHEL 6:
https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f= rpm/redhat/master/pgadmin4-v1/ master/pgadmin4-rhel6-sphinx. patch;h= 1fb17567e013ad339223581b600698 14b8107f17;hb=refs/heads/ master
https://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob;f= rpm/redhat/master/pgadmin4-v1/ master/pgadmin4-rhel6- htmlminify.patch;h= 14ea8989b6b82fc7e1c1605019fa31 6d624cb59e;hb=refs/heads/ master
We do this *before* building the package. Isn't that ok?
Pretty sure I said to do that in config_distro.py. We never want to modify config.py.
In any case, those changes shouldn't be required any more.
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Tue, Jul 11, 2017 at 12:09 PM, Devrim Gündüz <devrim@gunduz.org> wrote:
--
Hi,
Sorry, I missed this part:
On Tue, 2017-07-11 at 11:44 +0100, Dave Page wrote:
> It was fixed in the code:
>
> # HTMLMIN doesn't work with Python 2.6.
> if not config.DEBUG and sys.version_info >= (2,7):
> HTMLMIN(app)
>
> Though, we do have an unconditional import (both in
> web/pgadmin/__init__.py).
>
> Does the app run?
We even cannot build it.
I just tried it on CentOS 6 here, and the app runs, but the docs don't build. That's weird, considering https://jenkins.pgadmin.org/job/pgadmin4-master-python26/lastSuccessfulBuild/.
Anyway; the attached patch fixes the issue for me. I wonder if this is some CentOS weirdness...
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Вложения
Hi Dave, On Tue, 2017-07-11 at 12:26 +0100, Dave Page wrote: > Anyway; the attached patch fixes the issue for me. I wonder if this is some > CentOS weirdness... Thanks, that fixed this issue. We have now another one: Exception occurred: File "/usr/lib/python2.6/site-packages/pgadmin4-web/flask_sqlalchemy/__init__.py", line 25, in <module> from sqlalchemy import orm, event, inspect ImportError: cannot import name event Regards, -- Devrim Gündüz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR
Hi
--
On Tue, Jul 11, 2017 at 5:40 PM, Devrim Gündüz <devrim@gunduz.org> wrote:
Hi Dave,
On Tue, 2017-07-11 at 12:26 +0100, Dave Page wrote:
> Anyway; the attached patch fixes the issue for me. I wonder if this is some
> CentOS weirdness...
Thanks, that fixed this issue. We have now another one:
Exception occurred:
File "/usr/lib/python2.6/site-packages/pgadmin4-web/flask_ sqlalchemy/__init__.py", line 25, in <module>
from sqlalchemy import orm, event, inspect
ImportError: cannot import name event
I have no idea what would cause that. Are you using a version of any Python component that differs from whats in requirements.txt?
The reason I ask is that we have automated regression tests on Python 2.6, and they're passing just fine - so whatever you do on CentOS 6 should as well.
You can see from the test output at https://jenkins.pgadmin.org/job/pgadmin4-master-python26/lastSuccessfulBuild/consoleText what packages are being used (the installations are fairly near the top).
Note that the second PIP run (which starts with pyperclip) is for the components in web/regression/requirements.txt, which are only required to run the regression tests.
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company