You are not logged in.

#26 2010-10-19 15:40:31

Foucault
Member
From: Athens, Greece
Registered: 2010-04-06
Posts: 214

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

@jiyunatori

This is a python 2.6->2.7 issue. Just delete your matplotlib font cache (~/.matplotlib/fontList.cache) and a new one will be generated when you plot something.

Offline

#27 2010-10-19 17:02:09

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

broch wrote:

broken firefox in abs. Complaining about syntax (.py file).

/usr/bin/python ../toolkit/xre/make-platformini.py --print-buildid > buildid
  File "../toolkit/xre/make-platformini.py", line 17
    print datetime.now().strftime('%Y%m%d%H%M%S')
                 ^
SyntaxError: invalid syntax
make[4]: *** [export] Error 1


that's pretty simple to fix and it would available in the next firefox update.

cat python2.7.patch 
--- configure.in    2010-10-12 10:44:37.000000000 -0700
+++ configure.in~    2010-10-19 09:51:49.660019364 -0700
@@ -811,7 +811,7 @@
     AC_MSG_RESULT([yes])    
 fi
 
-MOZ_PATH_PROGS(PYTHON, $PYTHON python2.5 python2.4 python)
+MOZ_PATH_PROGS(PYTHON, $PYTHON python2.7 python2.5 python2.4 python)
 if test -z "$PYTHON"; then
     AC_MSG_ERROR([python was not found in \$PATH])
 fi

Give what you have. To someone, it may be better than you dare to think.

Offline

#28 2010-10-19 18:20:14

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

also extra/twisted is broken, I use it through aur/btpd-webui-cvs

$ btpd-webui start
Starting btpd-webui via twistd...Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 626, in run
    runApp(config)
  File "/usr/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 374, in run
    self.application = self.createOrGetApplication()
  File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 439, in createOrGetApplication
    application = getApplication(self.config, passphrase)
--- <exception caught here> ---
  File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 450, in getApplication
    application = service.loadApplication(filename, style, passphrase)
  File "/usr/lib/python2.7/site-packages/twisted/application/service.py", line 390, in loadApplication
    application = sob.loadValueFromFile(filename, 'application', passphrase)
  File "/usr/lib/python2.7/site-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile
    exec fileObj in d, d
  File "/usr/bin/btpd-webui-server", line 24, in <module>
    from btpdwebui import config, webui
exceptions.ImportError: No module named btpdwebui

Failed to load application: No module named btpdwebui

Failed
$ find /usr/lib/python* -iname "*btpdwebui*"
/usr/lib/python3.1/site-packages/btpdwebui

Last edited by c00kiemon5ter (2010-10-19 18:22:32)


.:[ git me! ] :.

Offline

#29 2010-10-19 18:22:22

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

@c00kiemon5ter nope. your btpd-webui-cvs is broken.


Give what you have. To someone, it may be better than you dare to think.

Offline

#30 2010-10-19 18:29:02

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

@wonder yep smile  fix'd

the new PKGBUILD , edited the 'depends' var and the setup.py instruction as mentioned by ioni
works well now.

$ diff old new
9c9
< depends=('python' 'twisted' 'btpd')
---
> depends=('python2' 'twisted' 'btpd')
33c33
<   python setup.py install --root=${pkgdir}
---
>   python2 setup.py install --root=${pkgdir}
# Contributor: Vajdics Balázs <b.vajdics@gmail.com>

pkgname=btpd-webui-cvs
pkgver=16
pkgrel=1
pkgdesc="A simple webui for the Bittorrent Protocol Daemon"
arch=('i686' 'x86_64')
url="http://code.google.com/p/btpd-webui/"
depends=('python2' 'twisted' 'btpd')
makedepends=('subversion')
source=()
license=('GPL')
md5sums=()

_svntrunk=http://btpd-webui.googlecode.com/svn/trunk
_svnmod=btpd-webui-read-only

build() {
  cd $startdir/src

  if [ -d $_svnmod/.svn ]; then
    (cd $_svnmod && svn up -r $pkgver)
  else
    svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
  fi

  msg "SVN checkout done or server timeout"
  msg "Starting make..."

  cp -r $_svnmod $_svnmod-build
  cd $_svnmod-build

  python2 setup.py install --root=${pkgdir}

  rm -rf $startdir/src/$_svnmod-build

}

Last edited by c00kiemon5ter (2010-10-19 18:30:15)


.:[ git me! ] :.

Offline

#31 2010-10-19 19:03:15

akurei
Member
From: Bochum, NRW, Germany
Registered: 2009-05-25
Posts: 152
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

broch wrote:

broken firefox in abs. Complaining about syntax (.py file).

/usr/bin/python ../toolkit/xre/make-platformini.py --print-buildid > buildid
  File "../toolkit/xre/make-platformini.py", line 17
    print datetime.now().strftime('%Y%m%d%H%M%S')
                 ^
SyntaxError: invalid syntax
make[4]: *** [export] Error 1

Try my script:
This script switches between /usr/bin/python2 and /usr/bin/python (python3) in this "transition-phase", for example if you need to build chromium-dev (it needs python2).

#!/bin/bash
if [ `whoami` != "root" ]
then
    echo "Please run as root!"
    exit 1
fi

if ! [ -f /opt/pyswitch/pp ] 
then
    # Create python backup directory
    mkdir -p /opt/pyswitch/
    # Get current Python location
    PP=`which python`
    # Save old destination to file pp in backup dir
    echo -ne $PP > /opt/pyswitch/pp
    # Move python to backup destination
    mv $PP /opt/pyswitch/python.bak
    # Make symlink to python2
    ln -s `which python2` $PP
    echo "$PP is now python2"
else
    # Get old Path
    PP=`cat /opt/pyswitch/pp`
    # Remove the file
    rm /opt/pyswitch/pp
    # Remove symlink
    rm $PP
    # mv python3 back
    mv /opt/pyswitch/python.bak $PP
    echo "$PP is now python3"
fi

Last edited by akurei (2010-10-19 19:21:46)

Offline

#32 2010-10-19 19:20:52

Beelzebud
Member
From: Illinois, U.S.
Registered: 2010-07-16
Posts: 154

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

The upgrade went much smoother than I expected.   I just have a few problems with some packages from AUR, but I have faith those issues will be sorted out soon.

Offline

#33 2010-10-19 19:22:56

MilanKnizek
Member
Registered: 2005-12-13
Posts: 88

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

extra/denyhosts is broken:
https://bugs.archlinux.org/task/21347

And some other AUR packages: wacom related, dockbarx crashes. The latter might be caused by other updates, since there is a report that it works for one user.


--
Milan Knizek
http://knizek.net

Offline

#34 2010-10-19 20:28:21

evilgnome
Member
Registered: 2009-02-20
Posts: 62

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

I have an AUR package chipmunk-radio, which depends on dbus-python, pygtkhelpers-hg and pylast.

The chipmunk-radio code is itself python3-friendly.
The dbus-python package installs a module for python2 only.
The pygtkhelpers-hg and pylast packages install modules for python3 only.

Using easy_install for the latter two will install python2 modules for them, but that still won't work, I think because the latest release of pygtkhelpers is outdated.

So for me to get this working it looks like I need to find a way to install either a recent pygtkhelpers-python2, or dbus-python3.

Offline

#35 2010-10-19 21:26:57

GRem
Member
From: Asunción
Registered: 2010-08-20
Posts: 32

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

Just finished updating. I had a broken panflute applet for a few days, but now it works again.
When the update was finished, Kupfer's keyboard shortcut wasn't being recognized, but reinstalling libkeybinder and python-keybinder did the trick.

Overall, very smooth transition, all of my AUR installed packages are working perfectly.

Offline

#36 2010-10-19 23:16:26

ctarwater
Member
Registered: 2009-02-05
Posts: 300

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

So far the only issue I had was having to install "python-notify" when "wicd-client-kde" from the AUR stopped functioning.  Everything else has been fine.  Other AUR packages included.

Offline

#37 2010-10-19 23:19:52

jwcxz
Member
Registered: 2008-09-23
Posts: 239
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

# rm /usr/bin/python
# ln -s /usr/bin/python2 /usr/bin/python

Sorry, but I can't stand Python 3.  I'm keeping it like that until I start using Python packages that are no longer compatible with Python 2.  I suspect that this won't be for quite a while.


-- jwc
http://jwcxz.com/ | blog
dotman - manage your dotfiles across multiple environments
icsy - an alarm for powernappers

Offline

#38 2010-10-20 01:05:17

bond
Member
From: Melbourne, Australia
Registered: 2009-05-05
Posts: 62

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

I'm having a bit of trouble with flexget (http://flexget.com/)

$ svn co http://svn.flexget.com/trunk flexget-dev
#modify binding
$ nano flexget-dev/bootstrap.py
$ python2 flexget-dev/bootstrap.py

Results in lots of import errors
or attempting the .egg;

$ wget http://download.flexget.com/unstable/Fl … -py2.6.egg -p /tmp
$ sudo easy_install-2.7 /tmp/FlexGet-1.0r1532-py2.6.egg

#Generate paver-minilib.zip
#OSError: [Errno 20] Not a directory: 'paver-minilib.zip/paver/__init__.py'

any tips?

Offline

#39 2010-10-20 01:36:56

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

jwcxz wrote:
# rm /usr/bin/python
# ln -s /usr/bin/python2 /usr/bin/python

Sorry, but I can't stand Python 3.  I'm keeping it like that until I start using Python packages that are no longer compatible with Python 2.  I suspect that this won't be for quite a while.

You're going to have fun the next time python gets updated. If you're really intent on avoiding python3, I suggest you make a simple package called nopython3 or something which conflicts with python and provides the symlink above. It will probably need to provide python as well.

As it is you still have python3 installed, so when it updates it'll overwrite your symlink.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#40 2010-10-20 09:20:25

frigaut
Member
From: Canberra, Australia
Registered: 2009-05-10
Posts: 215
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

Could someone indicate clearly how to modify a PKGBUILD with the sed command to change python -> python2?
I mean, I could experiment, but it's probably better to put clear instructions somewhere for the benefit of all.


Archer since 03/2009 - AUR packages

Offline

#41 2010-10-20 09:28:25

jiyunatori
Member
Registered: 2008-07-04
Posts: 54

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

@foucault: thanks a bunch, it worked !

Offline

#42 2010-10-20 10:54:04

axel668
Member
Registered: 2009-08-15
Posts: 168

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

frigaut wrote:

Could someone indicate clearly how to modify a PKGBUILD with the sed command to change python -> python2?
I mean, I could experiment, but it's probably better to put clear instructions somewhere for the benefit of all.

http://aur.archlinux.org/packages.php?ID=33966 (see my comment).
Only thing I had to change on my system, otherwise everything worked fine smile


"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila."
(Mitch Ratcliffe)

Offline

#43 2010-10-20 11:15:20

frigaut
Member
From: Canberra, Australia
Registered: 2009-05-10
Posts: 215
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

@axel668: hum... not exactly what I was referring to. but thanks anyway for answering.
I looked it up and found an example in a PKGBUILD from flamelab. adopted it and it works.
after the make install in the PKGBUILD, add

sed -i -e "s|env python|env python2|" ${pkgdir}/path/to/the/file/to/patch

replace "env python" by "/usr/bin/python" if necessary (same for the python2 string), and change the path of course.


Archer since 03/2009 - AUR packages

Offline

#44 2010-10-20 11:22:11

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

This is better:

sed -i -e "s|env python$|env python2|" ${pkgdir}/path/to/the/file/to/patch

The extra "$" makes sure you do not sed resulting in things like "/usr/bin/env python22"...

Offline

#45 2010-10-20 12:01:16

hume's doona
Member
Registered: 2009-12-11
Posts: 206

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

Allan wrote:

This is better:

sed -i -e "s|env python$|env python2|" ${pkgdir}/path/to/the/file/to/patch

The extra "$" makes sure you do not sed resulting in things like "/usr/bin/env python22"...

and things like that "$" are the reason the fish shell is evil

Offline

#46 2010-10-20 12:18:51

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

Allan wrote:

The idea is that naming will eventually transform to "python-foo" being for python-3.x and "python2-foo" being for python2.  However, that is not fully realised yet and would require a lot of renaming if we did it all at once so we are going to transition that slowly.

Sorry if I missed a discussion about this, but wouldn't it be more provident to use "python2-foo" and "python3-foo"? Keeping the number would prevent issues in the future (however far off they may be).


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#47 2010-10-20 13:11:25

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

hume's doona wrote:

and things like that "$" are the reason the fish shell is evil

I dont exactly see that as evil. After all, fish points to an error, that is actually falsely suppressed by bash. Obviously one must use apostrophes if variable expansion is not desired:

sed -i -e 's|env python$|env python2|' $pkgdir/path/to/the/file/to/patch

Or am I on a wrong track here?

Last edited by SanskritFritz (2010-10-20 13:26:46)


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#48 2010-10-20 13:17:11

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

Allan wrote:

This is better:

sed -i -e "s|env python$|env python2|" ${pkgdir}/path/to/the/file/to/patch

The extra "$" makes sure you do not sed resulting in things like "/usr/bin/env python22"...

Sorry, but what is the -e switch doing there? The man sed page says

-e script, --expression=script
              add the script to the commands to be executed

This is greek to me.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#49 2010-10-20 13:33:54

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

SanskritFritz wrote:

Sorry, but what is the -e switch doing there? The man sed page says

this is a bit offtopic, but sed can execute several commands with one sed invokation.
To do this you use the -e switch. eg

sed -e "s/foo/bar/" -e "s/cactus/tacos/g"

if you only do one thing, -e can be omitted
that means

sed -e "s/you/me/"  # is the same as
sed "s/you/me/"

btw I am G®33κ tongue

Last edited by c00kiemon5ter (2010-10-20 13:35:27)


.:[ git me! ] :.

Offline

#50 2010-10-20 13:53:12

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: "Python2 & 3 major rebuild" upgrade - impressions ?

c00kiemon5ter wrote:
SanskritFritz wrote:

Sorry, but what is the -e switch doing there? The man sed page says

this is a bit offtopic, but sed can execute several commands with one sed invokation.
To do this you use the -e switch. eg

sed -e "s/foo/bar/" -e "s/cactus/tacos/g"

if you only do one thing, -e can be omitted
that means

sed -e "s/you/me/"  # is the same as
sed "s/you/me/"

btw I am G®33κ tongue

Sorry to extend the OT, but -e is to enable multiple *scripts*, each script can have multiple commands. smile


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

Board footer

Powered by FluxBB