paramiko: fix chroot build: use pycrypto from Nixpkgs instead of getting it from...
[nixpkgs-libre.git] / pkgs / top-level / python-packages.nix
blob2b780ce68d828586dddbbab2bdb7cdbbe7e7628c
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   notify = pkgs.stdenv.mkDerivation (rec {
483     name = "python-notify-0.1.1";
485     src = fetchurl {
486       url = http://www.galago-project.org/files/releases/source/notify-python/notify-python-0.1.1.tar.bz2;
487       sha256 = "1kh4spwgqxm534qlzzf2ijchckvs0pwjxl1irhicjmlg7mybnfvx";
488     };
490     buildInputs = [ python pkgs.pkgconfig pkgs.libnotify pkgs.pygobject pkgs.pygtk pkgs.gtkLibs.glib pkgs.gtkLibs.gtk pkgs.dbus_glib ];
492     meta = {
493       description = "Python bindings for libnotify";
494       homepage = http://www.galago-project.org/;
495     };
496   });
498   numpy = buildPythonPackage ( rec {
499     name = "numpy-1.4.1";
501     src = fetchurl {
502       url = "mirror://sourceforge/numpy/${name}.tar.gz";
503       sha256 = "01lf3nc2lp1qkrqnnar50vb7i6y07d1zs6f9yc3kw4p5fd2vhyrf";
504     };
506     # TODO: add ATLAS=${pkgs.atlas}
507     installCommand = ''
508       export BLAS=${pkgs.blas} LAPACK=${pkgs.liblapack}
509       python setup.py build --fcompiler="gnu95"
510       python setup.py install --root="$out"
511     '';
512     doCheck = false;
514     buildInputs = [ pkgs.gfortran ];
515     propagatedBuildInputs = [ pkgs.liblapack pkgs.blas ];
517     meta = {
518       description = "Scientific tools for Python";
519       homepage = "http://numpy.scipy.org/";
520     };
521   });
523   ply = buildPythonPackage (rec {
524     name = "ply-3.2";
526     src = fetchurl {
527       url = "http://www.dabeaz.com/ply/${name}.tar.gz";
528       sha256 = "10z4xq8lc8c21v4g7z3zpnvpqbc0vidigrck1kqhwgkqi4gh0kfj";
529     };
531     meta = {
532       homepage = http://www.dabeaz.com/ply/;
534       description = "PLY (Python Lex-Yacc), an implementation of the lex and yacc parsing tools for Python";
536       longDescription = ''
537         PLY is an implementation of lex and yacc parsing tools for Python.
538         In a nutshell, PLY is nothing more than a straightforward lex/yacc
539         implementation.  Here is a list of its essential features: It's
540         implemented entirely in Python; It uses LR-parsing which is
541         reasonably efficient and well suited for larger grammars; PLY
542         provides most of the standard lex/yacc features including support for
543         empty productions, precedence rules, error recovery, and support for
544         ambiguous grammars; PLY is straightforward to use and provides very
545         extensive error checking; PLY doesn't try to do anything more or less
546         than provide the basic lex/yacc functionality.  In other words, it's
547         not a large parsing framework or a component of some larger system.
548       '';
550       license = "revised-BSD";
552       maintainers = [ stdenv.lib.maintainers.ludo ];
553       platforms = python.meta.platforms;
554     };
555   });
557   paramiko = buildPythonPackage {
558     name = "paramiko-1.7.6";
560     src = fetchurl {
561       url = "http://www.lag.net/paramiko/download/paramiko-1.7.6.tar.gz";
562       sha256 = "00jhzl3s9xdkbj32h1kq1swk8wpx9zky7qfda40n8mb204xjcn9h";
563     };
565     buildInputs = [ pkgs.pycrypto ];
567     doCheck = false;
569     meta = {
570       homepage = "http://www.lag.net/paramiko/";
571       description = "SSH2 protocol for python";
572       license = "LGPL";
574       longDescription = ''
575         paramiko is a module for python 2.2 (or higher) that implements the
576         SSH2 protocol for secure (encrypted and authenticated) connections to
577         remote machines. unlike SSL (aka TLS), SSH2 protocol does not require
578         heirarchical certificates signed by a powerful central authority. you
579         may know SSH2 as the protocol that replaced telnet and rsh for secure
580         access to remote shells, but the protocol also includes the ability
581         to open arbitrary channels to remote services across the encrypted
582         tunnel -- this is how sftp works, for example.  it is written
583         entirely in python (no C or platform-dependent code) and is released
584         under the GNU LGPL (lesser GPL).  '';
586       platforms = python.meta.platforms;
587     };
588   };
590   pexpect = buildPythonPackage {
591     name = "pexpect-2.3";
593     src = fetchurl {
594       url = "http://pexpect.sourceforge.net/pexpect-2.3.tar.gz";
595       sha256 = "0x8bfjjqygriry1iyygm5048ykl5qpbpzqfp6i8dhkslm3ryf5fk";
596     };
598     doCheck = false;
600     meta = {
601       homepage = "http://www.noah.org/wiki/Pexpect";
602       description = "Automate interactive console applications such as ssh, ftp, etc.";
603       license = "MIT";
605       longDescription = ''
606         Pexpect is similar to the Don Libes "Expect" system, but Pexpect
607         as a different interface that is easier to understand. Pexpect
608         is basically a pattern matching system. It runs programs and
609         watches output. When output matches a given pattern Pexpect can
610         respond as if a human were typing responses. Pexpect can be used
611         for automation, testing, and screen scraping. Pexpect can be
612         used for automating interactive console applications such as
613         ssh, ftp, passwd, telnet, etc. It can also be used to control
614         web applications via "lynx", "w3m", or some other text-based web
615         browser. Pexpect is pure Python. Unlike other Expect-like
616         modules for Python Pexpect does not require TCL or Expect nor
617         does it require C extensions to be compiled. It should work on
618         any platform that supports the standard Python pty module.
619       '';
621       maintainers = [ stdenv.lib.maintainers.simons ];
622       platforms = python.meta.platforms;
623     };
624   };
626   psycopg2 = buildPythonPackage rec {
627     name = "psycopg2-2.0.13";
629     doCheck = false;
631     src = fetchurl {
632       url = "http://initd.org/pub/software/psycopg/PSYCOPG-2-0/${name}.tar.gz";
633       sha256 = "0arkaa1nbbd3pyn4l1bc75wi7nff3vxxh4s8sj5al5hv20p64pm1";
634     };
636     propagatedBuildInputs = [ pkgs.postgresql ];
638     meta = {
639       description = "PostgreSQL database adapter for the Python programming language";
640       license = "GPLv2/ZPL";
641     };
642   };
644   pyasn1 = buildPythonPackage ({
645     name = "pyasn1-0.0.11a";
647     src = fetchurl {
648       url = "mirror://sourceforge/pyasn1/pyasn1-devel/0.0.11a/pyasn1-0.0.11a.tar.gz";
649       sha256 = "0b7q67ygdk48zn07pyhyg7r0b74gds50652ndpzfw4vs8l3vjg0b";
650     };
652     meta = {
653       description = "ASN.1 tools for Python";
655       homepage = http://pyasn1.sourceforge.net/;
657       license = "mBSD";
659       platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
660     };
661   });
663   pycryptopp = buildPythonPackage (rec {
664     name = "pycryptopp-0.5.19";
666     src = fetchurl {
667       url = "http://pypi.python.org/packages/source/p/pycryptopp/${name}.tar.gz";
668       sha256 = "6b610b3e5742d366d4fbe96b5f20d8459db9aba4fb802e6e5aab547f22ad04b9";
669     };
671     # Prefer crypto++ library from the Nix store over the one that's included
672     # in the pycryptopp distribution.
673     preConfigure = "export PYCRYPTOPP_DISABLE_EMBEDDED_CRYPTOPP=1";
675     buildInputs = [ setuptoolsDarcs darcsver pkgs.cryptopp ];
677     meta = {
678       homepage = http://allmydata.org/trac/pycryptopp;
680       description = "Python wrappers for the Crypto++ library";
682       license = "GPLv2+";
684       maintainers = [ stdenv.lib.maintainers.ludo ];
685       platforms = stdenv.lib.platforms.linux;
686     };
687   });
689   pyopengl =
690     let version = "3.0.0b5";
691     in
692       buildPythonPackage {
693         name = "pyopengl-${version}";
695         src = fetchurl {
696           url = "mirror://sourceforge/pyopengl/PyOpenGL-${version}.tar.gz";
697           sha256 = "1rjpl2qdcqn4wamkik840mywdycd39q8dn3wqfaiv35jdsbifxx3";
698         };
700         propagatedBuildInputs = with pkgs; [ mesa freeglut pil ];
702         meta = {
703           homepage = http://pyopengl.sourceforge.net/;
704           description = "PyOpenGL, the Python OpenGL bindings";
706           longDescription = ''
707             PyOpenGL is the cross platform Python binding to OpenGL and
708             related APIs.  The binding is created using the standard (in
709             Python 2.5) ctypes library, and is provided under an extremely
710             liberal BSD-style Open-Source license.
711           '';
713           license = "BSD-style";
714         };
715       };
717   pysqlite = buildPythonPackage (rec {
718     name = "pysqlite-2.5.5";
720     src = fetchurl {
721       url = "http://pysqlite.googlecode.com/files/${name}.tar.gz";
722       sha256 = "ef7ca7f44893790e1a7084b10ea083770e138689406fddc7076d12d6bff4d44f";
723     };
725     # Since the `.egg' file is zipped, the `NEEDED' of the `.so' files
726     # it contains is not taken into account.  Thus, we must explicitly make
727     # it a propagated input.
728     propagatedBuildInputs = [ pkgs.sqlite ];
730     patchPhase = ''
731       substituteInPlace "setup.cfg"                                     \
732               --replace "/usr/local/include" "${pkgs.sqlite}/include"   \
733               --replace "/usr/local/lib" "${pkgs.sqlite}/lib"
734     '';
736     # FIXME: How do we run the tests?
737     doCheck = false;
739     meta = {
740       homepage = http://pysqlite.org/;
742       description = "Python bindings for the SQLite embedded relational database engine";
744       longDescription = ''
745         pysqlite is a DB-API 2.0-compliant database interface for SQLite.
747         SQLite is a relational database management system contained in
748         a relatively small C library.  It is a public domain project
749         created by D. Richard Hipp.  Unlike the usual client-server
750         paradigm, the SQLite engine is not a standalone process with
751         which the program communicates, but is linked in and thus
752         becomes an integral part of the program.  The library
753         implements most of SQL-92 standard, including transactions,
754         triggers and most of complex queries.
756         pysqlite makes this powerful embedded SQL engine available to
757         Python programmers.  It stays compatible with the Python
758         database API specification 2.0 as much as possible, but also
759         exposes most of SQLite's native API, so that it is for example
760         possible to create user-defined SQL functions and aggregates
761         in Python.
762       '';
764       license = "revised BSD";
766       maintainers = [ stdenv.lib.maintainers.ludo ];
767       platforms = python.meta.platforms;
768     };
769   });
771   pyutil = buildPythonPackage (rec {
772     name = "pyutil-1.7.9";
774     src = fetchurl {
775       url = "http://pypi.python.org/packages/source/p/pyutil/${name}.tar.gz";
776       sha256 = "c303bb779f96073820e2eb7c9692fe15a57df491eb356839f3cb3377ed03b844";
777     };
779     buildInputs = [ setuptoolsDarcs setuptoolsTrial ] ++ (if doCheck then [ simplejson ] else []);
780     propagatedBuildInputs = [ zbase32 argparse twisted ];
781     # Tests fail because they try to write new code into the twisted
782     # package, apparently some kind of plugin.
783     doCheck = false;
785     meta = {
786       description = "Pyutil, a collection of mature utilities for Python programmers";
788       longDescription = ''
789         These are a few data structures, classes and functions which
790         we've needed over many years of Python programming and which
791         seem to be of general use to other Python programmers. Many of
792         the modules that have existed in pyutil over the years have
793         subsequently been obsoleted by new features added to the
794         Python language or its standard library, thus showing that
795         we're not alone in wanting tools like these.
796       '';
798       homepage = http://allmydata.org/trac/pyutil;
800       license = "GPLv2+";
801     };
802   });
804   pyyaml = buildPythonPackage (rec {
805     name = "PyYAML-3.09";
807     src = fetchurl {
808       url = "http://pyyaml.org/download/pyyaml/PyYAML-3.09.zip";
809       sha256 = "204aca8b42dbe90e460794d743dd16182011da85507bfd4f092f9f76e0688040";
810     };
812     buildInputs = [ pkgs.unzip pkgs.pyrex ];
813     propagatedBuildInputs = [ pkgs.libyaml ];
815     meta = {
816       description = "The next generation YAML parser and emitter for Python";
817       homepage = http://pyyaml.org;
818       license = "free"; # !?
819     };
820   });
822   rdflib = buildPythonPackage (rec {
823     name = "rdflib-3.0.0";
825     src = fetchurl {
826       url = "http://www.rdflib.net/${name}.tar.gz";
827       sha256 = "1c7ipk5vwqnln83rmai5jzyxkjdajdzbk5cgy1z83nyr5hbkgkqr";
828     };
830     doCheck = false;
832     postInstall = ''
833       find $out -name easy-install.pth | xargs rm -v
834       find $out -name 'site.py*' | xargs rm -v
835     '';
837     meta = {
838       description = "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.";
839       homepage = http://www.rdflib.net/;
840     };
841   });
843   setuptoolsDarcs = buildPythonPackage {
844     name = "setuptools-darcs-1.2.9";
846     src = fetchurl {
847       url = "http://pypi.python.org/packages/source/s/setuptools_darcs/setuptools_darcs-1.2.9.tar.gz";
848       sha256 = "d37ce11030addbd729284c441facd0869cdc6e5c888dc5fa0a6f1edfe3c3e617";
849     };
851     # In order to break the dependency on darcs -> ghc, we don't add
852     # darcs as a propagated build input.
853     propagatedBuildInputs = [ darcsver ];
855     meta = {
856       description = "setuptools plugin for the Darcs version control system";
858       homepage = http://allmydata.org/trac/setuptools_darcs;
860       license = "BSD";
861     };
862   };
864   setuptoolsTrial = buildPythonPackage {
865     name = "setuptools-trial-0.5.9";
867     src = fetchurl {
868       url = "http://pypi.python.org/packages/source/s/setuptools_trial/setuptools_trial-0.5.9.tar.gz";
869       sha256 = "4e3b5a183b9cf6ff637777c9852dfe8eaab156289e7a578525d68b1cfb3c9f29";
870     };
872     propagatedBuildInputs = [ twisted ];
874     meta = {
875       description = "setuptools plug-in that helps run unit tests built with the \"Trial\" framework (from Twisted)";
877       homepage = http://allmydata.org/trac/setuptools_trial;
879       license = "unspecified"; # !
880     };
881   };
883   simplejson = buildPythonPackage (rec {
884     name = "simplejson-2.1.1";
886     src = fetchurl {
887       url = "http://pypi.python.org/packages/source/s/simplejson/${name}.tar.gz";
888       sha256 = "8c1c833c5b997bf7b75bf9a02a2d2884b8427816228eac0fb84791be44d2f612";
889     };
891     meta = {
892       description = "simplejson is a simple, fast, extensible JSON encoder/decoder for Python";
894       longDescription = ''
895         simplejson is compatible with Python 2.4 and later with no
896         external dependencies.  It covers the full JSON specification
897         for both encoding and decoding, with unicode support.  By
898         default, encoding is done in an encoding neutral fashion (plain
899         ASCII with \uXXXX escapes for unicode characters).
900       '';
902       homepage = http://code.google.com/p/simplejson/;
904       license = "MIT";
905     };
906   });
908   trac = buildPythonPackage {
909     name = "trac-0.11.5";
911     src = fetchurl {
912       url = http://ftp.edgewall.com/pub/trac/Trac-0.11.5.tar.gz;
913       sha256 = "cc3362ecc533abc1755dd78e2d096d1413bc975abc3185318f4821458cd6a8ac";
914     };
916     doCheck = false;
918     PYTHON_EGG_CACHE = "`pwd`/.egg-cache";
920     propagatedBuildInputs = [ genshi pkgs.setuptools ];
922     meta = {
923       description = "Enhanced wiki and issue tracking system for software development projects";
925       license = "BSD";
926     };
927   };
929   twisted = buildPythonPackage {
930     name = "twisted-10.1.0";
932     src = fetchurl {
933       url = http://tmrc.mit.edu/mirror/twisted/Twisted/10.1/Twisted-10.1.0.tar.bz2;
934       sha256 = "eda6e0e9e5ef6f6c19ab75bcb094f83a12ee25fe589fbcddf946e8a655c8070b";
935     };
937     propagatedBuildInputs = [ zopeInterface ];
939     # Generate Twisted's plug-in cache.  Twited users must do it as well.  See
940     # http://twistedmatrix.com/documents/current/core/howto/plugin.html#auto3
941     # and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477103 for
942     # details.
943     postInstall = "$out/bin/twistd --help > /dev/null";
945     meta = {
946       homepage = http://twistedmatrix.com/;
948       description = "Twisted, an event-driven networking engine written in Python";
950       longDescription = ''
951         Twisted is an event-driven networking engine written in Python
952         and licensed under the MIT license.
953       '';
955       license = "MIT";
957       maintainers = [ stdenv.lib.maintainers.ludo ];
958       platforms = python.meta.platforms;
959     };
960   };
962   zbase32 = buildPythonPackage (rec {
963     name = "zbase32-1.1.2";
965     src = fetchurl {
966       url = "http://pypi.python.org/packages/source/z/zbase32/${name}.tar.gz";
967       sha256 = "2f44b338f750bd37b56e7887591bf2f1965bfa79f163b6afcbccf28da642ec56";
968     };
970     # Tests require `pyutil' so disable them to avoid circular references.
971     doCheck = false;
973     buildInputs = [ setuptoolsDarcs ];
975     meta = {
976       description = "zbase32, a base32 encoder/decoder";
978       homepage = http://pypi.python.org/pypi/zbase32;
980       license = "BSD";
981     };
982   });
984   zfec = buildPythonPackage (rec {
985     name = "zfec-1.4.7";
987     src = fetchurl {
988       url = "http://pypi.python.org/packages/source/z/zfec/${name}.tar.gz";
989       sha256 = "3335c9054f45e2c59188400e892634b68761b29d06f3cafe525c60484902d379";
990     };
992     buildInputs = [ setuptoolsDarcs ];
993     propagatedBuildInputs = [ pyutil argparse ];
995     meta = {
996       homepage = http://allmydata.org/trac/zfec;
998       description = "Zfec, a fast erasure codec which can be used with the command-line, C, Python, or Haskell";
1000       longDescription = ''
1001         Fast, portable, programmable erasure coding a.k.a. "forward
1002         error correction": the generation of redundant blocks of
1003         information such that if some blocks are lost then the
1004         original data can be recovered from the remaining blocks. The
1005         zfec package includes command-line tools, C API, Python API,
1006         and Haskell API.
1007       '';
1009       license = "GPLv2+";
1010     };
1011   });
1013   zopeInterface = buildPythonPackage {
1014     name = "zope-interface-3.6.1";
1015     src = fetchurl {
1016       url = "http://pypi.python.org/packages/source/z/zope.interface/zope.interface-3.6.1.tar.gz";
1017       sha256 = "294c3c0529e84169177bce78d616c768fa1c028a2fbc1854f615d32ed88dbc6c";
1018     };
1020     doCheck = false;
1022     meta = {
1023       description = "Zope.Interface";
1024       homepage = http://zope.org/Products/ZopeInterface;
1025       license = "ZPL";
1026     };
1027   };