Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100784 - please mark dev-python/flup unstable
Summary: please mark dev-python/flup unstable
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Python Gentoo Team
URL: http://www.saddi.com/software/flup/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-29 23:38 UTC by Jonas MG
Modified: 2007-04-09 22:57 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
flup-0.1827.ebuild (flup-0.1827.ebuild,558 bytes, text/plain)
2005-12-01 09:59 UTC, Alastair Tse (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas MG 2005-07-29 23:38:19 UTC
"Flup is a set of WSGI servers/gateways, which speak AJP 1.3, FastCGI, and SCGI."

There isn't in portage a module that lets developing FastCGI in python.

I addition, it's being used with Django + Lighttpd :
http://hugo.muensterland.org/2005/07/27/django-lighttpd-and-fcgi-second-take/


Reproducible: Always
Steps to Reproduce:
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-07-30 02:00:34 UTC
You forgot to attach the ebuild, it seems. Or is this just a request?
Comment 2 Jonas MG 2005-07-30 11:08:24 UTC
Oh! Sorry, it was a request
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2005-12-01 09:59:12 UTC
Created attachment 73896 [details]
flup-0.1827.ebuild

have a go at this one. this is a dead simple ebuild.
Comment 4 Andy Chambers 2006-04-09 04:20:38 UTC
(In reply to comment #3)
> Created an attachment (id=73896) [edit]
> flup-0.1827.ebuild
> 
> have a go at this one. this is a dead simple ebuild.

That works for me (x86, python-2.4).  Thanks
Comment 5 Alberto Bertogli 2006-05-01 17:10:53 UTC
(In reply to comment #3)
> Created an attachment (id=73896) [edit]
> flup-0.1827.ebuild
> 
> have a go at this one. this is a dead simple ebuild.

It worked for me too; python 2.4 on amd64. Tested with web.py application
and lighttpd as a server.

Is there any reason why this isn't in portage?

Thanks,
    Alberto
Comment 6 Alberto Bertogli 2006-05-01 17:28:06 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > Created an attachment (id=73896) [edit]
> > flup-0.1827.ebuild
> > 
> > have a go at this one. this is a dead simple ebuild.
> 
> It worked for me too; python 2.4 on amd64. Tested with web.py application
> and lighttpd as a server.

Just as a side note, same ebuild but using flup 1849 (latest available
version at this time) works fine too.

Thanks,
    Alberto
Comment 7 Andrey 2006-05-31 11:52:57 UTC
Works just fine (amd64, python-2.4).
Comment 8 Alastair Tse (RETIRED) gentoo-dev 2006-08-05 04:46:55 UTC
just a note, flup is currently in my overlay and is versioned differently than the attached ebuild (0.0_preXXXX) where XXXX is the subversion revision that the releases are named after, in case there is going to be a proper release in the future.

layman -a liquidx

or

http://overlays.gentoo.org/svn/dev/liquidx/
Comment 9 Sam Jacobson 2006-12-07 03:48:12 UTC
Just got flup installed on amd64 using r2172. The ebuild needs a dependency on setuptools (0.6_rc3 for r2172).

-DEPEND=">=dev-lang/python-2.4"
+DEPEND=">=dev-lang/python-2.4
+        >=dev-python/setuptools-0.6_rc3"
Comment 10 Tiziano Müller (RETIRED) gentoo-dev 2007-01-13 22:45:57 UTC
Reassigning.
Comment 11 Tiziano Müller (RETIRED) gentoo-dev 2007-01-13 22:46:35 UTC
In CVS now.
Comment 12 Tiziano Müller (RETIRED) gentoo-dev 2007-01-13 22:57:37 UTC
Dear arch-team members. Please mark this package unstable since there are other packages (like django) which should depend on it (controlled by a  fastcgi USE-flag). Thanks in advance!

There are not tests which could be run, but you could try it using apache/mod_fastcgi and django...
Instructions:
1) cd /var/www/localhost/htdocs
2) startproject foo && cd foo
3) startapp bar
4) Add the following line to your localhost's vhost directive:
ScriptAlias /foobar /var/www/localhost/htdocs/foo/bar.fcgi
5) Add the following file as /var/www/localhost/htdocs/foo/bar.fcgi:
#!/usr/bin/python
import sys, os

# Add a custom Python path.
sys.path.insert(0, "/var/www/localhost/htdocs")

# Switch to the directory of your project. (Optional.)
# os.chdir("/home/user/myproject")

# Set the DJANGO_SETTINGS_MODULE environment variable.
os.environ['DJANGO_SETTINGS_MODULE'] = "foo.settings"

from django.core.servers.fastcgi import runfastcgi
runfastcgi("method='threaded', daemonize='false'")
6) Visit http://localhost/foobar/
Comment 13 Matti Bickel (RETIRED) gentoo-dev 2007-02-19 22:25:30 UTC
oki, after finding out i missed django-admin before step 2,3 (you can emerge django with USE="examples" and use them)
I get as far as the following in my /var/log/lighttpd/error.log:

2007-02-19 23:16:50: (mod_fastcgi.c.2536) FastCGI-stderr: Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/flup/server/fcgi_base.py", line 558, in run
    protocolStatus, appStatus = self.server.handler(self)
  File "/usr/lib/python2.4/site-packages/flup/server/fcgi_base.py", line 1112, in handler
    result = self.application(environ, start_response)
  File "/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py", line 148, in __call__
    response = self.get_response(request.path, request)
  File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 59, in get_response
    response = middleware_method(request)
  File "/usr/lib/python2.4/site-packages/django/middleware/common.py", line 40, in process_request
    if settings.APPEND_SLASH and (old_url[1][-1] != '/') and ('.' not in old_url[1].split('/')[-1]):
IndexError: string index out of range
 
2007-02-19 23:16:50: (mod_fastcgi.c.2536) FastCGI-stderr:

Now whose error is this?
Comment 14 Tiziano Müller (RETIRED) gentoo-dev 2007-02-20 08:12:34 UTC
What did you use as URL? Adding a slash should help :)
Comment 15 Raúl Porcel (RETIRED) gentoo-dev 2007-03-27 16:28:02 UTC
(In reply to comment #14)
> What did you use as URL? Adding a slash should help :)
> 

Indeed, had the same error in apache with mod_fcgid.  Using a slash fixed it.

~ia64 done.
Comment 16 Matti Bickel (RETIRED) gentoo-dev 2007-04-09 22:57:12 UTC
~ppc added, finally. Many thanks to hoffie and dev-zero for holding my hand during my experiments with lighttpd :)