update filesystem-extra to use site specific configuration instead of PYTHONPATH

This commit is contained in:
Weng 2013-07-17 19:50:56 +00:00
parent bea63041d6
commit b14bd7a553
4 changed files with 29 additions and 16 deletions

View File

@ -2,17 +2,19 @@
pkgname=filesystem-extra
pkgver=2013.05
pkgrel=3
pkgrel=4
url="http://chakra-project.org"
license="GPLv2"
arch=('any')
pkgdesc="Extra filesystem"
makedepends=('python2' 'python3')
groups=('extra')
install=extra.install
source=('extra.conf' 'extra.profile' 'extra.tcsh')
source=('extra.conf' 'extra.profile' 'extra.tcsh' 'get_site_directory.py')
md5sums=('b0f054b6c5f809927817b345351ed7b6'
'261292ee4a7f62a3aa215e350f884d2f'
'eb765bc6e868e76bd5eac071beee9583')
'82a68055d010cee9447a831a99b82279'
'3ab04e0f2ac65f4834e1861d65bbf83d'
'265cffea08e37a0651b2296dedd159d3')
package() {
cd ${pkgdir}
@ -30,9 +32,26 @@ package() {
done
# Add a profile for extra
install -D -m755 $startdir/src/extra.profile $startdir/pkg/etc/profile.d/extra.sh
install -D -m755 $startdir/src/extra.tcsh $startdir/pkg/etc/profile.d/extra.csh
install -D -m755 "$srcdir/extra.profile" "$pkgdir/etc/profile.d/extra.sh"
install -D -m755 "$srcdir/extra.tcsh" "$pkgdir/etc/profile.d/extra.csh"
# Add /extra/usr/lib to the default library search path
install -Dm644 "$srcdir/extra.conf" "$pkgdir/etc/ld.so.conf.d/extra.conf"
# Add /extra/usr/lib/python-${version}/site-packages to python site-packages directory
PYTHON2_SITE_DIRECTORY=`python2 "$srcdir/get_site_directory.py"`
PYTHON3_SITE_DIRECTORY=`python3 "$srcdir/get_site_directory.py"`
cat > extra-python2.pth <<EOF
/extra$PYTHON2_SITE_DIRECTORY
/extra$PYTHON2_SITE_DIRECTORY/gtk-2.0
EOF
cat > extra-python3.pth <<EOF
/extra$PYTHON3_SITE_DIRECTORY
/extra$PYTHON3_SITE_DIRECTORY/gtk-2.0
EOF
install -Dm644 extra-python2.pth "$pkgdir/$PYTHON2_SITE_DIRECTORY/extra.pth"
install -Dm644 extra-python3.pth "$pkgdir/$PYTHON3_SITE_DIRECTORY/extra.pth"
}

View File

@ -16,8 +16,3 @@ if [ ! -z $XDG_CONFIG_DIRS ]; then
else
export XDG_CONFIG_DIRS=$EXTRADIR/etc/xdg
fi
if [ ! -z $PYTHONPATH ]; then
export PYTHONPATH=$PYTHONPATH:$EXTRADIR/usr/lib/python2.7/site-packages:$EXTRADIR/usr/lib/python2.7/site-packages/gtk-2.0
else
export PYTHONPATH=$EXTRADIR/usr/lib/python2.7/site-packages:$EXTRADIR/usr/lib/python2.7/site-packages/gtk-2.0
fi

View File

@ -13,8 +13,3 @@ if ( ! $?XDG_CONFIG_DIRS ) then
else
setenv XDG_CONFIG_DIRS $XDG_CONFIG_DIRS:$EXTRADIR/etc/xdg
endif
if ( ! $?PYTHONPATH ) then
setenv PYTHONPATH $EXTRADIR/usr/lib/python2.7/site-packages:$EXTRADIR/usr/lib/python2.7/site-packages/gtk-2.0
else
setenv PYTHONPATH $PYTHONPATH:$EXTRADIR/usr/lib/python2.7/site-packages:$EXTRADIR/usr/lib/python2.7/site-packages/gtk-2.0
endif

View File

@ -0,0 +1,4 @@
#!/usr/bin/python
from distutils.sysconfig import get_python_lib
print(get_python_lib())