You are not logged in.

#1 2011-02-03 11:03:51

Bushman
Member
Registered: 2010-05-27
Posts: 32

Troubles with Python versions in libopensync-unstable [SOLVED]

When I try to compile it with a PKGBUILD that is different from the one on the AUR only in that the package now shows to depend on python2, it tries to use the Python 2.5 library (/usr/lib/libpython2.5.so) even though I have Python 2.7.1. This causes the build process to fail, though it seems to happen when it recieves a traceback stating a SyntaxError in a print statement. It uses CMake, and I cannot figure out for the life of me where the Python .so is specified.
How do I force CMake (or rather, the FindPythonLibs module) to use the correct Python .so?

Last edited by Bushman (2011-02-04 21:29:20)

Offline

#2 2011-02-03 12:09:57

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

Re: Troubles with Python versions in libopensync-unstable [SOLVED]

Why don't you post up both of them here?

And why not use the one from the AUR?


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

#3 2011-02-03 22:31:21

Bushman
Member
Registered: 2010-05-27
Posts: 32

Re: Troubles with Python versions in libopensync-unstable [SOLVED]

Ok, here goes:
Original, from AUR:

# Maintainer: Konstantinos Karantias <kostis[at]gtklocker[dot]com>
# Contibutor: Hauke Wesselmann <hauke@h-dawg.de>
pkgname=libopensync-unstable
pkgver=0.39
pkgrel=1
pkgdesc='Development version of the opensync synchronisation framework'
url='http://www.opensync.org'
license=('LGPL')
arch=('i686' 'x86_64')
makedepends=('python' 'cmake')
depends=('glib2' 'libxml2' 'sqlite3' 'libxslt')
options=('!libtool')
replaces=('libopensync')
conflicts=('libopensync')
provides=('libopensync=0.38')
source=(http://www.opensync.org/download/releases/$pkgver/libopensync-$pkgver.tar.bz2)
sha512sums=('038c92e2599ca31d6633dd60eaf44e157887d285c8946740afb153c4afb98b718f3f73251212e1055452a793142d0d27e2edf510a9830308d20d9c7d4023c7e4')

build() {
  cd $srcdir/
  mkdir build
  cd build
  cmake ../libopensync-$pkgver -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
  
  make VERBOSE=1
}

package() {
  cd $srcdir/build
  make DESTDIR=$pkgdir install
}

My modified version:

# Maintainer: Konstantinos Karantias <kostis[at]gtklocker[dot]com>
# Contibutor: Hauke Wesselmann <hauke@h-dawg.de>
pkgname=libopensync-unstable
pkgver=0.39
pkgrel=1
pkgdesc='Development version of the opensync synchronisation framework'
url='http://www.opensync.org'
license=('LGPL')
arch=('i686' 'x86_64')
makedepends=('python2' 'cmake')
depends=('glib2' 'libxml2' 'sqlite3' 'libxslt')
options=('!libtool')
replaces=('libopensync')
conflicts=('libopensync')
provides=('libopensync=0.38')
source=(http://www.opensync.org/download/releases/$pkgver/libopensync-$pkgver.tar.bz2)
sha512sums=('038c92e2599ca31d6633dd60eaf44e157887d285c8946740afb153c4afb98b718f3f73251212e1055452a793142d0d27e2edf510a9830308d20d9c7d4023c7e4')

build() {
  cd $srcdir/
  rm -r build || true
  mkdir build
  cd build
  cmake ../libopensync-$pkgver -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
  
  make VERBOSE=1
}

package() {
  cd $srcdir/build
  make DESTDIR=$pkgdir install
}

And a unified diff:

--- /tmp/bauerbill/build/aur/libopensync-unstable/PKGBUILD    2010-12-03 08:57:36.000000000 -0500
+++ /tmp/bauerbill/build/aur/libopensync-unstable/PKGBUILD.bak    2011-02-03 17:29:57.163338325 -0500
@@ -7,7 +7,7 @@
 url='http://www.opensync.org'
 license=('LGPL')
 arch=('i686' 'x86_64')
-makedepends=('python' 'cmake')
+makedepends=('python2' 'cmake')
 depends=('glib2' 'libxml2' 'sqlite3' 'libxslt')
 options=('!libtool')
 replaces=('libopensync')
@@ -18,6 +18,7 @@
 
 build() {
   cd $srcdir/
+  rm -r build || true
   mkdir build
   cd build
   cmake ../libopensync-$pkgver -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release

The makedepends modification was made because this library was trying to use python 2, not python 3. The other addition was to stop the immediately-following mkdir from pooping out because the directory already exists.

Offline

#4 2011-02-03 23:51:33

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

Re: Troubles with Python versions in libopensync-unstable [SOLVED]

You see, makedepends() does not affect compilation at all, its like a flag for pacman to know what MUST be installed before trying to build the package. So something else is the difference, not your PKGBUILD. Try removing your ./src directory before makepkg.


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

#5 2011-02-04 21:29:05

Bushman
Member
Registered: 2010-05-27
Posts: 32

Re: Troubles with Python versions in libopensync-unstable [SOLVED]

Well, it turns out the only reason I even had the Python 2.5 library was because I had the Google App Engine SDK installed, so I did a

sudo pacman -Rc python25

and everything works fine now.

Offline

Board footer

Powered by FluxBB