You are not logged in.
Hi,
it seems like the official python-gnupg isn't anymore developed and there's a fork of it here, including security patches and a few enhancements.
I tried to create a PKDBUILD for this but it is not working as expected, actual code:
pkgname=python-gnupg
_gitname=python-gnupg
pkgver=1.2.2
pkgrel=1
pkgdesc="The gnupg module allows Python programs to make use of the functionality provided by the GNU Privacy Guard."
url="https://github.com/isislovecruft/python-gnupg"
license=("GPL")
arch=("any")
depends=('python' 'gnupg')
source=('git://github.com/isislovecruft/python-gnupg.git')
md5sums=('SKIP')
build() {
cd $_gitname
python setup.py build
}
package() {
cd $_gitname
python setup.py install --prefix=${pkgdir}/usr --optimize=1
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
If i try to build the packages the following occurs:
$ makepkg -s
==> Making package: python-gnupg 1.2.2-1 (Sat Aug 3 16:40:53 CEST 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating python-gnupg git repo...
Fetching origin
==> Validating source files with md5sums...
python-gnupg ... Skipped
==> Extracting sources...
-> Creating working copy of python-gnupg git repo...
Cloning into 'python-gnupg'...
done.
Checking connectivity... done
==> Removing existing pkg/ directory...
==> Starting build()...
running build
got version from git {'version': '1.2.2-1-gabf981a', 'full': 'abf981a1ca5364831bddde7a7e2570fa898d13ee'}
running build_py
creating build
creating build/lib
creating build/lib/gnupg
copying gnupg/gnupg.py -> build/lib/gnupg
copying gnupg/_ansistrm.py -> build/lib/gnupg
copying gnupg/_util.py -> build/lib/gnupg
copying gnupg/_meta.py -> build/lib/gnupg
copying gnupg/_version.py -> build/lib/gnupg
copying gnupg/__init__.py -> build/lib/gnupg
copying gnupg/_logger.py -> build/lib/gnupg
copying gnupg/copyleft.py -> build/lib/gnupg
copying gnupg/_parsers.py -> build/lib/gnupg
running build_scripts
creating build/scripts-3.3
copying and adjusting versioneer.py -> build/scripts-3.3
changing mode of build/scripts-3.3/versioneer.py from 644 to 755
UPDATING build/lib/gnupg/_version.py
==> Entering fakeroot environment...
==> Starting package()...
running install
Checking .pth file support in /home/user/abs/python-gnupg/pkg/python-gnupg/usr/lib/python3.3/site-packages/
/usr/bin/python -E -c pass
TEST FAILED: /home/user/abs/python-gnupg/pkg/python-gnupg/usr/lib/python3.3/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/home/user/abs/python-gnupg/pkg/python-gnupg/usr/lib/python3.3/site-packages/
and your PYTHONPATH environment variable currently contains:
''
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
http://packages.python.org/distribute/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
==> ERROR: A failure occurred in package().
Aborting...
$
Is there a way to ignore the PYTHONPATH-check or is anyone able to help me (or could provide a PKGBUILD)?
Last edited by D4ve (2013-08-04 10:07:37)
Offline
The problem is the --prefix=${pkgdir}/usr flag. Use --root="$pkgdir/" instead.
You can consult /usr/share/pacman/PKGBUILD-*.proto for help on 'special' packages.
Offline
Woohoo, works perfect, thanks.
Offline