From 0467a17858d9567967c37ec3fa97211e14a1069e Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Thu, 25 Feb 2016 15:02:38 +0100 Subject: [PATCH] pythonPackages.sqlalchemy: follows upstream, sqlalchemy7 for lecagy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes pythonPackages.sqlalchemy the most up to date revision (it was called sqlalchemy_1_0 before), and maintains the various “legacy” versions available as pythonPackages.sqlalchemyX for X in {7,8,9}. All derivations that required `sqlalchemy_1_0` now require `sqlalchemy` while those that required `sqlalchemy` now require `sqlalchemy7`. The derivations are not changed, only the attribute names they are bound to. --- .../virtualization/openstack/glance.nix | 2 +- .../virtualization/openstack/keystone.nix | 2 +- .../virtualization/openstack/neutron.nix | 2 +- .../virtualization/openstack/nova.nix | 2 +- .../virtualization/virtinst/default.nix | 2 +- .../tools/build-managers/buildbot/default.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 83 +++++++++++++++---- 8 files changed, 72 insertions(+), 25 deletions(-) diff --git a/pkgs/applications/virtualization/openstack/glance.nix b/pkgs/applications/virtualization/openstack/glance.nix index 0aacbeed0550..3cfe8dc527c9 100644 --- a/pkgs/applications/virtualization/openstack/glance.nix +++ b/pkgs/applications/virtualization/openstack/glance.nix @@ -15,7 +15,7 @@ pythonPackages.buildPythonApplication rec { # https://github.com/openstack/glance/blob/stable/liberty/requirements.txt propagatedBuildInputs = with pythonPackages; [ - pbr sqlalchemy_1_0 anyjson eventlet PasteDeploy routes webob sqlalchemy_migrate + pbr sqlalchemy anyjson eventlet PasteDeploy routes webob sqlalchemy_migrate httplib2 pycrypto iso8601 stevedore futurist keystonemiddleware paste jsonschema keystoneclient pyopenssl six retrying semantic-version qpid-python WSME osprofiler glance_store castellan taskflow cryptography xattr pysendfile diff --git a/pkgs/applications/virtualization/openstack/keystone.nix b/pkgs/applications/virtualization/openstack/keystone.nix index 956f3b28152d..61a366f7ab08 100644 --- a/pkgs/applications/virtualization/openstack/keystone.nix +++ b/pkgs/applications/virtualization/openstack/keystone.nix @@ -18,7 +18,7 @@ pythonPackages.buildPythonApplication rec { # https://github.com/openstack/keystone/blob/stable/liberty/requirements.txt propagatedBuildInputs = with pythonPackages; [ pbr webob eventlet greenlet PasteDeploy paste routes cryptography six - sqlalchemy_1_0 sqlalchemy_migrate stevedore passlib keystoneclient memcached + sqlalchemy sqlalchemy_migrate stevedore passlib keystoneclient memcached keystonemiddleware oauthlib pysaml2 dogpile_cache jsonschema pycadf msgpack xmlsec MySQL_python diff --git a/pkgs/applications/virtualization/openstack/neutron.nix b/pkgs/applications/virtualization/openstack/neutron.nix index 0520fcfc027e..3371eb428e62 100644 --- a/pkgs/applications/virtualization/openstack/neutron.nix +++ b/pkgs/applications/virtualization/openstack/neutron.nix @@ -15,7 +15,7 @@ pythonPackages.buildPythonApplication rec { # https://github.com/openstack/neutron/blob/stable/liberty/requirements.txt propagatedBuildInputs = with pythonPackages; [ pbr paste PasteDeploy routes debtcollector eventlet greenlet httplib2 requests2 - jinja2 keystonemiddleware netaddr retrying sqlalchemy_1_0 webob alembic six + jinja2 keystonemiddleware netaddr retrying sqlalchemy webob alembic six stevedore pecan ryu networking-hyperv MySQL_python # clients diff --git a/pkgs/applications/virtualization/openstack/nova.nix b/pkgs/applications/virtualization/openstack/nova.nix index 20e250bf05cc..618eb7666923 100644 --- a/pkgs/applications/virtualization/openstack/nova.nix +++ b/pkgs/applications/virtualization/openstack/nova.nix @@ -19,7 +19,7 @@ pythonPackages.buildPythonApplication rec { # https://github.com/openstack/nova/blob/stable/liberty/requirements.txt propagatedBuildInputs = with pythonPackages; [ - pbr sqlalchemy_1_0 boto decorator eventlet jinja2 lxml routes cryptography + pbr sqlalchemy boto decorator eventlet jinja2 lxml routes cryptography webob greenlet PasteDeploy paste prettytable sqlalchemy_migrate netaddr netifaces paramiko Babel iso8601 jsonschema keystoneclient requests2 six stevedore websockify rfc3986 os-brick psutil_1 alembic psycopg2 pymysql diff --git a/pkgs/applications/virtualization/virtinst/default.nix b/pkgs/applications/virtualization/virtinst/default.nix index 62b5bea47fa3..c9a62ce5f92b 100644 --- a/pkgs/applications/virtualization/virtinst/default.nix +++ b/pkgs/applications/virtualization/virtinst/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { }; pythonPath = with pythonPackages; - [ setuptools eventlet greenlet gflags netaddr sqlalchemy carrot routes + [ setuptools eventlet greenlet gflags netaddr sqlalchemy7 carrot routes PasteDeploy m2crypto ipy twisted sqlalchemy_migrate distutils_extra simplejson readline glanceclient cheetah lockfile httplib2 # !!! should libvirt be a build-time dependency? Note that diff --git a/pkgs/development/tools/build-managers/buildbot/default.nix b/pkgs/development/tools/build-managers/buildbot/default.nix index 99c1352b4fb6..a246044d6f1e 100644 --- a/pkgs/development/tools/build-managers/buildbot/default.nix +++ b/pkgs/development/tools/build-managers/buildbot/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonApplication, fetchurl, twisted, dateutil, jinja2 -, sqlalchemy , sqlalchemy_migrate_0_7 +, sqlalchemy_migrate_0_7 , enableDebugClient ? false, pygobject ? null, pyGtkGlade ? null }: diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c8390ee8fb5f..7aa15facb7e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5724,7 +5724,7 @@ let }; buildbot = callPackage ../development/tools/build-managers/buildbot { - inherit (pythonPackages) twisted jinja2 sqlalchemy sqlalchemy_migrate_0_7; + inherit (pythonPackages) twisted jinja2 sqlalchemy_migrate_0_7; dateutil = pythonPackages.dateutil_1_5; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ffcd6c4229d3..44186bf07613 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -235,7 +235,7 @@ in modules // { sha256 = "1ywimbisgb5g7xl9nrfwcm7dv3j8fsrjfp7bxb3l58zbsrzj6z2s"; }; - propagatedBuildInputs = with self; [ appdirs colorama dateutil requests2 requests_toolbelt sqlalchemy ]; + propagatedBuildInputs = with self; [ appdirs colorama dateutil requests2 requests_toolbelt sqlalchemy7 ]; makeWrapperArgs = [ "--prefix LIBFUSE_PATH : ${pkgs.fuse}/lib/libfuse.so" ]; @@ -457,7 +457,7 @@ in modules // { }; buildInputs = with self; [ pytest pytestcov mock coverage ]; - propagatedBuildInputs = with self; [ Mako sqlalchemy_1_0 python-editor ]; + propagatedBuildInputs = with self; [ Mako sqlalchemy python-editor ]; meta = { homepage = http://bitbucket.org/zzzeek/alembic; @@ -1575,7 +1575,7 @@ in modules // { }; buildInputs = - [ self.sqlalchemy + [ self.sqlalchemy7 self.pycryptopp self.nose self.mock @@ -2101,7 +2101,7 @@ in modules // { pymongo pyyaml requests2 - sqlalchemy_1_0 + sqlalchemy tables toolz ]; @@ -3188,7 +3188,7 @@ in modules // { sed -i '/distribute/d' setup.py ''; - buildInputs = with self; [ self.coverage self.sqlalchemy ]; + buildInputs = with self; [ self.coverage self.sqlalchemy7 ]; # ValueError: Could not parse auth file: # /tmp/nix-build-.../CoilMQ-0.6.1/coilmq/tests/resources/auth.ini @@ -7087,7 +7087,7 @@ in modules // { propagatedBuildInputs = with self; [ flup ldap - sqlalchemy + sqlalchemy7 ]; doCheck = true; @@ -8894,7 +8894,7 @@ in modules // { sha256 = "1i9ps5d5snih9xlqhrvmi3qfiygkmqzxh92n25kj4pf89kj4s965"; }; - propagatedBuildInputs = with self ; [ flask sqlalchemy_1_0 ]; + propagatedBuildInputs = with self ; [ flask sqlalchemy ]; meta = { description = "SQLAlchemy extension for Flask"; @@ -13699,7 +13699,7 @@ in modules // { }; propagatedBuildInputs = with self; [ - six stevedore sqlalchemy_migrate sqlalchemy_1_0 oslo-utils oslo-context + six stevedore sqlalchemy_migrate sqlalchemy oslo-utils oslo-context oslo-config oslo-i18n iso8601 Babel alembic pbr psycopg2 ]; buildInputs = with self; [ @@ -13844,7 +13844,7 @@ in modules // { singledispatch logutils ]; buildInputs = with self; [ - webtest Mako genshi Kajiki sqlalchemy_1_0 gunicorn jinja2 virtualenv + webtest Mako genshi Kajiki sqlalchemy gunicorn jinja2 virtualenv ]; meta = with stdenv.lib; { @@ -14567,7 +14567,7 @@ in modules // { pytz xlrd bottleneck - sqlalchemy_1_0 + sqlalchemy lxml # Disabling this because an upstream dependency, pep8, is broken on v3.5. (if isPy35 then null else html5lib) @@ -20132,7 +20132,7 @@ in modules // { rope = if isPy3k then null else self.rope; }; - sqlalchemy = self.sqlalchemy9.override rec { + sqlalchemy7 = buildPythonPackage rec { name = "SQLAlchemy-0.7.10"; disabled = isPy34 || isPy35; doCheck = !isPyPy; @@ -20141,17 +20141,32 @@ in modules // { url = "http://pypi.python.org/packages/source/S/SQLAlchemy/${name}.tar.gz"; sha256 = "0rhxgr85xdhjn467qfs0dkyj8x46zxcv6ad3dfx3w14xbkb3kakp"; }; + patches = [ # see https://groups.google.com/forum/#!searchin/sqlalchemy/module$20logging$20handlers/sqlalchemy/ukuGhmQ2p6g/2_dOpBEYdDYJ # waiting for 0.7.11 release ../development/python-modules/sqlalchemy-0.7.10-test-failures.patch ]; + preConfigure = optionalString isPy3k '' python3 sa2to3.py --no-diffs -w lib test examples ''; + + buildInputs = with self; [ nose mock ] + ++ stdenv.lib.optional doCheck pysqlite; + propagatedBuildInputs = with self; [ modules.sqlite3 ]; + + checkPhase = '' + ${python.executable} sqla_nose.py + ''; + + meta = { + homepage = http://www.sqlalchemy.org/; + description = "A Python SQL toolkit and Object Relational Mapper"; + }; }; - sqlalchemy8 = self.sqlalchemy9.override rec { + sqlalchemy8 = buildPythonPackage rec { name = "SQLAlchemy-0.8.7"; disabled = isPy34 || isPy35; doCheck = !isPyPy; @@ -20160,9 +20175,23 @@ in modules // { url = "https://pypi.python.org/packages/source/S/SQLAlchemy/${name}.tar.gz"; md5 = "4f3377306309e46739696721b1785335"; }; + preConfigure = optionalString isPy3k '' python3 sa2to3.py --no-diffs -w lib test examples ''; + + buildInputs = with self; [ nose mock ] + ++ stdenv.lib.optional doCheck pysqlite; + propagatedBuildInputs = with self; [ modules.sqlite3 ]; + + checkPhase = '' + ${python.executable} sqla_nose.py + ''; + + meta = { + homepage = http://www.sqlalchemy.org/; + description = "A Python SQL toolkit and Object Relational Mapper"; + }; }; sqlalchemy9 = buildPythonPackage rec { @@ -20191,14 +20220,32 @@ in modules // { }; }; - sqlalchemy_1_0 = self.sqlalchemy9.override rec { - name = "SQLAlchemy-1.0.10"; - doCheck = !isPyPy; # lots of tests fail + sqlalchemy = buildPythonPackage rec { + name = "SQLAlchemy-${version}"; + version = "1.0.10"; src = pkgs.fetchurl { url = "https://pypi.python.org/packages/source/S/SQLAlchemy/${name}.tar.gz"; sha256 = "963415bf4ea4fa13698893464bc6917d291331e0e8202dddd0ebfed2864ef7e3"; }; + + buildInputs = with self; [ nose mock ] + ++ stdenv.lib.optional doCheck pysqlite; + propagatedBuildInputs = with self; [ modules.sqlite3 ]; + + # Test-only dependency pysqlite doesn't build on Python 3. This isn't an + # acceptable reason to make all dependents unavailable on Python 3 as well + doCheck = !(isPyPy || isPy3k); + + checkPhase = '' + ${python.executable} sqla_nose.py + ''; + + meta = { + homepage = http://www.sqlalchemy.org/; + description = "A Python SQL toolkit and Object Relational Mapper"; + license = licenses.mit; + }; }; sqlalchemy_imageattach = buildPythonPackage rec { @@ -20261,8 +20308,8 @@ in modules // { }; }; - sqlalchemy_migrate = self.sqlalchemy_migrate_func self.sqlalchemy_1_0; - sqlalchemy_migrate_0_7 = self.sqlalchemy_migrate_func self.sqlalchemy; + sqlalchemy_migrate = self.sqlalchemy_migrate_func self.sqlalchemy; + sqlalchemy_migrate_0_7 = self.sqlalchemy_migrate_func self.sqlalchemy7; sqlparse = buildPythonPackage rec { name = "sqlparse-${version}"; @@ -24810,7 +24857,7 @@ in modules // { thrift beautifulsoup4 markdown2 - sqlalchemy + sqlalchemy7 html2text evernote ];