You are not logged in.
Hyde is a static website generator written in python[link]. Hyde's dependencies are:
python-markdown: http://www.archlinux.org/packages/commu … -markdown/
python2-jinja: http://www.archlinux.org/packages/commu … on2-jinja/
python2-pygments: http://www.archlinux.org/packages/commu … -pygments/
python2-yaml: http://www.archlinux.org/packages/?q=python2-yaml
typogrify-hyde: https://aur.archlinux.org/packages.php?ID=51152
python2-commando: https://aur.archlinux.org/packages.php?ID=49972
python2-smartypants: https://aur.archlinux.org/packages.php?ID=49973
The three last packages are maintained by me. There are two ways of installing hyde. Either with
# pip2 install hyde
or installing all dependencies and then hyde with
python2 setup.py install
If you browse through the PKGBUILDs you'll see that in I have replaced in every script, python with python2 using sed. Is that the right way?
The thing is that when I install it through pip it works fine. But when through the PKGBUILDs it fails. I'm suspecting the packaging of typogrify-hyde because I get this error
Example of creating a default site
$ hyde -s site/ create
Traceback (most recent call last):
File "/usr/bin/hyde", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2709, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: typogrify-hyde
I am not familiar with python but I would really like to get it working. Any help appreciated.
Last edited by maevius (2011-08-30 17:50:58)
Offline
Can you post the PKGBUILD you've made so far?
Offline
Ok, so here are all hyde's aur dependencies.
Hyde
pkgname=hyde
pkgver=0.8.3
pkgrel=2
pkgdesc="Hyde is a static website generator written in python."
url="http://hyde.github.com"
arch=('any')
license=('MIT')
depends=('python2-yaml' 'python2-jinja' 'python-markdown' 'python2-pygments' 'python2-commando' 'python2-smartypants' 'typogrify-hyde')
makedepends=('python2' 'python2-distribute')
replaces=(hyde-git)
source=(http://pypi.python.org/packages/source/h/hyde/hyde-$pkgver.tar.gz)
md5sums=('acb970a3893b21caa0422c36dfd1d8ce')
build() {
cd ${srcdir}/$pkgname-$pkgver
sed -i 's|#!python|#!/usr/bin/env python2|' distribute_setup.py
python2 setup.py install --root="${pkgdir}" -O1
}
Typogrify-hyde
pkgname=typogrify-hyde
pkgver=1.0.1a
pkgrel=1
pkgdesc="Typography related template filters for Django & Jinja2 applications"
url="https://github.com/hyde/typogrify"
license=('BSD')
arch=(any)
depends=('django>=1.0' 'python2-smartypants>=1.6')
makedepends=('python2')
conflicts=('typogrify')
build() {
_gitroot="git://github.com/hyde/typogrify.git"
_gitname="typogrify"
cd $srcdir
msg "Connecting to the GIT server...."
if [[ -d $srcdir/$_gitname ]] ; then
cd $_gitname
git pull origin
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done"
msg "Starting make..."
git clone $srcdir/$_gitname $srcdir/$_gitname-build
cd $srcdir/$_gitname-build
python2 setup.py install --root="${pkgdir}" -O1
}
python2-commando
pkgname=python2-commando
pkgver=0.1.2a
pkgrel=2
pkgdesc="A declarative interface for argparse"
arch=('any')
url='http://github.com/lakshmivyas/commando'
license=('MIT')
makedepends=('python2' 'python2-distribute')
source=("http://pypi.python.org/packages/source/c/commando/commando-$pkgver.tar.gz")
md5sums=('fafd44f3bb36e645e55d854dddb75608')
build() {
cd "${srcdir}"/commando-"$pkgver"
sed -i 's|#!python|#!/usr/bin/env python2|' distribute_setup.py
python2 setup.py install --root="${pkgdir}" -O1
}
python2-smartypants
pkgname=python2-smartypants
_pkgname=smartypants
pkgver=1.6.0.3
pkgrel=3
pkgdesc="A smart-quotes plugin"
url="http://web.chad.org/projects/smartypants.py/"
arch=('any')
license=('BSD')
makedepends=(python2)
source=(http://pypi.python.org/packages/source/s/${_pkgname}/${_pkgname}-${pkgver}.tar.gz)
md5sums=('2cd188eefedc6a59c4917cf2900d1c46')
build() {
cd "${srcdir}"/"${_pkgname}"-$pkgver
mkdir -p "${pkgdir}"/usr/share/licences/$_pkgname
sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' setup.py
sed -i 's|#!/usr/bin/python|#!/usr/bin/env python2|' lib/smartypants.py
python2 setup.py install --root="${pkgdir}" -O1
}
Offline
Hyde threw that error because typogrify-hyde is installed as typogrify when hyde is expecting typogrify-hyde. So, I just added this to typogrify-hyde's PKGBUILD:
sed -i "s/name='typogrify'/name='typogrify-hyde'/" setup.py
Then, I needed to install python2-argparse since that wasn't included as a dependency. It worked, then. I think? Well, it created whatever it's supposed to create.
Also, I would suggest removing the build directory before the git clone for the build directory or else makepkg throws an error when building again.
Last edited by jomasti (2011-09-02 05:13:37)
Offline
It worked! Thanks a lot man! You are right about the python2-argparse package, it is needed. Although in the official page it says that As of Python >= 2.7 and >= 3.2, the argparse module is maintained within the Python standard library. I don't know maybe I should ask the hyde dev. Anyway thanks again
Offline