From 3997cb99fdf49d371b8a3cd9176101d27bf82c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 7 Jul 2009 22:30:29 +0000 Subject: [PATCH] pysqlite: Move to `python-packages.nix'. svn path=/nixpkgs/trunk/; revision=16229 --- .../python-modules/pysqlite/builder.sh | 21 -------- .../python-modules/pysqlite/default.nix | 46 ---------------- pkgs/top-level/all-packages.nix | 8 +-- pkgs/top-level/python-packages.nix | 53 +++++++++++++++++++ 4 files changed, 55 insertions(+), 73 deletions(-) delete mode 100644 pkgs/development/python-modules/pysqlite/builder.sh delete mode 100644 pkgs/development/python-modules/pysqlite/default.nix diff --git a/pkgs/development/python-modules/pysqlite/builder.sh b/pkgs/development/python-modules/pysqlite/builder.sh deleted file mode 100644 index 6263ca93d65b..000000000000 --- a/pkgs/development/python-modules/pysqlite/builder.sh +++ /dev/null @@ -1,21 +0,0 @@ -source $stdenv/setup - -configurePhase() { - substituteInPlace "setup.cfg" \ - --replace "/usr/local/include" "$sqlite/include" \ - --replace "/usr/local/lib" "$sqlite/lib" - cp setup.cfg /tmp -} - -buildPhase() { - python setup.py build -} - -installPhase() { - python setup.py install --prefix=$out - - ensureDir "$out/doc" - mv -v "$out/pysqlite2-doc" "$out/doc/$name" -} - -genericBuild diff --git a/pkgs/development/python-modules/pysqlite/default.nix b/pkgs/development/python-modules/pysqlite/default.nix deleted file mode 100644 index a9fb43dff97c..000000000000 --- a/pkgs/development/python-modules/pysqlite/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{stdenv, fetchurl, python, sqlite}: - -stdenv.mkDerivation rec { - name = "pysqlite-2.5.5"; - - src = fetchurl { - url = "http://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.5/${name}.tar.gz"; - sha256 = "0kylyjzxc4kd0z3xsvs0i63163kphfh0xcc4f0d0wyck93safz7g"; - }; - - builder = ./builder.sh; - - buildInputs = [ python sqlite ]; - - inherit stdenv sqlite; - - meta = { - homepage = http://pysqlite.org/; - - description = "Python bindings for the SQLite embedded relational database engine"; - - longDescription = '' - pysqlite is a DB-API 2.0-compliant database interface for SQLite. - - SQLite is a relational database management system contained in - a relatively small C library. It is a public domain project - created by D. Richard Hipp. Unlike the usual client-server - paradigm, the SQLite engine is not a standalone process with - which the program communicates, but is linked in and thus - becomes an integral part of the program. The library - implements most of SQL-92 standard, including transactions, - triggers and most of complex queries. - - pysqlite makes this powerful embedded SQL engine available to - Python programmers. It stays compatible with the Python - database API specification 2.0 as much as possible, but also - exposes most of SQLite's native API, so that it is for example - possible to create user-defined SQL functions and aggregates - in Python. - ''; - - license = "revised BSD"; - - maintainers = [ stdenv.lib.maintainers.ludo ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8c6e547049a5..8101ed53c649 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1083,7 +1083,7 @@ let nmap = import ../tools/security/nmap { inherit fetchurl stdenv libpcap pkgconfig openssl python pygtk makeWrapper pygobject pycairo - pysqlite; + pythonPackages.pysqlite; inherit (xlibs) libX11; inherit (gtkLibs) gtk; }; @@ -4440,10 +4440,6 @@ let inherit python openssl; }; - pysqlite = import ../development/python-modules/pysqlite { - inherit stdenv fetchurl python sqlite; - }; - pythonSip = builderDefsPackage (selectVersion ../development/python-modules/python-sip "4.7.4") { inherit python; }; @@ -7966,7 +7962,7 @@ let trac = import ../misc/trac { inherit stdenv fetchurl python clearsilver makeWrapper - sqlite subversion pysqlite; + sqlite subversion pythonPackages.pysqlite; }; vice = import ../misc/emulators/vice { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a8d42f59c650..8d8cb3dcbc09 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -139,6 +139,59 @@ rec { }; }); + pysqlite = buildPythonPackage (rec { + name = "pysqlite-2.5.5"; + + src = fetchurl { + url = "http://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.5/${name}.tar.gz"; + sha256 = "0kylyjzxc4kd0z3xsvs0i63163kphfh0xcc4f0d0wyck93safz7g"; + }; + + # Since the `.egg' file is zipped, the `NEEDED' of the `.so' files + # it contains is not taken into account. Thus, we must explicitly make + # it a propagated input. + propagatedBuildInputs = [ pkgs.sqlite ]; + + patchPhase = '' + substituteInPlace "setup.cfg" \ + --replace "/usr/local/include" "${pkgs.sqlite}/include" \ + --replace "/usr/local/lib" "${pkgs.sqlite}/lib" + ''; + + # FIXME: How do we run the tests? + doCheck = false; + + meta = { + homepage = http://pysqlite.org/; + + description = "Python bindings for the SQLite embedded relational database engine"; + + longDescription = '' + pysqlite is a DB-API 2.0-compliant database interface for SQLite. + + SQLite is a relational database management system contained in + a relatively small C library. It is a public domain project + created by D. Richard Hipp. Unlike the usual client-server + paradigm, the SQLite engine is not a standalone process with + which the program communicates, but is linked in and thus + becomes an integral part of the program. The library + implements most of SQL-92 standard, including transactions, + triggers and most of complex queries. + + pysqlite makes this powerful embedded SQL engine available to + Python programmers. It stays compatible with the Python + database API specification 2.0 as much as possible, but also + exposes most of SQLite's native API, so that it is for example + possible to create user-defined SQL functions and aggregates + in Python. + ''; + + license = "revised BSD"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + }; + }); + pyutil = buildPythonPackage (rec { name = "pyutil-1.3.30";