Re: RFC: default python installlation directories
On 2015-11-29 23:30, Jan Rękorajski wrote: The change broke icedove/iceweasel build, looks like some virtualenv paths confusion: http://buildlogs.pld-linux.org//index.php?dist=th&arch=x86_64&ok=0&name=icedove&id=3c8b77d4-5fec-47a0-ae3d-dd2a575890c2&action=tail Yes, I have seen that. Actually it broke virtualenv/pip: $ virtualenv xxx New python executable in xxx/bin/python2 Not overwriting existing python script xxx/bin/python (you must use xxx/bin/python2) [...] OSError: [Errno 13] Permission denied: '/usr/local/share/python2.7' That is strange. Though, maybe virtualenv overrides sys.prefix and then uses that for installation. In such case I would have to change the python patch a bit. Does it work in Python 3 correctly? Things are a bit different there. I will investigate this further in the evening. Jacek ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: RFC: default python installlation directories
On Sun, 29 Nov 2015, Jan Rękorajski wrote: > On Wed, 25 Nov 2015, Jacek Konieczny wrote: > > > On 2015-11-22 18:52, Jan Rękorajski wrote: > > > On Sun, 22 Nov 2015, Jacek Konieczny wrote: > > >> > > >> I suggest patching python, python3 and, if neccessary, other packages, > > >> so distutils/setuptools/pip would install Python modules to /usr/local > > >> by default – like autoconf configure scripts do. Python would look for > > >> modues in /usr/local first and then in /usr. > > > > > > Makes sense. Go ahead and do it. > > > > Done. > > > > New RPM build macros added: > > %py_build > > %py_install > > %py3_build > > %py3_install > > > > Just %setup_py and %setup_py3 wouldn't do as we cannot change options > > order: > > 'setup.py --prefix=/usr install' is wrong, > > 'setup.py install --prefix=/usr' is ok. > > > > I have updated the python template specs and a few packages. Things > > seems to work well. Including distutils, setuptools and pip. > > > > If there are no objections, I may try a mass-update of python-* specs > > tomorrow. > > The change broke icedove/iceweasel build, looks like some virtualenv > paths confusion: > > http://buildlogs.pld-linux.org//index.php?dist=th&arch=x86_64&ok=0&name=icedove&id=3c8b77d4-5fec-47a0-ae3d-dd2a575890c2&action=tail Actually it broke virtualenv/pip: $ virtualenv xxx New python executable in xxx/bin/python2 Not overwriting existing python script xxx/bin/python (you must use xxx/bin/python2) Installing setuptools, pip, wheel... Complete output from command /home/users/baggins/8/xxx/bin/python2 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel: Ignoring indexes: https://pypi.python.org/simple Collecting setuptools Collecting pip Collecting wheel Installing collected packages: setuptools, pip, wheel Exception: Traceback (most recent call last): File "/usr/share/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/basecommand.py", line 211, in main status = self.run(options, args) File "/usr/share/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/commands/install.py", line 311, in run root=options.root_path, File "/usr/share/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/req/req_set.py", line 646, in install **kwargs File "/usr/share/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/req/req_install.py", line 803, in install self.move_wheel_files(self.source_dir, root=root) File "/usr/share/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/req/req_install.py", line 998, in move_wheel_files isolated=self.isolated, File "/usr/share/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/wheel.py", line 339, in move_wheel_files clobber(source, lib_dir, True) File "/usr/share/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/wheel.py", line 282, in clobber ensure_dir(dest) # common for the 'include' path File "/usr/share/python2.7/site-packages/virtualenv_support/pip-7.1.2-py2.py3-none-any.whl/pip/utils/__init__.py", line 71, in ensure_dir os.makedirs(path) File "/home/users/baggins/8/xxx/share/python2.7/os.py", line 150, in makedirs makedirs(head, mode) File "/home/users/baggins/8/xxx/share/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/usr/local/share/python2.7' ...Installing setuptools, pip, wheel...done. Traceback (most recent call last): File "/usr/bin/virtualenv", line 9, in load_entry_point('virtualenv==13.1.2', 'console_scripts', 'virtualenv')() File "/usr/share/python2.7/site-packages/virtualenv.py", line 896, in main symlink=options.symlink) File "/usr/share/python2.7/site-packages/virtualenv.py", line 1068, in create_environment install_wheel(to_install, py_executable, search_dirs) File "/usr/share/python2.7/site-packages/virtualenv.py", line 1033, in install_wheel 'PIP_NO_INDEX': '1' File "/usr/share/python2.7/site-packages/virtualenv.py", line 974, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /home/users/baggins/8/xxx/bin/python2 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel failed with error code 2 -- Jan Rękorajski| PLD/Linux SysAdm | bagginspld-linux.org | http://www.pld-linux.org/ ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: RFC: default python installlation directories
On Wed, 25 Nov 2015, Jacek Konieczny wrote: > On 2015-11-22 18:52, Jan Rękorajski wrote: > > On Sun, 22 Nov 2015, Jacek Konieczny wrote: > >> > >> I suggest patching python, python3 and, if neccessary, other packages, > >> so distutils/setuptools/pip would install Python modules to /usr/local > >> by default – like autoconf configure scripts do. Python would look for > >> modues in /usr/local first and then in /usr. > > > > Makes sense. Go ahead and do it. > > Done. > > New RPM build macros added: > %py_build > %py_install > %py3_build > %py3_install > > Just %setup_py and %setup_py3 wouldn't do as we cannot change options > order: > 'setup.py --prefix=/usr install' is wrong, > 'setup.py install --prefix=/usr' is ok. > > I have updated the python template specs and a few packages. Things > seems to work well. Including distutils, setuptools and pip. > > If there are no objections, I may try a mass-update of python-* specs > tomorrow. The change broke icedove/iceweasel build, looks like some virtualenv paths confusion: http://buildlogs.pld-linux.org//index.php?dist=th&arch=x86_64&ok=0&name=icedove&id=3c8b77d4-5fec-47a0-ae3d-dd2a575890c2&action=tail -- Jan Rękorajski| PLD/Linux SysAdm | bagginspld-linux.org | http://www.pld-linux.org/ ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: RFC: default python installlation directories
On 2015-11-29 10:51, Elan Ruusamäe wrote: > looks like python egg dependency generator is broken, none provided: > > ➔ rpm -q --provides python-defusedxml > python-defusedxml = 0.4.1-7 Already fixed in rpm. > https://srcbuilder.pld-linux.org/~pldth/qa.php?q=main-ready-test > currently 30 matches for missing "pythonegg", it will probably grow as > the queue is big I will rebuild the affected packages when this batch is done. > ps: should use bigger than default pri=2 when doing mass builds, so > normal builds get built first. I will remember the next time. Jacek ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: RFC: default python installlation directories
On 2015-11-29 10:59, Elan Ruusamäe wrote: > On 29.11.2015 11:51, Elan Ruusamäe wrote: >> On 27.11.2015 13:06, Jacek Konieczny wrote: >>> On 2015-11-27 10:28, Elan Ruusamäe wrote: On 25.11.2015 22:19, Jacek Konieczny wrote: > If there are no objections, I may try a mass-update of python-* specs > tomorrow. > > btw, why was mass rebuild necessary? You are right, it was not. But there is a good side: we caught some problems introduced with recent python changes. Jacek ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: RFC: default python installlation directories
On 29.11.2015 11:51, Elan Ruusamäe wrote: On 27.11.2015 13:06, Jacek Konieczny wrote: On 2015-11-27 10:28, Elan Ruusamäe wrote: On 25.11.2015 22:19, Jacek Konieczny wrote: If there are no objections, I may try a mass-update of python-* specs tomorrow. btw, why was mass rebuild necessary? binary wise nothing changes in already built packages? just mass fixing spec does not need to follow rebuild? -- glen ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: RFC: default python installlation directories
On 27.11.2015 13:06, Jacek Konieczny wrote: On 2015-11-27 10:28, Elan Ruusamäe wrote: On 25.11.2015 22:19, Jacek Konieczny wrote: If there are no objections, I may try a mass-update of python-* specs tomorrow. more like in the weekend ;) looks like python egg dependency generator is broken, none provided: ➔ rpm -q --provides python-defusedxml python-defusedxml = 0.4.1-7 https://srcbuilder.pld-linux.org/~pldth/qa.php?q=main-ready-test currently 30 matches for missing "pythonegg", it will probably grow as the queue is big ps: should use bigger than default pri=2 when doing mass builds, so normal builds get built first. -- glen ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: [packages/python-setuptools] adapter, use realtive symlink
On 28.11.2015 17:36, Jacek Konieczny wrote: On 2015-11-28 15:16, glen wrote: commit b6cbc91d94c8fad86e0ad1b271429f6772218700 Author: Elan Ruusamäe Date: Sat Nov 28 16:16:47 2015 +0200 adapter, use realtive symlink [...] -ln -f $RPM_BUILD_ROOT/%{_bindir}/easy_install-%{py3_ver} $RPM_BUILD_ROOT/%{_bindir}/easy_install +ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install %else -ln -f $RPM_BUILD_ROOT/%{_bindir}/easy_install-%{py_ver} $RPM_BUILD_ROOT/%{_bindir}/easy_install +ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install %endif Why symlink? There was a hard-link for purpose. No need for extra redirection. And there are no relative hard links. symlink is easier to figure out what the file is, py2 or py3 version. similarily other stuff is symlinked as well when it comes for generic name vs versioned name. even python itself: ls -l /usr/bin/python* lrwxrwxrwx 1 root root7 22. nov 09:39 /usr/bin/python -> python2* lrwxrwxrwx 1 root root 14 22. nov 09:39 /usr/bin/python-config -> python2-config* lrwxrwxrwx 1 root root3 22. nov 09:39 /usr/bin/python-pip -> pip* lrwxrwxrwx 1 root root9 22. nov 09:39 /usr/bin/python2 -> python2.7* lrwxrwxrwx 1 root root 16 22. nov 09:39 /usr/bin/python2-config -> python2.7-config* -rwxr-xr-x 1 root root 6.0K 31. okt 10:06 /usr/bin/python2.7* -rwxr-xr-x 1 root root 1.7K 31. okt 10:05 /usr/bin/python2.7-config* and what's the purpose? ps: rpm sucks when it comes to accounting free space using hardlinks (see some old thread i wrote about git-core) -- glen ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en