Re: PIP Package Building for pgAdmin4
От | Dave Page |
---|---|
Тема | Re: PIP Package Building for pgAdmin4 |
Дата | |
Msg-id | CA+OCxoyA_w9T6cQMJ3uSPMECQqqbpSuTQ_36OP+TwNt-M=AB3w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PIP Package Building for pgAdmin4 (Muhammad Aqeel <muhammad.aqeel@enterprisedb.com>) |
Список | pgadmin-hackers |
Hi On Tue, Mar 15, 2016 at 6:23 AM, Muhammad Aqeel <muhammad.aqeel@enterprisedb.com> wrote: > Hi Dave, > > On Mon, Mar 14, 2016 at 7:06 PM, Dave Page <dpage@pgadmin.org> wrote: >> >> Hi >> >> On Mon, Mar 14, 2016 at 1:46 PM, Muhammad Aqeel >> <muhammad.aqeel@enterprisedb.com> wrote: >> > Hi Dave, >> > >> > I tested the build after your commit. There were minor bugs in your >> > changes >> > which prevented the packaging of pgadmin4 sources. >> > >> > - It needed a space after * in recursive include statement of >> > manifest.in >> > - \n is not interpreted as new line. >> > >> > I fixed both issues in attached patch and tested the build. It is >> > working >> > fine now and pgadmin4.egg-info/SOURCES.txt showing no .pyc file and >> > pgadmin4.db file in it. >> >> Weird - as discussed, I tested it thoroughly before committing and it >> works fine. > > > PFA the new patch which contains following changes. > > - It just replaces the @echo to @printf in your changed line to fix the > issue. I tested it on both Linux and OSX. It is working fine. Looks good to me - committed. > - In your commit you had changed 'PGADMIN_DIST = dist' to 'PGADMIN_DIST = > build'. dist directory is generated by pip setuptools to have generated > wheel file so it is needed. I made it again 'PGADMIN_DIST = dist'. If you > don't want to remove it in clean-pip target then you can remove the rm > command from clean-pip target. Urgh. It might be nice if we can put all those directories in one place, like pip-temp/ or something more sensible. Either way, it's no big issue. > - In case user runs make twice without cleaning the source it was copying > the web directory to existing pgadmin4 source directory. I fixed this issue > too. OK, thanks. >> Testing with this patch though, I see the original problem (and also, >> so warnings - can you check them please)? >> >> (pgadmin4)piranha:pgAdmin4 dpage$ git reset --hard >> HEAD is now at dc64160 Add a top level Makefile with a target and >> appropriate Python stuff to build a PIP package of the web code. >> (pgadmin4)piranha:pgAdmin4 dpage$ make pip 1> /dev/null >> >> /Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/setuptools/dist.py:285: >> UserWarning: Normalizing '1.0.0-dev' to '1.0.0.dev0' >> normalized_version, > > > It is an issue with PEP440 which interprets version as integer and if sees > any string in it, it tries to normalise it. Here is the link which explains > it. > > https://bitbucket.org/pypa/setuptools/issues/302/setuptools-8-strips-leading-zeros-in > > It is coming with Python 2.6 only. With Python 2.7 and above it is not > there. Weird - I have 2.7... >> package init file 'pgadmin4/__init__.py' not found (or not a regular file) > > > This is because in web directory we don't have __init__.py file. > >> >> warning: manifest_maker: standard file 'setup_pip.py' not found > > > setuptools by default look for setup_pip.py file in current directory. Since > we placed this file in pkg/pip (according to your suggestion) this warning > is coming. > >> >> >> warning: build_py: byte-compiling is disabled, skipping. >> >> warning: install_lib: byte-compiling is disabled, skipping. > > > I have not faced this issue but following link suggests a solution for it. > > http://stackoverflow.com/questions/7194299/cannot-create-new-virtualenv-in-lion > > It says "Setting export VIRTUALENV_USE_DISTRIBUTE=1 fixed the problem." Oh - that's probably because I have "export PYTHONDONTWRITEBYTECODE=1" in my profile. No worries - thanks! >> (pgadmin4)piranha:pgAdmin4 dpage$ grep pgadmin4.db >> pgadmin4.egg-info/SOURCES.txt |wc -l >> 0 >> (pgadmin4)piranha:pgAdmin4 dpage$ grep pyc pgadmin4.egg-info/SOURCES.txt >> |wc -l >> 0 >> (pgadmin4)piranha:pgAdmin4 dpage$ git apply >> ~/Downloads/manifest_bug_fix.patch >> (pgadmin4)piranha:pgAdmin4 dpage$ make pip 1> /dev/null >> >> /Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/setuptools/dist.py:285: >> UserWarning: Normalizing '1.0.0-dev' to '1.0.0.dev0' >> normalized_version, >> package init file 'pgadmin4/__init__.py' not found (or not a regular file) >> warning: manifest_maker: standard file 'setup_pip.py' not found >> >> warning: build_py: byte-compiling is disabled, skipping. >> >> warning: install_lib: byte-compiling is disabled, skipping. >> >> (pgadmin4)piranha:pgAdmin4 dpage$ grep pgadmin4.db >> pgadmin4.egg-info/SOURCES.txt |wc -l >> 1 >> (pgadmin4)piranha:pgAdmin4 dpage$ grep pyc pgadmin4.egg-info/SOURCES.txt >> |wc -l >> 84 >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company > > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgadmin-hackers по дате отправления:
Предыдущее
От: Dave PageДата:
Сообщение: pgAdmin 4 commit: Fix PIP packaging code so it works nicely on Linux an
Следующее
От: Dave PageДата:
Сообщение: pgAdmin 4 commit: Subnode collection layout improvements, with addition