From f0f212562082338f3b5d7658bad036e286bfd9ad Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Sat, 8 Mar 2014 19:47:23 +0100 Subject: pythonPackages: auto add unzip to buildInputs if pkg has zip suffix --- .../development/python-modules/generic/default.nix | 8 +++- pkgs/top-level/python-packages.nix | 54 +++++++--------------- 2 files changed, 22 insertions(+), 40 deletions(-) diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 067a1cdf2e27..6debcd818e5d 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -3,7 +3,7 @@ (http://pypi.python.org/pypi/setuptools/), which represents a large number of Python packages nowadays. */ -{ python, setuptools, wrapPython, lib, recursivePthLoader, distutils-cfg }: +{ python, setuptools, unzip, wrapPython, lib, recursivePthLoader, distutils-cfg }: { name @@ -46,7 +46,11 @@ python.stdenv.mkDerivation (attrs // { name = namePrefix + name; - buildInputs = [ python wrapPython setuptools (distutils-cfg.override { extraCfg = distutilsExtraCfg; }) ] ++ buildInputs ++ pythonPath; + buildInputs = [ + python wrapPython setuptools + (distutils-cfg.override { extraCfg = distutilsExtraCfg; }) + ] ++ buildInputs ++ pythonPath + ++ (lib.optional (lib.hasSuffix "zip" attrs.src.name) unzip); propagatedBuildInputs = propagatedBuildInputs ++ [ recursivePthLoader ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2c7123a98d4f..d013b5a15446 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14,7 +14,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { } // rec { inherit python; - inherit (pkgs) fetchurl fetchsvn fetchgit stdenv; + inherit (pkgs) fetchurl fetchsvn fetchgit stdenv unzip; # helpers @@ -256,7 +256,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { buildInputs = [ pkgs.which - pkgs.unzip pythonPackages.coverage pythonPackages.mock pythonPackages.tissue @@ -376,7 +375,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { sha1 = "fa4aec08e59fa5964197f59ba42408d64031675b"; }; - buildInputs = [ pkgs.unzip pkgs.sqlite ]; + buildInputs = [ pkgs.sqlite ]; # python: double free or corruption (fasttop): 0x0000000002fd4660 *** doCheck = false; @@ -426,8 +425,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { sha256 = "192174mys40m0bwk6l5jlfnzps0xi81sxm34cqms6dc3c454pbyx"; }; - buildInputs = [ pkgs.unzip ]; - # error: invalid command 'test' doCheck = false; @@ -591,8 +588,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { sha256 = "1i1p3rkj4ad108f23xyib34r4rcy571gy65paml6fk77knh0k66p"; }; - buildInputs = [ pkgs.unzip ]; - # error: invalid command 'test' doCheck = false; @@ -1284,7 +1279,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "9c0b8efe9d43b460f8cf049fa46ce14d"; }; - buildInputs = [ pkgs.unzip pytest ]; + buildInputs = [ pytest ]; propagatedBuildInputs = [ execnet ]; meta = { @@ -1311,7 +1306,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { sha256 = "139yfm9yz9k33kgqw4khsljs10rkhhxyywbq9i82bh2r31cil1pp"; }; - buildInputs = [ pkgs.unzip pythonPackages.mock ]; + buildInputs = [ pythonPackages.mock ]; # couple of failing tests doCheck = false; @@ -1564,8 +1559,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "be885ccd9612966bb81839670d2da099"; }; - buildInputs = [ pkgs.unzip ]; - meta = { description = "rapid multi-Python deployment"; license = stdenv.lib.licenses.gpl2; @@ -1933,7 +1926,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "a6728117cad24749ddb39d2827cd9033"; }; - buildInputs = [ pkgs.unzip webtest ]; + buildInputs = [ webtest ]; propagatedBuildInputs = [ jinja2 pyramid ]; meta = { @@ -2068,7 +2061,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "36aa2c96dec4cfeea57f54da2b733eb9"; }; - buildInputs = [ pkgs.unzip zope_interface zope_location zope_schema ]; + buildInputs = [ zope_interface zope_location zope_schema ]; meta = { maintainers = [ stdenv.lib.maintainers.iElectric ]; @@ -3381,7 +3374,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { }; buildInputs = - [ pkgs.unzip fs gdata python_keyczar mock pyasn1 pycrypto pytest ]; + [ fs gdata python_keyczar mock pyasn1 pycrypto pytest ]; }; kitchen = buildPythonPackage (rec { @@ -3875,8 +3868,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { export LC_ALL="en_US.UTF-8" ''; - buildInputs = [ pkgs.unzip ]; - propagatedBuildInputs = [ argparse jinja2 six modules.readline ] ++ (optionals isPy26 [ importlib ordereddict ]); @@ -4165,7 +4156,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { sha256 = "0lgrfgp3sq8xi8d9grrg0z8jsyk0wl8a3rxw31hb7vdncin5b7n5"; }; - buildInputs = [ pkgs.unzip ]; propagatedBuildInputs = [ nose ]; meta = { @@ -4660,8 +4650,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { sha256 = "0kdc4rg47k1qkq22inghd50xlxjdkfcilym8mxff8wy4h091xykw"; }; - buildInputs = [ pkgs.unzip ]; - propagatedBuildInputs = [ pytz ]; meta = { @@ -4704,7 +4692,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "56b6614499aacb7d6b5983c4914daea7"; }; - buildInputs = [ pkgs.freetype pkgs.libjpeg pkgs.unzip pkgs.zlib pkgs.libtiff pkgs.libwebp ]; + buildInputs = [ pkgs.freetype pkgs.libjpeg pkgs.zlib pkgs.libtiff pkgs.libwebp ]; # NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp. preConfigure = '' @@ -5268,7 +5256,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { sha256 = "0ldkm8xws91j7zbvpqb413hvdz8r66bslr451q3qc0xi8cnmydfq"; }; - buildInputs = [ pkgs.unzip pkgs.libiodbc ]; + buildInputs = [ pkgs.libiodbc ]; meta = with stdenv.lib; { description = "Python ODBC module to connect to almost any database"; @@ -5606,7 +5594,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "c57cba33626ac4b1e3d1974923d59232"; }; - buildInputs = [ pkgs.unzip ]; meta = { homepage = "https://code.google.com/p/pysphere/"; license = "BSD"; @@ -5811,7 +5798,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { sha256 = "1r127fa354ppb667f4acxlzwxixap1jgzjrr790bw8mcpxv2hqaa"; }; - buildInputs = [ pkgs.unzip pkgs.pyrex ]; + buildInputs = [ pkgs.pyrex ]; propagatedBuildInputs = [ pkgs.libyaml ]; meta = { @@ -6044,7 +6031,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { # error: invalid command 'test' #doCheck = false; - buildInputs = [ unittest2 pkgs.unzip ]; + buildInputs = [ unittest2 ]; propagatedBuildInputs = [ robotframework lxml ]; meta = with stdenv.lib; { @@ -7457,7 +7444,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { # XXX: skipping two tests fails in python2.6 doCheck = ! isPy26; - buildInputs = [ pkgs.unzip ] ++ optionals isPy26 [ pythonPackages.ordereddict unittest2 ]; + buildInputs = optionals isPy26 [ pythonPackages.ordereddict unittest2 ]; propagatedBuildInputs = [ nose @@ -7721,7 +7708,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "eff24d7918099a3e899ee63a9c31bee6"; }; - buildInputs = [ pkgs.unzip zope_interface ]; + buildInputs = [ zope_interface ]; meta = { maintainers = [ stdenv.lib.maintainers.goibhniu ]; @@ -7737,8 +7724,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "4ff0ddbf64c45bfcc3189e35f4214ded"; }; - buildInputs = [ pkgs.unzip ]; - propagatedBuildInputs = [ zope_interface ]; meta = { @@ -7813,8 +7798,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "c6ac80e6887de4108a383f349fbdf332"; }; - buildInputs = [ pkgs.unzip ]; - meta = { maintainers = [ stdenv.lib.maintainers.goibhniu ]; }; @@ -8050,7 +8033,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "8b317b41244fc2e67f2f286890ba59a0"; }; - buildInputs = [ pkgs.unzip sqlalchemy zope_testing zope_interface setuptools ]; + buildInputs = [ sqlalchemy zope_testing zope_interface setuptools ]; propagatedBuildInputs = [ sqlalchemy transaction ]; meta = { @@ -8072,7 +8055,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "01c30c342c6a18002a762bd5d320a6e9"; }; - buildInputs = [ pkgs.unzip ]; propagatedBuildInputs = [ zope_interface zope_exceptions zope_location ]; meta = { @@ -8093,8 +8075,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "1d689abad000419891494b30dd7d8190"; }; - buildInputs = [ pkgs.unzip ]; - propagatedBuildInputs = [ zope_interface zope_exceptions zope_testing six ] ++ optional (!python.is_py3k or false) subunit; # a test is failing @@ -8117,8 +8097,6 @@ pythonPackages = modules // import ./python-packages-generated.nix { md5 = "eaad8fc7bbef126f9f8616b074ec00aa"; }; - buildInputs = [ pkgs.unzip ]; - propagatedBuildInputs = [ zope_location zope_security zope_publisher ]; meta = { @@ -8207,7 +8185,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { sha256 = "0ri6gj883k042xaxa2d5ymmhbw2bfcxdzhh4bz7700ibxwxxj62h"; }; - buildInputs = [ pkgs.unzip unittest2 nose mock ]; + buildInputs = [ unittest2 nose mock ]; propagatedBuildInputs = [ modules.curses libarchive ]; # tests are still failing @@ -8234,7 +8212,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { url = "http://pypi.python.org/packages/source/p/pyzmq/pyzmq-13.0.0.zip"; md5 = "fa2199022e54a393052d380c6e1a0934"; }; - buildInputs = [ pkgs.unzip pkgs.zeromq3 ]; + buildInputs = [ pkgs.zeromq3 ]; propagatedBuildInputs = [ ]; doCheck = false; }; -- cgit 1.4.1 From 0558c8728892f69ab80bbfe5e23bd95f402a7725 Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Mon, 10 Mar 2014 10:06:04 +0100 Subject: buildPythonPackage: add shell hook for instant development --- pkgs/development/python-modules/generic/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 6debcd818e5d..45c8653bc198 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -38,6 +38,12 @@ , meta ? {} +# Execute before shell hook +, preShellHook ? "" + +# Execute after shell hook +, postShellHook ? "" + , ... } @ attrs: # Keep extra attributes from `attrs`, e.g., `patchPhase', etc. @@ -150,6 +156,16 @@ python.stdenv.mkDerivation (attrs // { done ''; + shellHook = attrs.shellHook or '' + mkdir -p /tmp/$name/lib/${python.libPrefix}/site-packages + ${preShellHook} + export PATH="/tmp/$name/bin:$PATH" + export PYTHONPATH="/tmp/$name/lib/${python.libPrefix}/site-packages:$PYTHONPATH" + python setup.py develop --prefix /tmp/$name + ${postShellHook} + return + ''; + meta = with lib.maintainers; { # default to python's platforms platforms = python.meta.platforms; -- cgit 1.4.1 From a33891973ada0ff948a467a9982c01074948c680 Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Mon, 10 Mar 2014 10:29:03 +0100 Subject: pythonPackages: syntax improvements - import pkgs.lib by default, there's no reason why not - Define `isPy*` helper functions for all python versions - Define `pythonName` that returns unique python name based on `isPy*` helpers - Fix `python2.7` version detection - Fix pythonPackages importing(with) for `python2.7` only packages --- pkgs/top-level/all-packages.nix | 6 -- pkgs/top-level/python-packages.nix | 137 +++++++++++++++++++++---------------- 2 files changed, 77 insertions(+), 66 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e5dc9e812513..4bdf2440576c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6075,7 +6075,6 @@ let # regardless. python26Packages = import ./python-packages.nix { inherit pkgs; - inherit (lib) lowPrio; python = python26; }; @@ -6083,31 +6082,26 @@ let python33Packages = recurseIntoAttrs (import ./python-packages.nix { inherit pkgs; - inherit (lib) lowPrio; python = python33; }); python34Packages = import ./python-packages.nix { inherit pkgs; - inherit (lib) lowPrio; python = python34; }; python32Packages = import ./python-packages.nix { inherit pkgs; - inherit (lib) lowPrio; python = python32; }; python27Packages = recurseIntoAttrs (import ./python-packages.nix { inherit pkgs; - inherit (lib) lowPrio; python = python27; }); pypyPackages = recurseIntoAttrs (import ./python-packages.nix { inherit pkgs; - inherit (lib) lowPrio; python = pypy; }); diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d013b5a15446..b44e7272c584 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1,24 +1,38 @@ -{ pkgs, python, lowPrio }: +{ pkgs, python }: + with pkgs.lib; let -isPy26 = python.majorVersion == "2.6"; -isPy27 = python.majorVersion == "2.7"; -optional = pkgs.lib.optional; -optionals = pkgs.lib.optionals; -modules = python.modules or { readline = null; sqlite3 = null; curses = null; curses_panel = null; ssl = null; crypt = null; }; + isPy26 = python.majorVersion == "2.6"; + isPy27 = python.majorVersion == "2.7"; + isPy33 = python.majorVersion == "3.3"; + isPy34 = python.majorVersion == "3.4"; + isPyPy = python.executable == "pypy"; + + # Unique python version identifier + pythonName = + if isPy26 then "python26" else + if isPy27 then "python27" else + if isPy33 then "python33" else + if isPy34 then "python34" else + if isPyPy then "pypy" else ""; + + modules = python.modules or { readline = null; sqlite3 = null; curses = null; curses_panel = null; ssl = null; crypt = null; }; pythonPackages = modules // import ./python-packages-generated.nix { inherit pkgs python; inherit (pkgs) stdenv fetchurl; self = pythonPackages; -} // rec { +} // - inherit python; +# Python packages for all python versions +rec { + + inherit python isPy26 isPy27 isPy33 isPy34 isPyPy pythonName; inherit (pkgs) fetchurl fetchsvn fetchgit stdenv unzip; # helpers - callPackage = pkgs.lib.callPackageWith (pkgs // pythonPackages); + callPackage = callPackageWith (pkgs // pythonPackages); # global distutils config used by buildPythonPackage distutils-cfg = callPackage ../development/python-modules/distutils-cfg { }; @@ -554,7 +568,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = http://beets.radbox.org; description = "Music tagger and library organizer"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; maintainers = [ stdenv.lib.maintainers.iElectric ]; }; }; @@ -575,7 +589,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = https://github.com/Sheeprider/BitBucket-api; description = "Python library to interact with BitBucket REST API"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -767,7 +781,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "http://www.buildout.org"; description = "A software build and configuration system"; - license = pkgs.lib.licenses.zpt21; + license = licenses.zpt21; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }; @@ -782,7 +796,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "http://www.buildout.org"; description = "A software build and configuration system"; - license = pkgs.lib.licenses.zpt21; + license = licenses.zpt21; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }; @@ -803,7 +817,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "http://www.buildout.org"; description = "A software build and configuration system"; - license = pkgs.lib.licenses.zpt21; + license = licenses.zpt21; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }; @@ -981,7 +995,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "Simple, lightweight, and easily extensible STOMP message broker"; homepage = http://code.google.com/p/coilmq/; - license = pkgs.lib.licenses.asl20; + license = licenses.asl20; }; }); @@ -1023,7 +1037,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "Autogenerate Colander schemas based on SQLAlchemy models."; homepage = https://github.com/stefanofontanelli/ColanderAlchemy; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -1042,7 +1056,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "Config file reading, writing and validation."; homepage = http://pypi.python.org/pypi/configobj; - license = pkgs.lib.licenses.bsd3; + license = licenses.bsd3; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }); @@ -1102,7 +1116,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "Code coverage measurement for python"; homepage = http://nedbatchelder.com/code/coverage/; - license = pkgs.lib.licenses.bsd3; + license = licenses.bsd3; }; }; @@ -2738,7 +2752,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "code checking using pep8 and pyflakes."; homepage = http://pypi.python.org/pypi/flake8; - license = pkgs.lib.licenses.mit; + license = licenses.mit; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }); @@ -3216,7 +3230,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = http://code.google.com/p/httplib2; description = "A comprehensive HTTP client library"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }; @@ -3278,7 +3292,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "Google's IP address manipulation library"; homepage = http://code.google.com/p/ipaddr-py/; - license = pkgs.lib.licenses.asl20; + license = licenses.asl20; }; }; @@ -3312,7 +3326,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "https://github.com/davidhalter/jedi"; description = "An autocompletion tool for Python that can be used for text editors."; - license = pkgs.lib.licenses.lgpl3Plus; + license = licenses.lgpl3Plus; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }); @@ -3402,7 +3416,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = http://code.google.com/p/pylast/; description = "A python interface to last.fm (and compatibles)"; - license = pkgs.lib.licenses.asl20; + license = licenses.asl20; }; }; @@ -3687,7 +3701,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "McCabe checker, plugin for flake8"; homepage = "https://github.com/flintwork/mccabe"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }); @@ -3790,7 +3804,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { version = "0.9"; description = ''Man-in-the-middle proxy''; homepage = "http://mitmproxy.org/"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -3892,7 +3906,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = http://bmc.github.com/munkres/; description = "Munkres algorithm for the Assignment Problem"; - license = pkgs.lib.licenses.bsd3; + license = licenses.bsd3; maintainers = [ stdenv.lib.maintainers.iElectric ]; }; }; @@ -3909,7 +3923,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = http://alastair/python-musicbrainz-ngs; description = "Python bindings for musicbrainz NGS webservice"; - license = pkgs.lib.licenses.bsd2; + license = licenses.bsd2; maintainers = [ stdenv.lib.maintainers.iElectric ]; }; }; @@ -4078,7 +4092,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { version = "0.9"; description = ''Man-in-the-middle proxy''; homepage = "https://github.com/cortesi/netlib"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -4223,7 +4237,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { sha256 = "1kh4spwgqxm534qlzzf2ijchckvs0pwjxl1irhicjmlg7mybnfvx"; }; - patches = pkgs.lib.singleton (fetchurl { + patches = singleton (fetchurl { name = "libnotify07.patch"; url = "http://pkgs.fedoraproject.org/cgit/notify-python.git/plain/" + "libnotify07.patch?id2=289573d50ae4838a1658d573d2c9f4c75e86db0c"; @@ -4336,7 +4350,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "https://github.com/simplegeo/python-oauth2"; description = "library for OAuth version 1.0"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; maintainers = [ stdenv.lib.maintainers.garbas ]; platforms = stdenv.lib.platforms.linux; }; @@ -4601,7 +4615,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "http://pep8.readthedocs.org/"; description = "Python style guide checker"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }; @@ -4751,7 +4765,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "A library to manipulate gettext files (po and mo files)"; homepage = "http://bitbucket.org/izi/polib/"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -4875,7 +4889,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "Allows to get the public suffix of a domain name"; homepage = "http://pypi.python.org/pypi/publicsuffix/"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -5128,7 +5142,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "https://launchpad.net/pyflakes"; description = "A simple program which checks Python source files for errors."; - license = pkgs.lib.licenses.mit; + license = licenses.mit; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }; @@ -5143,7 +5157,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { patchPhase = let libs = [ pkgs.mesa pkgs.xlibs.libX11 pkgs.freetype pkgs.fontconfig ]; - paths = pkgs.lib.concatStringsSep "," (map (l: "\"${l}/lib\"") libs); + paths = concatStringsSep "," (map (l: "\"${l}/lib\"") libs); in "sed -i -e 's|directories\.extend.*lib[^]]*|&,${paths}|' pyglet/lib.py"; doCheck = false; @@ -5188,7 +5202,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "https://launchpad.net/pygpgme"; description = "A Python wrapper for the GPGME library."; - license = pkgs.lib.licenses.lgpl21; + license = licenses.lgpl21; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }; @@ -5213,7 +5227,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = https://github.com/seb-m/pyinotify/wiki; description = "Monitor filesystems events on Linux platforms with inotify"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -5243,7 +5257,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "http://fedoraproject.org/wiki/Pykickstart"; description = "Read and write Fedora kickstart files"; - license = pkgs.lib.licenses.gpl2Plus; + license = licenses.gpl2Plus; }; }; @@ -5300,7 +5314,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { sed -i -e ' s|e\.path\.startswith("/tmp/temp-device-")|"temp-device-" in e.path| ' tests/test__ped_ped.py - '' + pkgs.lib.optionalString stdenv.isi686 '' + '' + optionalString stdenv.isi686 '' # remove some integers in this test case which overflow on 32bit systems sed -i -r -e '/class *UnitGetSizeTestCase/,/^$/{/[0-9]{11}/d}' \ tests/test__ped_ped.py @@ -5825,7 +5839,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { reportlab = - let freetype = pkgs.lib.overrideDerivation pkgs.freetype (args: { configureFlags = "--enable-static --enable-shared"; }); + let freetype = overrideDerivation pkgs.freetype (args: { configureFlags = "--enable-static --enable-shared"; }); in buildPythonPackage rec { name = "reportlab-2.5"; @@ -6623,7 +6637,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "Joyent SmartDataCenter CloudAPI connector using http-signature authentication via Requests"; homepage = https://github.com/atl/py-smartdc; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -6811,7 +6825,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = https://github.com/crosspop/sqlalchemy-imageattach; description = "SQLAlchemy extension for attaching images to entity objects"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -6857,7 +6871,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "A client for Etsy's node-js statsd server"; homepage = https://github.com/WoLpH/python-statsd; - license = pkgs.lib.licenses.bsd3; + license = licenses.bsd3; }; }; @@ -6877,7 +6891,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "Lightweight and extensible STOMP messaging client"; homepage = http://bitbucket.org/hozn/stompclient; - license = pkgs.lib.licenses.asl20; + license = licenses.asl20; }; }); @@ -6896,7 +6910,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "A streaming protocol for test results"; homepage = https://launchpad.net/subunit; - license = pkgs.lib.licenses.asl20; + license = licenses.asl20; }; }; @@ -7014,7 +7028,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "A set of extensions to the Python standard library's unit testing framework"; homepage = http://pypi.python.org/pypi/testtools; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -7034,7 +7048,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges."; homepage = https://code.google.com/p/mimeparse/; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -7054,7 +7068,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { description = "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges."; homepage = https://code.google.com/p/mimeparse/; - license = pkgs.lib.licenses.mit; + license = licenses.mit; }; }; @@ -7165,7 +7179,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "https://github.com/alejandrogomez/turses"; description = "A Twitter client for the console."; - license = pkgs.lib.licenses.gpl3; + license = licenses.gpl3; maintainers = [ stdenv.lib.maintainers.garbas ]; platforms = stdenv.lib.platforms.linux; }; @@ -7182,7 +7196,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = "https://github.com/tweepy/tweepy"; description = "Twitter library for python"; - license = pkgs.lib.licenses.mit; + license = licenses.mit; maintainers = [ stdenv.lib.maintainers.garbas ]; platforms = stdenv.lib.platforms.linux; }; @@ -7216,7 +7230,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { and licensed under the MIT license. ''; - license = pkgs.lib.licenses.mit; + license = licenses.mit; maintainers = [ ]; }; @@ -7285,7 +7299,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { description = "A full-featured console (xterm et al.) user interface library"; homepage = http://excess.org/urwid; repositories.git = git://github.com/wardi/urwid.git; - license = pkgs.lib.licenses.lgpl21; + license = licenses.lgpl21; maintainers = [ stdenv.lib.maintainers.garbas ]; }; }); @@ -7485,7 +7499,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { wokkel = buildPythonPackage (rec { url = "http://wokkel.ik.nu/releases/0.7.0/wokkel-0.7.0.tar.gz"; - name = pkgs.lib.nameFromURL url ".tar"; + name = nameFromURL url ".tar"; src = fetchurl { inherit url; sha256 = "0rnshrzw8605x05mpd8ndrx3ri8h6cx713mp8sl4f04f4gcrz8ml"; @@ -8395,7 +8409,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = http://pypi.python.org/pypi/Unidecode/; description = "ASCII transliterations of Unicode text"; - license = pkgs.lib.licenses.gpl2; + license = licenses.gpl2; maintainers = [ stdenv.lib.maintainers.iElectric ]; }; }; @@ -8557,7 +8571,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = https://code.google.com/p/gdata-python-client/; description = "Python client library for Google data APIs"; - license = pkgs.lib.licenses.asl20; + license = licenses.asl20; }; }; @@ -8577,7 +8591,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = http://imapclient.freshfoo.com/; description = "Easy-to-use, Pythonic and complete IMAP client library"; - license = pkgs.lib.licenses.bsd3; + license = licenses.bsd3; }; }; @@ -8594,7 +8608,7 @@ pythonPackages = modules // import ./python-packages-generated.nix { meta = { homepage = http://pythonhosted.org/Logbook/; description = "A logging replacement for Python"; - license = pkgs.lib.licenses.bsd3; + license = licenses.bsd3; }; }; @@ -8691,8 +8705,11 @@ pythonPackages = modules // import ./python-packages-generated.nix { }; }; -# python2.7 specific eggs -} // pkgs.lib.optionalAttrs (python.majorVersion == "2.7") { +# python2.7 specific packages +} // optionalAttrs isPy27 ( + with pythonPackages; + +{ pypi2nix = pythonPackages.buildPythonPackage rec { rev = "04a68d8577acbceb88bdf51b1231a9dbdead7003"; @@ -8713,4 +8730,4 @@ pythonPackages = modules // import ./python-packages-generated.nix { }; }; -}; in pythonPackages +}); in pythonPackages -- cgit 1.4.1