Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install django-haystack using buildout

I'm trying to convert a current Django project in development to use zc.buildout So far, I've got all the bits figured except for Haystack figured out.

The Haystack source is available on GitHub, but I don't want to force users to install git. A suitable alternative seems to be to fetch a tarball from here

That tarball contains a setuptools setup.py, and it seems like it should be so easy to get buildout to install it. Halp!

like image 326
James Emerton Avatar asked Aug 01 '26 20:08

James Emerton


1 Answers

I figured this one out, without posting it to PyPI. (There is no actually tagged release version of django-haystack, so posting to to PyPI seems unclean. It's something the maintainer should and probably will handle better themselves.)

The relevant section is as follows:

[haystack]
recipe = collective.recipe.distutils
url = http://github.com/ephelon/django-haystack/tarball/master

I had to create a fork of the project to remove zip_safe=False from setup.py. Once I'd done that the above works flawlessly, even the redirect sent by the above url.

like image 72
James Emerton Avatar answered Aug 03 '26 14:08

James Emerton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!