You are not logged in.
Pages: 1
hello!
I've compiled python2.7 from ABS, and want to install it into /opt directory (without touching system python(version 2.6.5)).
thanks
Offline
Change the configure line...
./configure --prefix=/usr ...
Offline
i've edited PKGBUILD file to:
# $Id: PKGBUILD 75257 2010-04-01 05:30:58Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributer: Jason Chu <jason@archlinux.org>pkgname=python2
pkgver=2.7
pkgrel=1
_pybasever=2.7
pkgdesc="A high-level scripting language"
arch=('i686' 'x86_64')
license=('PSF')
url="http://www.python.org"
depends=('db' 'bzip2' 'gdbm' 'openssl' 'zlib' 'expat' 'sqlite3')
makedepends=('tk')
optdepends=('tk: for IDLE')
conflicts=('python<3')
options=('!makeflags')
source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.bz2)
md5sums=('0e8c9ec32abf5b732bea7d91b38c3339')build() {
cd ${srcdir}/Python-${pkgver}export OPT="${CFLAGS}"
./configure --prefix=/opt/python --enable-shared --with-threads \
--enable-unicode=ucs4 --with-system-expatmake
}package() {
cd ${srcdir}/Python-${pkgver}
make DESTDIR=${pkgdir} altinstallln -sf python${_pybasever} $pkgdir/opt/python/bin/python2
ln -sf python${_pybasever}-config $pkgdir/opt/python/bin/python2-configln -sf ../../libpython${_pybasever}.so \
${pkgdir}/opt/python/lib/python${_pybasever}/config/libpython${_pybasever}.somv $pkgdir/opt/python/bin/smtpd.py $pkgdir/opt/python/lib/python${_pybasever}/
# clean-up reference to build directory
sed -i "s#$srcdir/Python-${pkgver}:##" \
$pkgdir/opt/python/lib/python${_pybasever}/config/Makefile# some useful "stuff"
install -dm755 ${pkgdir}/opt/python/lib/python${_pybasever}/Tools/{i18n,scripts}
install -m755 Tools/i18n/{msgfmt,pygettext}.py \
${pkgdir}/opt/python/lib/python${_pybasever}/Tools/i18n/
install -m755 Tools/scripts/{README,*py} \
${pkgdir}/opt/python/lib/python${_pybasever}/Tools/scripts/# fix conflicts with python
mv $pkgdir/opt/python/bin/idle{,2}
mv $pkgdir/opt/python/bin/pydoc{,2}# license
install -Dm644 LICENSE ${pkgdir}/opt/python/share/licenses/${pkgname}/LICENSE
}
but: ~/abs/python2$ sudo pacman -U python2-2.7-1-x86_64.pkg.tar.xz
resolving dependencies...
looking for inter-conflicts...
:: python2 and python are in conflict (python<3). Remove python? [y/N]
any suggestions?
Offline
Remove the conflicts line...
And rename the package to python27. It will make your life easier when the python rebuild moves from [testing].
Offline
sorry for my dummy question, but where are this "conflict" lines?
Offline
conflicts=('python<3')
in your PKGBUILD
Last edited by Spider.007 (2010-10-06 09:37:35)
Offline
thanks for help guys!
Offline
Sidenote: No need to install it to opt when you use altinstall. It won't conflict with 2.6
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Pages: 1