From e93948a028aedaa649e96c89aebfe5a2bb1831c1 Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Mar 08 2014 00:23:16 +0000
Subject: latest upstream (0.9)
Note DB2 tests are disabled for now until this is packaged:
https://pypi.python.org/pypi/ibm_db_sa
---
diff --git a/.gitignore b/.gitignore
index 60880e4..b0f265a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ sqlalchemy-migrate-0.6.tar.gz
/sqlalchemy-migrate-0.7.2.tar.gz
/sqlalchemy-migrate-0.8.2.tar.gz
/sqlalchemy-migrate-0.8.5.tar.gz
+/sqlalchemy-migrate-0.9.tar.gz
diff --git a/migrate-scripttest-update.patch b/migrate-scripttest-update.patch
deleted file mode 100644
index 7b9607b..0000000
--- a/migrate-scripttest-update.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: sqlalchemy-migrate-0.7.1/migrate/tests/fixture/shell.py
-===================================================================
---- sqlalchemy-migrate-0.7.1.orig/migrate/tests/fixture/shell.py
-+++ sqlalchemy-migrate-0.7.1/migrate/tests/fixture/shell.py
-@@ -22,7 +22,6 @@ class Shell(Pathed):
- log.debug('PATH for ScriptTest: %s', migrate_path)
- self.env = TestFileEnvironment(
- base_path=os.path.join(self.temp_usable_dir, 'env'),
-- script_path=[migrate_path],
- )
-
- def run_version(self, repos_path):
diff --git a/no-db2-tests.patch b/no-db2-tests.patch
new file mode 100644
index 0000000..70979bb
--- /dev/null
+++ b/no-db2-tests.patch
@@ -0,0 +1,36 @@
+diff -Naur sqlalchemy-migrate-0.9.orig/migrate/tests/changeset/databases/test_ibmdb2.py sqlalchemy-migrate-0.9/migrate/tests/changeset/databases/test_ibmdb2.py
+--- sqlalchemy-migrate-0.9.orig/migrate/tests/changeset/databases/test_ibmdb2.py 2014-03-07 15:20:07.000000000 +0000
++++ sqlalchemy-migrate-0.9/migrate/tests/changeset/databases/test_ibmdb2.py 1970-01-01 00:00:00.000000000 +0000
+@@ -1,32 +0,0 @@
+-#!/usr/bin/env python
+-# -*- coding: utf-8 -*-
+-
+-import mock
+-
+-import six
+-
+-from migrate.changeset.databases import ibmdb2
+-from migrate.tests import fixture
+-
+-
+-class TestIBMDBDialect(fixture.Base):
+- """
+- Test class for ibmdb2 dialect unit tests which do not require
+- a live backend database connection.
+- """
+-
+- def test_is_unique_constraint_with_null_cols_supported(self):
+- test_values = {
+- '10.1': False,
+- '10.4.99': False,
+- '10.5': True,
+- '10.5.1': True
+- }
+- for version, supported in six.iteritems(test_values):
+- mock_dialect = mock.MagicMock()
+- mock_dialect.dbms_ver = version
+- self.assertEqual(
+- supported,
+- ibmdb2.is_unique_constraint_with_null_columns_supported(
+- mock_dialect),
+- 'Assertion failed on version: %s' % version)
diff --git a/python-migrate.spec b/python-migrate.spec
index da7803c..7291f05 100644
--- a/python-migrate.spec
+++ b/python-migrate.spec
@@ -5,7 +5,7 @@
%global srcname sqlalchemy-migrate
Name: python-migrate
-Version: 0.8.5
+Version: 0.9
Release: 1%{?dist}
Summary: Schema migration tools for SQLAlchemy
@@ -13,8 +13,8 @@ Group: Development/Languages
License: MIT
URL: https://github.com/stackforge/%{srcname}
Source0: http://pypi.python.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz
-# Patch to update to new scripttest API submitted upstream
-Patch0: migrate-scripttest-update.patch
+# Patch to avoid DB2 tests until ibm_db_sa python module is available
+Patch0: no-db2-tests.patch
# Patch to fix a unittest on python-2.7
Patch1: migrate-py27.patch
# Local patch to rename /usr/bin/migrate to sqlalchemy-migrate
@@ -58,7 +58,7 @@ database change sets and database repository versioning.
%prep
%setup -q -n %{srcname}-%{version}
-%patch0 -p1 -b .test
+%patch0 -p1 -b .db2
%patch1 -p1 -b .py27
%patch100 -p1 -b .rename
@@ -98,6 +98,9 @@ nosetests
%{python_sitelib}/*
%changelog
+* Sat Mar 08 2014 Pádraig Brady