network-manager: use mirror://gnome
[nixpkgs-libre.git] / pkgs / top-level / python-packages.nix
blob966312712256c67fc0e8194714d7ff3754062be1
1 { pkgs, python, buildPythonPackage }:
3 rec {
4   inherit (pkgs) fetchurl fetchsvn stdenv;
6   argparse = buildPythonPackage (rec {
7     name = "argparse-1.1";
9     src = fetchurl {
10       url = "http://pypi.python.org/packages/source/a/argparse/${name}.zip";
11       sha256 = "ee6da1aaad8b08a74a33eb82264b1a2bf12a7d5aefc7e9d7d40a8f8fa9912e62";
12     };
14     buildInputs = [ pkgs.unzip ];
16     # How do we run the tests?
17     doCheck = false;
19     meta = {
20       homepage = http://code.google.com/p/argparse/;
22       license = "Apache License 2.0";
24       description = "argparse: Python command line parser";
26       longDescription = ''
27         The argparse module makes writing command line tools in Python
28         easy.  Just briefly describe your command line interface and
29         argparse will take care of the rest, including: parsing the
30         arguments and flags from sys.argv, converting arg strings into
31         objects for your program, formatting and printing any help
32         messages, and much more.
33       '';
34     };
35   });
37   beautifulsoap = buildPythonPackage (rec {
38     name = "beautifulsoap-3.0.8";
40     src = fetchurl {
41       url = "http://www.crummy.com/software/BeautifulSoup/download/3.x/BeautifulSoup-3.0.8.tar.gz";
42       sha256 = "1gasiy5lwbhsxw27g36d88n36xbj52434klisvqhljgckd4xqcy7";
43     };
45     # No tests implemented
46     doCheck = false;
48     meta = {
49       homepage = http://www.crummy.com/software/BeautifulSoup/;
51       license = "bsd";
53       description = "Undemanding HTML/XML parser";
54     };
55   });
57   boto = buildPythonPackage (rec {
58     name = "boto-1.9b";
60     src = fetchurl {
61       url = "http://boto.googlecode.com/files/${name}.tar.gz";
62       sha256 = "0kir3ddm79rxdf7wb5czmxpbnqzgj3j966q4mach29kkb98p48wz";
63     };
65     meta = {
66       homepage = http://code.google.com/p/boto/;
68       license = "bsd";
70       description = "Python interface to Amazon Web Services";
72       longDescription = ''
73         The boto module is an integrated interface to current and
74         future infrastructural services offered by Amazon Web
75         Services.  This includes S3, SQS, EC2, among others.
76       '';
77     };
78   });
80   cherrypy = buildPythonPackage (rec {
81     name = "cherrypy-3.1.2";
83     src = fetchurl {
84       url = "http://download.cherrypy.org/cherrypy/3.1.2/CherryPy-3.1.2.tar.gz";
85       sha256 = "1xlvanhnxgvwd7vvypbafyl6yqfkpnwa9rs9k3058z84gd86bz8d";
86     };
88     doCheck = false;
90     meta = {
91       homepage = "http://www.cherrypy.org";
92       description = "A pythonic, object-oriented HTTP framework";
93     };
94   });
96   clientform = buildPythonPackage (rec {
97     name = "clientform-0.2.10";
99     src = fetchurl {
100       url = "http://pypi.python.org/packages/source/C/ClientForm/ClientForm-0.2.10.tar.gz";
101       sha256 = "0dydh3i1sx7rrj6d0gj375wkjpiivm7jjlsimw6hmwv4ck7yf1wm";
102     };
104     meta = {
105       homepage = http://wwwsearch.sourceforge.net/ClientForm/;
107       license = "bsd";
109       description = "Python module for handling HTML forms on the client side";
110     };
111   });
113   cssutils = buildPythonPackage (rec {
114     name = "cssutils-0.9.7a6";
116     src = fetchurl {
117       url = http://cssutils.googlecode.com/files/cssutils-0.9.7a6.zip;
118       sha256 = "1i5n97l20kn2w9v6x8ybcdnl323vy8lcc5qlxz5l89di36a2skgw";
119     };
121     buildInputs = [ pkgs.unzip ];
123     # The tests fail - I don't know why
124     doCheck = false;
126     meta = {
127       description = "A Python package to parse and build CSS";
129       homepage = http://code.google.com/p/cssutils/;
131       license = "LGPLv3+";
132     };
133   });
135   darcsver = buildPythonPackage (rec {
136     name = "darcsver-1.5.1";
138     src = fetchurl {
139       url = "http://pypi.python.org/packages/source/d/darcsver/${name}.tar.gz";
140       sha256 = "e643d607f27e4b8cc96565432ff1abdc2af5e9061c70798e2f33e78c07b66b3a";
141     };
143     # Note: We don't actually need to provide Darcs as a build input.
144     # Darcsver will DTRT when Darcs isn't available.  See news.gmane.org
145     # http://thread.gmane.org/gmane.comp.file-systems.tahoe.devel/3200 for a
146     # discussion.
148     meta = {
149       description = "Darcsver, generate a version number from Darcs history";
151       homepage = http://pypi.python.org/pypi/darcsver;
153       license = "BSD-style";
154     };
155   });
157   dateutil = buildPythonPackage (rec {
158     name = "dateutil-1.4.1";
160     src = fetchurl {
161       url = "http://pypi.python.org/packages/source/p/python-dateutil/python-${name}.tar.gz";
162       sha256 = "0mrkh932k8s74h4rpgksvpmwbrrkq8zn78gbgwc22i2vlp31bdkl";
163     };
165     meta = {
166       description = "Powerful extensions to the standard datetime module";
168       homepage = http://pypi.python.org/pypi/python-dateutil;
170       license = "BSD-style";
171     };
172   });
174   flup = buildPythonPackage (rec {
175     name = "flup-1.0.2";
177     src = fetchurl {
178       url = "http://www.saddi.com/software/flup/dist/${name}.tar.gz";
179       sha256 = "1nbx174g40l1z3a8arw72qz05a1qxi3didp9wm7kvkn1bxx33bab";
180     };
182     meta = {
183       homepage = "http://trac.saddi.com/flup";
184       description = "FastCGI Python module set";
185     };
186   });
188   foolscap = buildPythonPackage (rec {
189     name = "foolscap-0.5.1";
191     src = fetchurl {
192       url = "http://foolscap.lothar.com/releases/${name}.tar.gz";
193       sha256 = "c7dfb6f9331e05a8d9553730493b4740c7bf4b4cd68ba834061f0ca0d455492d";
194     };
196     propagatedBuildInputs = [ twisted pkgs.pyopenssl ];
198     # For some reason "python setup.py test" doesn't work with Python 2.6.
199     doCheck = false;
201     meta = {
202       homepage = http://foolscap.lothar.com/;
204       description = "Foolscap, an RPC protocol for Python that follows the distributed object-capability model";
206       longDescription = ''
207         "Foolscap" is the name for the next-generation RPC protocol,
208         intended to replace Perspective Broker (part of Twisted).
209         Foolscap is a protocol to implement a distributed
210         object-capabilities model in Python.
211       '';
213       # See http://foolscap.lothar.com/trac/browser/LICENSE.
214       license = "MIT";
216       maintainers = [ stdenv.lib.maintainers.ludo ];
217       platforms = python.meta.platforms;
218     };
219   });
221   genshi = buildPythonPackage {
222     name = "genshi-0.5.1";
224     src = fetchurl {
225       url = http://ftp.edgewall.com/pub/genshi/Genshi-0.5.1.tar.bz2;
226       sha256 = "1g2xw3zvgz59ilv7mrdlnvfl6ph8lwflwd4jr6zwrca2zhj7d8rs";
227     };
229     patches =
230       [ # Fix `make check' (http://bugs.gentoo.org/276299)
231         (fetchurl {
232           url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/dev-python/genshi/files/genshi-0.5.1_test_fix.patch?rev=1.1";
233           sha256 = "019skkas07lc2kjy5br5jhhf9dqfy4fs389m5f4ws3fc62fklwhk";
234         })
235       ];
237     buildInputs = [ pkgs.setuptools ];
239     meta = {
240       description = "Python components for parsing HTML, XML and other textual content";
242       longDescription = ''
243         Python library that provides an integrated set of
244         components for parsing, generating, and processing HTML, XML or other
245         textual content for output generation on the web.
246       '';
248       license = "BSD";
249     };
250   };
252   jinja2 = buildPythonPackage {
253     name = "jinja2-2.2.1";
255     src = fetchurl {
256       url = "http://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.2.1.tar.gz";
257       md5 = "fea849d68891218eb0b21c170f1c32d5";
258     };
260     meta = {
261       homepage = http://jinja.pocoo.org/;
262       description = "Stand-alone template engine";
263       license = "BSD";
264       longDescription = ''
265         Jinja2 is a template engine written in pure Python. It provides a
266         Django inspired non-XML syntax but supports inline expressions and
267         an optional sandboxed environment.
268       '';
269     };
270   };
272   libcloud = buildPythonPackage (rec {
273     name = "libcloud-0.3.1";
275     src = fetchurl {
276       url = mirror://apache/incubator/libcloud/apache-libcloud-incubating-0.3.1.tar.bz2;
277       sha256 = "11qilrs4sd4c1mkd64ikrjsc2vwrshhc54n5mh4xrark9c7ayp0y";
278     };
280     buildInputs = [ zopeInterface ];
282     preConfigure = "cp test/secrets.py-dist test/secrets.py";
284     meta = {
285       description = "A unified interface to many cloud providers";
286       homepage = http://incubator.apache.org/libcloud/;
287     };
288   });
290   lxml = buildPythonPackage ( rec {
291     name = "lxml-2.2.2";
293     src = fetchurl {
294       url = http://pypi.python.org/packages/source/l/lxml/lxml-2.2.2.tar.gz;
295       sha256 = "0zjpsy67wcs69qhb06ficl3a5z229hmczpr8h84rkk05vaagj8qv";
296     };
298     buildInputs = [ pkgs.libxml2 pkgs.libxslt ];
300     meta = {
301       description = "Pythonic binding for the libxml2 and libxslt libraries";
302       homepage = http://codespeak.net/lxml/index.html;
303       license = "BSD";
304     };
305   });
307   matplotlib = buildPythonPackage ( rec {
308     name = "matplotlib-0.99.1.2";
310     src = fetchurl {
311       url = "http://downloads.sourceforge.net/matplotlib/${name}.tar.gz";
312       sha256 = "12lhwgkahck795946hb8wp605c912zq9ds8067ybbifqs56q24b9";
313     };
315     doCheck = false;
317     buildInputs = [ dateutil numpy pkgs.freetype pkgs.libpng pkgs.pkgconfig pkgs.tcl pkgs.tk pkgs.xlibs.libX11 ];
319     meta = {
320       description = "python plotting library, making publication quality plots";
321       homepage = "http://matplotlib.sourceforge.net/";
322     };
323   });
325   mechanize = buildPythonPackage (rec {
326     name = "mechanize-0.1.11";
328     src = fetchurl {
329       url = "http://wwwsearch.sourceforge.net/mechanize/src/${name}.tar.gz";
330       sha256 = "1h62mwy4iz09jqz17nrb9j8y0djd500zdfqwrz9xmdwqzqwixkj2";
331     };
333     propagatedBuildInputs = [ clientform ];
335     meta = {
336       description = "Stateful programmatic web browsing in Python";
338       homepage = http://wwwsearch.sourceforge.net/;
340       license = "BSD-style";
341     };
342   });
344   mock = buildPythonPackage (rec {
345     name = "mock-0.1.0";
347     src = fetchurl {
348       url = "mirror://sourceforge/python-mock/pythonmock-0.1.0.zip";
349       sha256 = "0r17f8sjq6pjlfh2sq2x80bd5r6y9sb3n5l05x5sf25iaba7sg9z";
350     };
352     buildInputs = [ pkgs.unzip ];
354     phases = "unpackPhase";
356     unpackPhase =
357       '' mkdir "${name}"
358          unzip "$src"
360          ensureDir "$out/lib/${python.libPrefix}/site-packages"
361          cp -v mock.py "$out/lib/${python.libPrefix}/site-packages"
362       '';
364     meta = {
365       description = "Mock objects for Python";
367       homepage = http://python-mock.sourceforge.net/;
369       license = "mBSD";
370     };
371   });
373   mock060 = pkgs.lowPrio (buildPythonPackage (rec {
374     # TODO: This appears to be an unofficially hacked version of 'mock'
375     #       from above. This could probably replace the previous
376     #       package, but I don't have time to test that right now.
377     name = "mock-0.6.0";
379     src = fetchurl {
380       url = "http://tahoe-lafs.org/source/tahoe-lafs/deps/tahoe-dep-sdists/${name}.tar.bz2";
381       sha256 = "1vwxzr2sjyl3x5jqgz9swpmp6cyhmwmab65akysfglf6acmn3czf";
382     };
383     doCheck = false;            # Package doesn't have any tests.
385     meta = {
386       description = "Mock objects for Python, provided by tahoe-lafs.org";
387       homepage = "http://python-mock.sourceforge.net/";
388       license = "mBSD";
389     };
390   }));
392   mutagen = buildPythonPackage (rec {
393     name = "mutagen-1.20";
395     src = fetchurl {
396       url = "http://mutagen.googlecode.com/files/${name}.tar.gz";
397       sha256 = "1rz63nh7r6qj3zsidf8d3a7ih647prvvqzi51p8dqkqmvrwc8mky";
398     };
400     meta = {
401       description = "Python multimedia tagging library";
402       homepage = http://code.google.com/p/mutagen;
403       license = "LGPLv2";
404     };
405   });
408   namebench = buildPythonPackage (rec {
409     name = "namebench-1.0.5";
411     src = fetchurl {
412       url = "http://namebench.googlecode.com/files/${name}.tgz";
413       sha256 = "6cbde35ce94d1f31e7d48f5d8eec13238b4dbc505675a33f1e183e600c1482c3";
414     };
416     # No support of GUI yet.
418     doCheck = false;
420     meta = {
421       homepage = http://namebench.googlecode.com/;
422       description = "Find fastest DNS servers available";
423       license = [
424         "Apache-2.0"
425         # third-party program licenses (embedded in the sources)
426         "LGPL" # Crystal_Clear
427         "free" # dns
428         "Apache-2.0" # graphy
429         "BSD" # jinja2
430       ];
431       longDescription = ''
432         It hunts down the fastest DNS servers available for your computer to
433         use. namebench runs a fair and thorough benchmark using your web
434         browser history, tcpdump output, or standardized datasets in order
435         to provide an individualized recommendation. namebench is completely
436         free and does not modify your system in any way.
437       '';
438     };
439   });
441   nevow = buildPythonPackage (rec {
442     name = "nevow-${version}";
443     version = "0.10.0";
445     src = fetchurl {
446       url = "http://divmod.org/trac/attachment/wiki/SoftwareReleases/Nevow-${version}.tar.gz?format=raw";
447       sha256 = "90631f68f626c8934984908d3df15e7c198939d36be7ead1305479dfc67ff6d0";
448       name = "${name}.tar.gz";
449     };
451     propagatedBuildInputs = [ twisted ];
453     postInstall = "twistd --help > /dev/null";
455     meta = {
456       description = "Nevow, a web application construction kit for Python";
458       longDescription = ''
459         Nevow - Pronounced as the French "nouveau", or "noo-voh", Nevow
460         is a web application construction kit written in Python.  It is
461         designed to allow the programmer to express as much of the view
462         logic as desired in Python, and includes a pure Python XML
463         expression syntax named stan to facilitate this.  However it
464         also provides rich support for designer-edited templates, using
465         a very small XML attribute language to provide bi-directional
466         template manipulation capability.
468         Nevow also includes formless, a declarative syntax for
469         specifying the types of method parameters and exposing these
470         methods to the web.  Forms can be rendered automatically, and
471         form posts will be validated and input coerced, rendering error
472         pages if appropriate.  Once a form post has validated
473         successfully, the method will be called with the coerced values.
474       '';
476       homepage = http://divmod.org/trac/wiki/DivmodNevow;
478       license = "BSD-style";
479     };
480   });
482   nose = buildPythonPackage {
483     name = "nose-0.11.3";
484     
485     src = fetchurl {
486       url = http://python-nose.googlecode.com/files/nose-0.11.3.tar.gz;
487       sha256 = "1hl3lbwdfl2a64q3dxc73kbiks4iwx5cixlbavyryd8xdr7iziww";
488     };
489     
490     meta = {
491       description = "A unittest-based testing framework for python that makes writing and running tests easier";
492     };
493   };
495   notify = pkgs.stdenv.mkDerivation (rec {
496     name = "python-notify-0.1.1";
498     src = fetchurl {
499       url = http://www.galago-project.org/files/releases/source/notify-python/notify-python-0.1.1.tar.bz2;
500       sha256 = "1kh4spwgqxm534qlzzf2ijchckvs0pwjxl1irhicjmlg7mybnfvx";
501     };
503     buildInputs = [ python pkgs.pkgconfig pkgs.libnotify pkgs.pygobject pkgs.pygtk pkgs.gtkLibs.glib pkgs.gtkLibs.gtk pkgs.dbus_glib ];
505     meta = {
506       description = "Python bindings for libnotify";
507       homepage = http://www.galago-project.org/;
508     };
509   });
511   numpy = buildPythonPackage ( rec {
512     name = "numpy-1.4.1";
514     src = fetchurl {
515       url = "mirror://sourceforge/numpy/${name}.tar.gz";
516       sha256 = "01lf3nc2lp1qkrqnnar50vb7i6y07d1zs6f9yc3kw4p5fd2vhyrf";
517     };
519     # TODO: add ATLAS=${pkgs.atlas}
520     installCommand = ''
521       export BLAS=${pkgs.blas} LAPACK=${pkgs.liblapack}
522       python setup.py build --fcompiler="gnu95"
523       python setup.py install --root="$out"
524     '';
525     doCheck = false;
527     buildInputs = [ pkgs.gfortran ];
528     propagatedBuildInputs = [ pkgs.liblapack pkgs.blas ];
530     meta = {
531       description = "Scientific tools for Python";
532       homepage = "http://numpy.scipy.org/";
533     };
534   });
536   ply = buildPythonPackage (rec {
537     name = "ply-3.2";
539     src = fetchurl {
540       url = "http://www.dabeaz.com/ply/${name}.tar.gz";
541       sha256 = "10z4xq8lc8c21v4g7z3zpnvpqbc0vidigrck1kqhwgkqi4gh0kfj";
542     };
544     meta = {
545       homepage = http://www.dabeaz.com/ply/;
547       description = "PLY (Python Lex-Yacc), an implementation of the lex and yacc parsing tools for Python";
549       longDescription = ''
550         PLY is an implementation of lex and yacc parsing tools for Python.
551         In a nutshell, PLY is nothing more than a straightforward lex/yacc
552         implementation.  Here is a list of its essential features: It's
553         implemented entirely in Python; It uses LR-parsing which is
554         reasonably efficient and well suited for larger grammars; PLY
555         provides most of the standard lex/yacc features including support for
556         empty productions, precedence rules, error recovery, and support for
557         ambiguous grammars; PLY is straightforward to use and provides very
558         extensive error checking; PLY doesn't try to do anything more or less
559         than provide the basic lex/yacc functionality.  In other words, it's
560         not a large parsing framework or a component of some larger system.
561       '';
563       license = "revised-BSD";
565       maintainers = [ stdenv.lib.maintainers.ludo ];
566       platforms = python.meta.platforms;
567     };
568   });
570   paramiko = buildPythonPackage {
571     name = "paramiko-1.7.6";
573     src = fetchurl {
574       url = "http://www.lag.net/paramiko/download/paramiko-1.7.6.tar.gz";
575       sha256 = "00jhzl3s9xdkbj32h1kq1swk8wpx9zky7qfda40n8mb204xjcn9h";
576     };
578     buildInputs = [ pkgs.pycrypto ];
580     doCheck = false;
582     meta = {
583       homepage = "http://www.lag.net/paramiko/";
584       description = "SSH2 protocol for python";
585       license = "LGPL";
587       longDescription = ''
588         paramiko is a module for python 2.2 (or higher) that implements the
589         SSH2 protocol for secure (encrypted and authenticated) connections to
590         remote machines. unlike SSL (aka TLS), SSH2 protocol does not require
591         heirarchical certificates signed by a powerful central authority. you
592         may know SSH2 as the protocol that replaced telnet and rsh for secure
593         access to remote shells, but the protocol also includes the ability
594         to open arbitrary channels to remote services across the encrypted
595         tunnel -- this is how sftp works, for example.  it is written
596         entirely in python (no C or platform-dependent code) and is released
597         under the GNU LGPL (lesser GPL).  '';
599       platforms = python.meta.platforms;
600     };
601   };
603   pexpect = buildPythonPackage {
604     name = "pexpect-2.3";
606     src = fetchurl {
607       url = "http://pexpect.sourceforge.net/pexpect-2.3.tar.gz";
608       sha256 = "0x8bfjjqygriry1iyygm5048ykl5qpbpzqfp6i8dhkslm3ryf5fk";
609     };
611     doCheck = false;
613     meta = {
614       homepage = "http://www.noah.org/wiki/Pexpect";
615       description = "Automate interactive console applications such as ssh, ftp, etc.";
616       license = "MIT";
618       longDescription = ''
619         Pexpect is similar to the Don Libes "Expect" system, but Pexpect
620         as a different interface that is easier to understand. Pexpect
621         is basically a pattern matching system. It runs programs and
622         watches output. When output matches a given pattern Pexpect can
623         respond as if a human were typing responses. Pexpect can be used
624         for automation, testing, and screen scraping. Pexpect can be
625         used for automating interactive console applications such as
626         ssh, ftp, passwd, telnet, etc. It can also be used to control
627         web applications via "lynx", "w3m", or some other text-based web
628         browser. Pexpect is pure Python. Unlike other Expect-like
629         modules for Python Pexpect does not require TCL or Expect nor
630         does it require C extensions to be compiled. It should work on
631         any platform that supports the standard Python pty module.
632       '';
634       maintainers = [ stdenv.lib.maintainers.simons ];
635       platforms = python.meta.platforms;
636     };
637   };
639   psycopg2 = buildPythonPackage rec {
640     name = "psycopg2-2.0.13";
642     doCheck = false;
644     src = fetchurl {
645       url = "http://initd.org/pub/software/psycopg/PSYCOPG-2-0/${name}.tar.gz";
646       sha256 = "0arkaa1nbbd3pyn4l1bc75wi7nff3vxxh4s8sj5al5hv20p64pm1";
647     };
649     propagatedBuildInputs = [ pkgs.postgresql ];
651     meta = {
652       description = "PostgreSQL database adapter for the Python programming language";
653       license = "GPLv2/ZPL";
654     };
655   };
657   pyasn1 = buildPythonPackage ({
658     name = "pyasn1-0.0.11a";
660     src = fetchurl {
661       url = "mirror://sourceforge/pyasn1/pyasn1-devel/0.0.11a/pyasn1-0.0.11a.tar.gz";
662       sha256 = "0b7q67ygdk48zn07pyhyg7r0b74gds50652ndpzfw4vs8l3vjg0b";
663     };
665     meta = {
666       description = "ASN.1 tools for Python";
668       homepage = http://pyasn1.sourceforge.net/;
670       license = "mBSD";
672       platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
673     };
674   });
676   pycryptopp = buildPythonPackage (rec {
677     name = "pycryptopp-0.5.19";
679     src = fetchurl {
680       url = "http://pypi.python.org/packages/source/p/pycryptopp/${name}.tar.gz";
681       sha256 = "6b610b3e5742d366d4fbe96b5f20d8459db9aba4fb802e6e5aab547f22ad04b9";
682     };
684     # Prefer crypto++ library from the Nix store over the one that's included
685     # in the pycryptopp distribution.
686     preConfigure = "export PYCRYPTOPP_DISABLE_EMBEDDED_CRYPTOPP=1";
688     buildInputs = [ setuptoolsDarcs darcsver pkgs.cryptopp ];
690     meta = {
691       homepage = http://allmydata.org/trac/pycryptopp;
693       description = "Python wrappers for the Crypto++ library";
695       license = "GPLv2+";
697       maintainers = [ stdenv.lib.maintainers.ludo ];
698       platforms = stdenv.lib.platforms.linux;
699     };
700   });
702   pyopengl =
703     let version = "3.0.0b5";
704     in
705       buildPythonPackage {
706         name = "pyopengl-${version}";
708         src = fetchurl {
709           url = "mirror://sourceforge/pyopengl/PyOpenGL-${version}.tar.gz";
710           sha256 = "1rjpl2qdcqn4wamkik840mywdycd39q8dn3wqfaiv35jdsbifxx3";
711         };
713         propagatedBuildInputs = with pkgs; [ mesa freeglut pil ];
715         meta = {
716           homepage = http://pyopengl.sourceforge.net/;
717           description = "PyOpenGL, the Python OpenGL bindings";
719           longDescription = ''
720             PyOpenGL is the cross platform Python binding to OpenGL and
721             related APIs.  The binding is created using the standard (in
722             Python 2.5) ctypes library, and is provided under an extremely
723             liberal BSD-style Open-Source license.
724           '';
726           license = "BSD-style";
727         };
728       };
730   pysqlite = buildPythonPackage (rec {
731     name = "pysqlite-2.5.5";
733     src = fetchurl {
734       url = "http://pysqlite.googlecode.com/files/${name}.tar.gz";
735       sha256 = "ef7ca7f44893790e1a7084b10ea083770e138689406fddc7076d12d6bff4d44f";
736     };
738     # Since the `.egg' file is zipped, the `NEEDED' of the `.so' files
739     # it contains is not taken into account.  Thus, we must explicitly make
740     # it a propagated input.
741     propagatedBuildInputs = [ pkgs.sqlite ];
743     patchPhase = ''
744       substituteInPlace "setup.cfg"                                     \
745               --replace "/usr/local/include" "${pkgs.sqlite}/include"   \
746               --replace "/usr/local/lib" "${pkgs.sqlite}/lib"
747     '';
749     # FIXME: How do we run the tests?
750     doCheck = false;
752     meta = {
753       homepage = http://pysqlite.org/;
755       description = "Python bindings for the SQLite embedded relational database engine";
757       longDescription = ''
758         pysqlite is a DB-API 2.0-compliant database interface for SQLite.
760         SQLite is a relational database management system contained in
761         a relatively small C library.  It is a public domain project
762         created by D. Richard Hipp.  Unlike the usual client-server
763         paradigm, the SQLite engine is not a standalone process with
764         which the program communicates, but is linked in and thus
765         becomes an integral part of the program.  The library
766         implements most of SQL-92 standard, including transactions,
767         triggers and most of complex queries.
769         pysqlite makes this powerful embedded SQL engine available to
770         Python programmers.  It stays compatible with the Python
771         database API specification 2.0 as much as possible, but also
772         exposes most of SQLite's native API, so that it is for example
773         possible to create user-defined SQL functions and aggregates
774         in Python.
775       '';
777       license = "revised BSD";
779       maintainers = [ stdenv.lib.maintainers.ludo ];
780       platforms = python.meta.platforms;
781     };
782   });
784   pyutil = buildPythonPackage (rec {
785     name = "pyutil-1.7.9";
787     src = fetchurl {
788       url = "http://pypi.python.org/packages/source/p/pyutil/${name}.tar.gz";
789       sha256 = "c303bb779f96073820e2eb7c9692fe15a57df491eb356839f3cb3377ed03b844";
790     };
792     buildInputs = [ setuptoolsDarcs setuptoolsTrial ] ++ (if doCheck then [ simplejson ] else []);
793     propagatedBuildInputs = [ zbase32 argparse twisted ];
794     # Tests fail because they try to write new code into the twisted
795     # package, apparently some kind of plugin.
796     doCheck = false;
798     meta = {
799       description = "Pyutil, a collection of mature utilities for Python programmers";
801       longDescription = ''
802         These are a few data structures, classes and functions which
803         we've needed over many years of Python programming and which
804         seem to be of general use to other Python programmers. Many of
805         the modules that have existed in pyutil over the years have
806         subsequently been obsoleted by new features added to the
807         Python language or its standard library, thus showing that
808         we're not alone in wanting tools like these.
809       '';
811       homepage = http://allmydata.org/trac/pyutil;
813       license = "GPLv2+";
814     };
815   });
817   pyyaml = buildPythonPackage (rec {
818     name = "PyYAML-3.09";
820     src = fetchurl {
821       url = "http://pyyaml.org/download/pyyaml/PyYAML-3.09.zip";
822       sha256 = "204aca8b42dbe90e460794d743dd16182011da85507bfd4f092f9f76e0688040";
823     };
825     buildInputs = [ pkgs.unzip pkgs.pyrex ];
826     propagatedBuildInputs = [ pkgs.libyaml ];
828     meta = {
829       description = "The next generation YAML parser and emitter for Python";
830       homepage = http://pyyaml.org;
831       license = "free"; # !?
832     };
833   });
835   rdflib = buildPythonPackage (rec {
836     name = "rdflib-3.0.0";
838     src = fetchurl {
839       url = "http://www.rdflib.net/${name}.tar.gz";
840       sha256 = "1c7ipk5vwqnln83rmai5jzyxkjdajdzbk5cgy1z83nyr5hbkgkqr";
841     };
843     doCheck = false;
845     postInstall = ''
846       find $out -name easy-install.pth | xargs rm -v
847       find $out -name 'site.py*' | xargs rm -v
848     '';
850     meta = {
851       description = "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.";
852       homepage = http://www.rdflib.net/;
853     };
854   });
856   pysvn = pkgs.stdenv.mkDerivation {
857     name = "pysvn-1.7.2";
859     src = fetchurl {
860       url = "http://pysvn.barrys-emacs.org/source_kits/pysvn-1.7.2.tar.gz";
861       sha256 = "2b2980d200515e754e00a12d99dbce25c1ea90fddf8cba2bfa354c9305c5e455";
862     };
864     buildInputs = [ python pkgs.subversion pkgs.apr pkgs.aprutil pkgs.expat pkgs.neon pkgs.openssl ]
865       ++ (if stdenv.isLinux then [pkgs.e2fsprogs] else []);
867     # There seems to be no way to pass that path to configure.
868     NIX_CFLAGS_COMPILE="-I${pkgs.aprutil}/include/apr-1";
870     configurePhase = ''
871       cd Source
872       python setup.py backport
873       python setup.py configure \
874         --apr-inc-dir=${pkgs.apr}/include/apr-1 \
875         --apr-lib-dir=${pkgs.apr}/lib \
876         --svn-root-dir=${pkgs.subversion}
877     '' + (if !stdenv.isDarwin then "" else ''
878       sed -i -e 's|libpython2.7.dylib|lib/libpython2.7.dylib|' Makefile
879     '');
881     # The regression test suite expects locale support, which our glibc
882     # doesn't have by default.
883     doCheck = false;
884     checkPhase = "make -C ../Tests";
886     installPhase = ''
887       dest=$(toPythonPath $out)/pysvn
888       ensureDir $dest
889       cp pysvn/__init__.py $dest/
890       cp pysvn/_pysvn*.so $dest/
891       ensureDir $out/share/doc
892       mv -v ../Docs $out/share/doc/pysvn-1.7.2
893       rm -v $out/share/doc/pysvn-1.7.2/generate_cpp_docs_from_html_docs.py
894     '';
896     meta = {
897       description = "Python bindings for Subversion";
898       homepage = "http://pysvn.tigris.org/";
899     };
900   };
902   magic = pkgs.stdenv.mkDerivation rec {
903     name = "python-${pkgs.file.name}";
905     src = pkgs.file.src;
907     buildInputs = [ python pkgs.file ];
909     configurePhase = "cd python";
911     buildPhase = "python setup.py build";
913     installPhase = "python setup.py install --prefix=$out";
915     meta = {
916       description = "A Python wrapper around libmagic";
917       homepage = http://www.darwinsys.com/file/;
918     };
919   };
920   
921   MySQL_python = buildPythonPackage {
922     name = "MySQL-python-1.2.3";
923     
924     doCheck = false;
925     
926     src = fetchurl {
927       url = mirror://sourceforge/mysql-python/MySQL-python-1.2.3.tar.gz;
928       sha256 = "0vkyg9dmj29hzk7fy77f42p7bfj28skyzsjsjry4wqr3z6xnzrkx";
929     };
930     
931     propagatedBuildInputs = [ pkgs.mysql pkgs.zlib nose ];
932     
933     meta = {
934       description = "MySQL database binding for Python";
936       homepage = http://sourceforge.net/projects/mysql-python;
937     };
938   };
940   setuptoolsDarcs = buildPythonPackage {
941     name = "setuptools-darcs-1.2.9";
943     src = fetchurl {
944       url = "http://pypi.python.org/packages/source/s/setuptools_darcs/setuptools_darcs-1.2.9.tar.gz";
945       sha256 = "d37ce11030addbd729284c441facd0869cdc6e5c888dc5fa0a6f1edfe3c3e617";
946     };
948     # In order to break the dependency on darcs -> ghc, we don't add
949     # darcs as a propagated build input.
950     propagatedBuildInputs = [ darcsver ];
952     meta = {
953       description = "setuptools plugin for the Darcs version control system";
955       homepage = http://allmydata.org/trac/setuptools_darcs;
957       license = "BSD";
958     };
959   };
961   setuptoolsTrial = buildPythonPackage {
962     name = "setuptools-trial-0.5.9";
964     src = fetchurl {
965       url = "http://pypi.python.org/packages/source/s/setuptools_trial/setuptools_trial-0.5.9.tar.gz";
966       sha256 = "4e3b5a183b9cf6ff637777c9852dfe8eaab156289e7a578525d68b1cfb3c9f29";
967     };
969     propagatedBuildInputs = [ twisted ];
971     meta = {
972       description = "setuptools plug-in that helps run unit tests built with the \"Trial\" framework (from Twisted)";
974       homepage = http://allmydata.org/trac/setuptools_trial;
976       license = "unspecified"; # !
977     };
978   };
980   simplejson = buildPythonPackage (rec {
981     name = "simplejson-2.1.1";
983     src = fetchurl {
984       url = "http://pypi.python.org/packages/source/s/simplejson/${name}.tar.gz";
985       sha256 = "8c1c833c5b997bf7b75bf9a02a2d2884b8427816228eac0fb84791be44d2f612";
986     };
988     meta = {
989       description = "simplejson is a simple, fast, extensible JSON encoder/decoder for Python";
991       longDescription = ''
992         simplejson is compatible with Python 2.4 and later with no
993         external dependencies.  It covers the full JSON specification
994         for both encoding and decoding, with unicode support.  By
995         default, encoding is done in an encoding neutral fashion (plain
996         ASCII with \uXXXX escapes for unicode characters).
997       '';
999       homepage = http://code.google.com/p/simplejson/;
1001       license = "MIT";
1002     };
1003   });
1005   trac = buildPythonPackage {
1006     name = "trac-0.11.5";
1008     src = fetchurl {
1009       url = http://ftp.edgewall.com/pub/trac/Trac-0.11.5.tar.gz;
1010       sha256 = "cc3362ecc533abc1755dd78e2d096d1413bc975abc3185318f4821458cd6a8ac";
1011     };
1013     doCheck = false;
1015     PYTHON_EGG_CACHE = "`pwd`/.egg-cache";
1017     propagatedBuildInputs = [ genshi pkgs.setuptools ];
1019     meta = {
1020       description = "Enhanced wiki and issue tracking system for software development projects";
1022       license = "BSD";
1023     };
1024   };
1026   twisted = buildPythonPackage {
1027     name = "twisted-10.1.0";
1029     src = fetchurl {
1030       url = http://tmrc.mit.edu/mirror/twisted/Twisted/10.1/Twisted-10.1.0.tar.bz2;
1031       sha256 = "eda6e0e9e5ef6f6c19ab75bcb094f83a12ee25fe589fbcddf946e8a655c8070b";
1032     };
1034     propagatedBuildInputs = [ zopeInterface ];
1036     # Generate Twisted's plug-in cache.  Twited users must do it as well.  See
1037     # http://twistedmatrix.com/documents/current/core/howto/plugin.html#auto3
1038     # and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477103 for
1039     # details.
1040     postInstall = "$out/bin/twistd --help > /dev/null";
1042     meta = {
1043       homepage = http://twistedmatrix.com/;
1045       description = "Twisted, an event-driven networking engine written in Python";
1047       longDescription = ''
1048         Twisted is an event-driven networking engine written in Python
1049         and licensed under the MIT license.
1050       '';
1052       license = "MIT";
1054       maintainers = [ stdenv.lib.maintainers.ludo ];
1055       platforms = python.meta.platforms;
1056     };
1057   };
1059   zbase32 = buildPythonPackage (rec {
1060     name = "zbase32-1.1.2";
1062     src = fetchurl {
1063       url = "http://pypi.python.org/packages/source/z/zbase32/${name}.tar.gz";
1064       sha256 = "2f44b338f750bd37b56e7887591bf2f1965bfa79f163b6afcbccf28da642ec56";
1065     };
1067     # Tests require `pyutil' so disable them to avoid circular references.
1068     doCheck = false;
1070     buildInputs = [ setuptoolsDarcs ];
1072     meta = {
1073       description = "zbase32, a base32 encoder/decoder";
1075       homepage = http://pypi.python.org/pypi/zbase32;
1077       license = "BSD";
1078     };
1079   });
1081   zfec = buildPythonPackage (rec {
1082     name = "zfec-1.4.7";
1084     src = fetchurl {
1085       url = "http://pypi.python.org/packages/source/z/zfec/${name}.tar.gz";
1086       sha256 = "3335c9054f45e2c59188400e892634b68761b29d06f3cafe525c60484902d379";
1087     };
1089     buildInputs = [ setuptoolsDarcs ];
1090     propagatedBuildInputs = [ pyutil argparse ];
1092     meta = {
1093       homepage = http://allmydata.org/trac/zfec;
1095       description = "Zfec, a fast erasure codec which can be used with the command-line, C, Python, or Haskell";
1097       longDescription = ''
1098         Fast, portable, programmable erasure coding a.k.a. "forward
1099         error correction": the generation of redundant blocks of
1100         information such that if some blocks are lost then the
1101         original data can be recovered from the remaining blocks. The
1102         zfec package includes command-line tools, C API, Python API,
1103         and Haskell API.
1104       '';
1106       license = "GPLv2+";
1107     };
1108   });
1110   zopeInterface = buildPythonPackage {
1111     name = "zope-interface-3.6.1";
1112     src = fetchurl {
1113       url = "http://pypi.python.org/packages/source/z/zope.interface/zope.interface-3.6.1.tar.gz";
1114       sha256 = "294c3c0529e84169177bce78d616c768fa1c028a2fbc1854f615d32ed88dbc6c";
1115     };
1117     doCheck = false;
1119     meta = {
1120       description = "Zope.Interface";
1121       homepage = http://zope.org/Products/ZopeInterface;
1122       license = "ZPL";
1123     };
1124   };