rpms/python-migrate0.5/devel import.log, NONE, 1.1 python-migrate-py2.4-import.patch, NONE, 1.1 python-migrate-sqlalchemy-migrate.patch, NONE, 1.1 python-migrate0.5-SA0.5.patch, NONE, 1.1 python-migrate0.5.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Luke Macken lmacken at fedoraproject.org
Wed Nov 11 04:47:25 UTC 2009


Author: lmacken

Update of /cvs/pkgs/rpms/python-migrate0.5/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11033/devel

Modified Files:
	.cvsignore sources 
Added Files:
	import.log python-migrate-py2.4-import.patch 
	python-migrate-sqlalchemy-migrate.patch 
	python-migrate0.5-SA0.5.patch python-migrate0.5.spec 
Log Message:
Initial import of python-migrate0.5 for EL-5



--- NEW FILE import.log ---
python-migrate0_5-0_5_3-7_fc11:HEAD:python-migrate0.5-0.5.3-7.fc11.src.rpm:1257899965

python-migrate-py2.4-import.patch:
 __init__.py |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- NEW FILE python-migrate-py2.4-import.patch ---
--- ./migrate/versioning/util/__init__.py.orig	2009-06-01 09:52:25.000000000 -0400
+++ ./migrate/versioning/util/__init__.py	2009-06-01 09:53:23.000000000 -0400
@@ -6,7 +6,12 @@
     if isinstance(model, basestring):
         varname = model.split('.')[-1]
         modules = '.'.join(model.split('.')[:-1])
-        module = __import__(modules, globals(), {}, ['dummy-not-used'], -1)
+        try:
+            module = __import__(modules, globals(), {}, ['dummy-not-used'], -1)
+        except TypeError:
+            # The level argument doesn't exist in Python 2.4 and lower
+            module = __import__(modules, globals(), {}, ['dummy-not-used'])
+
         return getattr(module, varname)
     else:
         # Assume it's already loaded.

python-migrate-sqlalchemy-migrate.patch:
 setup.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE python-migrate-sqlalchemy-migrate.patch ---
diff -up sqlalchemy-migrate-0.5.3/setup.py.bak sqlalchemy-migrate-0.5.3/setup.py
--- sqlalchemy-migrate-0.5.3/setup.py.bak	2009-04-16 10:52:18.000000000 -0700
+++ sqlalchemy-migrate-0.5.3/setup.py	2009-04-16 10:52:43.000000000 -0700
@@ -40,8 +40,8 @@ Migrate extends SQLAlchemy to have datab
 
     entry_points = """
     [console_scripts]
-    migrate = migrate.versioning.shell:main
-    migrate-repository = migrate.versioning.migrate_repository:main
+    sqlalchemy-migrate = migrate.versioning.shell:main
+    sqlalchemy-migrate-repository = migrate.versioning.migrate_repository:main
     """,
     test_suite = "nose.collector",
     tests_require = test_requirements,

python-migrate0.5-SA0.5.patch:
 ./test/versioning/test_shell.py |   14 ++++++++++++++
 migrate/__init__.py             |    3 +++
 setup.py                        |    3 +++
 3 files changed, 20 insertions(+)

--- NEW FILE python-migrate0.5-SA0.5.patch ---
--- setup.py.sa05	2009-10-13 14:51:58.370161269 -0400
+++ setup.py	2009-10-13 14:51:58.380161453 -0400
@@ -1,4 +1,7 @@
 #!/usr/bin/python
+__requires__='SQLAlchemy>=0.5'
+import pkg_resources
+pkg_resources.require('SQLAlchemy>=0.5')
 
 try:
     from setuptools import setup, find_packages
--- migrate/__init__.py.sa05	2009-02-07 17:05:21.000000000 -0500
+++ migrate/__init__.py	2009-10-13 14:51:58.376161170 -0400
@@ -4,3 +4,6 @@
    :mod:`migrate.changeset` that allows to define database schema changes
    using Python.
 """
+import __main__; __main__.__requires__ = __requires__ = 'SQLAlchemy>=0.5'
+import pkg_resources
+pkg_resources.require('SQLAlchemy>=0.5'); import sqlalchemy; print sqlalchemy
--- ./test/versioning/test_shell.py.sa05	2009-02-18 14:27:09.000000000 -0500
+++ ./test/versioning/test_shell.py	2009-10-13 14:51:58.380161453 -0400
@@ -14,6 +14,20 @@
     _cmd=os.path.join('python migrate', 'versioning', 'shell.py')
     @classmethod
     def cmd(cls,*p):
+        # Munge the PYTHONPATH so we find the correct version of sqlalchemy.
+        # In production, the setuptools generated wrapper for the entrypoint
+        # would take care of this
+        import sqlalchemy
+        # The sqlalchemy file will be __init__.py
+        # Two directories back from that will be the path to the module
+        sa_path = os.path.dirname(os.path.dirname(sqlalchemy.__file__))
+        py_path = os.environ.get('PYTHONPATH', '')
+        py_path_list = py_path.split(':')
+        if sa_path not in py_path_list:
+            py_path_list.insert(0, sa_path)
+        # In case of an empty PYTHONPATH
+        py_path_list = [path for path in py_path_list if path]
+        os.environ['PYTHONPATH'] = ':'.join(py_path_list)
         p = map(lambda s: str(s),p)
         ret = ' '.join([cls._cmd]+p)
         return ret


--- NEW FILE python-migrate0.5.spec ---
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%global srcname sqlalchemy-migrate

Name: python-migrate0.5
Version: 0.5.3
Release: 7%{?dist}
Summary: Schema migration tools for SQLAlchemy

Group: Development/Languages
License: MIT
URL: http://code.google.com/p/%{srcname}/
Source0: http://%{srcname}.googlecode.com/files/%{srcname}-%{version}.tar.gz
# Local patch to rename /usr/bin/migrate to sqlalchemy-migrate
Patch0: python-migrate-sqlalchemy-migrate.patch
Patch1: python-migrate-py2.4-import.patch
Patch2: python-migrate0.5-SA0.5.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-sqlalchemy0.5
BuildRequires: python-sqlite2
BuildRequires: python-setuptools-devel
BuildRequires: python-nose
BuildRequires: python-sphinx
Requires: python-sqlalchemy0.5
Requires: python-setuptools

%description
Schema migration tools for SQLAlchemy designed to support an agile approach
to database design and make it easier to keep development and production
databases in sync as schema changes are required.  It allows you to manage
database change sets and database repository versioning.

%prep
%setup -q -n %{srcname}-%{version}
%patch0 -p1 -b .rename
%patch1 -p0 -b .import
%patch2 -p0 -b .sa05

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py bdist_egg

%install
%{__rm} -rf %{buildroot}
mkdir -p %{buildroot}%{python_sitelib}
touch %{buildroot}%{python_sitelib}/easy-install.pth
easy_install -m --prefix %{buildroot}%{_usr} dist/*.egg
%{__mv} %{buildroot}%{_bindir}/sqlalchemy-migrate{,0.5}
%{__mv} %{buildroot}%{_bindir}/sqlalchemy-migrate-repository{,0.5}
%{__rm} %{buildroot}%{python_sitelib}/easy-install.pth

%clean
%{__rm} -rf %{buildroot}

%check
echo 'sqlite:///__tmp__' > test_db.cfg
%{__python} setup.py test

%files
%defattr(-,root,root,-)
%doc README CHANGELOG docs/
%{_bindir}/*
%defattr(0644,root,root,0755)
%{python_sitelib}/*

%changelog
* Mon Oct 19 2009 Luke Macken <lmacken at redhat.com> - 0.5.3-7
- Use %%global instead of %%define
- Fix a typo in the description
- Fix module permissions
- Remove easy-install.pth

* Tue Oct 13 2009 Luke Macken <lmacken at redhat.com> - 0.5.3-6
- Patch from Toshio to get the test suite running (#507697)

* Thu Oct 01 2009 Luke Macken <lmacken at redhat.com> - 0.5.3-5
- Add a patch to use pkg_resources to pull in the approprate SQLAlchemy module

* Tue Jul 07 2009 Luke Macken <lmacken at redhat.com> - 0.5.3-4
- Rename the sqlalchemy-migrate and sqlalchemy-migrate-repository scripts,
  as to not conflict with the python-migrate package.

* Wed Jun 17 2009 Luke Macken <lmacken at redhat.com> - 0.5.3-3
- Split out into a separate python-migrate0.5 package.

* Mon Jun 01 2009 Luke Macken <lmacken at redhat.com> 0.5.3-2
- Add python-sqlite2 to the build requirements
- Add python-migrate-py2.4-import.patch, which makes the use
  of __import__ work on Python 2.4

* Thu Apr 16 2009 Toshio Kuratomi <toshio at fedoraproject.org> 0.5.3-1
- Update to new bugfix release.

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Feb 11 2009 Toshio Kuratomi <toshio at fedoraproject.org> 0.5.1.2-2
- Add BR on python-sphinx

* Wed Feb 11 2009 Toshio Kuratomi <toshio at fedoraproject.org> 0.5.1.2-1
- Update to 0.5.1.2 release with official support for SA-0.5
- Remove patches merged upstream

* Mon Jan 26 2009 Toshio Kuratomi <toshio at fedoraproject.org> 0.5.1-0.1.20090122.svn479
- Update to snapshot so that it works with sqlalchemy-0.5
- Enable test suite

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> - 0.4.5-4
- Rebuild for Python 2.6

* Tue Jul 29 2008 Toshio Kuratomi <toshio at fedoraproject.org> 0.4.5-3
- Patch to generate a script for the repository migrate script.
- Move the script rename into a patch to setup.py.

* Thu Jul 17 2008 Toshio Kuratomi <toshio at fedoraproject.org> 0.4.5-2
- Remove patches that are merged upstream.

* Thu Jul 17 2008 Toshio Kuratomi <toshio at fedoraproject.org> 0.4.5-1
- New upstream

* Thu Jul 17 2008 Toshio Kuratomi <toshio at fedoraproject.org> 0.4.4-4
- Disable py.test so we don't try to download it during build.

* Tue Jul 15 2008 Toshio Kuratomi <toshio at fedoraproject.org> 0.4.4-3
- Rename binary to sqlalchemy-migrate to avoid potential filename clashes.
  (Queried upstream but the change is only in Fedora).  Noted that
  openmosix defintely has a /usr/bin/migrate already.

* Sat Jul 06 2008 Ricky Zhou <ricky at fedoraproject.org> 0.4.4-2
- Add BuildRequires on python-setuptools-devel.
- Add Requires on SQLAlchemy.

* Sat Jun 21 2008 Toshio Kuratomi <toshio at fedoraproject.org> 0.4.4-1
- Initial Fedora Build.


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/python-migrate0.5/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	11 Nov 2009 03:36:39 -0000	1.1
+++ .cvsignore	11 Nov 2009 04:47:25 -0000	1.2
@@ -0,0 +1 @@
+sqlalchemy-migrate-0.5.3.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/python-migrate0.5/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	11 Nov 2009 03:36:39 -0000	1.1
+++ sources	11 Nov 2009 04:47:25 -0000	1.2
@@ -0,0 +1 @@
+8ce48470efac8cbcdf4ee9af725efd70  sqlalchemy-migrate-0.5.3.tar.gz




More information about the fedora-extras-commits mailing list