rpms/python-migrate/devel python-migrate-migrate_repository.patch, NONE, 1.1 python-migrate-sqlalchemy-migrate.patch, NONE, 1.1 python-migrate.spec, 1.4, 1.5

Toshio くらとみ (toshio) fedora-extras-commits at redhat.com
Wed Jul 30 04:33:29 UTC 2008


Author: toshio

Update of /cvs/pkgs/rpms/python-migrate/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1064

Modified Files:
	python-migrate.spec 
Added Files:
	python-migrate-migrate_repository.patch 
	python-migrate-sqlalchemy-migrate.patch 
Log Message:

* 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.


python-migrate-migrate_repository.patch:

--- NEW FILE python-migrate-migrate_repository.patch ---
Index: setup.py
===================================================================
--- setup.py	(revision 444)
+++ setup.py	(working copy)
@@ -35,6 +35,7 @@
     entry_points = """
     [console_scripts]
     migrate = migrate.versioning.shell:main
+    migrate-repository = migrate.versioning.migrate_repository:main
     """,
     test_suite = "py.test.cmdline.main",
 )
Index: migrate/versioning/migrate_repository.py
===================================================================
--- migrate/versioning/migrate_repository.py	(revision 444)
+++ migrate/versioning/migrate_repository.py	(working copy)
@@ -4,7 +4,7 @@
 
 
 def usage():
-    
+
     print '''Usage: %(prog)s repository-to-migrate
 
 Upgrade your repository to the new flat format.
@@ -28,8 +28,8 @@
 def deleteDirectory(dirpath):
     print '    Deleting directory: %s' % dirpath
     os.rmdir(dirpath)
-    
 
+
 def migrate_repository(repos):
     print 'Migrating repository at: %s to new format' % repos
     versions = '%s/versions' % repos
@@ -42,11 +42,11 @@
         files = os.listdir(origdir)
         files.sort()
         for file in files:
-            
+
             # Delete compiled Python files.
             if file.endswith('.pyc') or file.endswith('.pyo'):
                 deleteFile('%s/%s' % (origdir, file))
-                
+
             # Delete empty __init__.py files.
             origfile = '%s/__init__.py' % origdir
             if os.path.exists(origfile) and len(open(origfile).read()) == 0:
@@ -69,10 +69,12 @@
 
         # Try to remove directory. Will fail if it's not empty.
         deleteDirectory(origdir)
-    
 
-if __name__ == '__main__':
+
+def main():
     if len(sys.argv) != 2:
         usage()
     migrate_repository(sys.argv[1])
 
+if __name__ == '__main__':
+    main()

python-migrate-sqlalchemy-migrate.patch:

--- NEW FILE python-migrate-sqlalchemy-migrate.patch ---
Index: sqlalchemy-migrate-0.4.5/setup.py
===================================================================
--- sqlalchemy-migrate-0.4.5.orig/setup.py
+++ sqlalchemy-migrate-0.4.5/setup.py
@@ -34,8 +34,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 = "py.test.cmdline.main",
 )


Index: python-migrate.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-migrate/devel/python-migrate.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- python-migrate.spec	27 Jul 2008 21:52:47 -0000	1.4
+++ python-migrate.spec	30 Jul 2008 04:32:59 -0000	1.5
@@ -4,7 +4,7 @@
 
 Name: python-migrate
 Version: 0.4.5
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: Schema migration tools for SQLAlchemy
 
 Group: Development/Languages
@@ -12,7 +12,11 @@
 URL: http://code.google.com/p/%{srcname}/
 Source0: http://%{srcname}.googlecode.com/files/%{srcname}-%{version}.tar.gz
 # Local patch to disable py.test.  Needed until py.test is in Fedora.
-Patch1: python-migrate-disable-pytest.patch
+Patch0: python-migrate-disable-pytest.patch
+# Patch sent upstream to generate a script for the repository upgrade script
+Patch1: python-migrate-migrate_repository.patch
+# Local patch to rename /usr/bin/migrate to sqlalchemy-migrate
+Patch2: python-migrate-sqlalchemy-migrate.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -20,6 +24,7 @@
 BuildRequires: python-devel
 BuildRequires: python-setuptools-devel
 Requires: python-sqlalchemy >= 0.3.10
+Requires: python-setuptools
 
 %description
 Schema migration tools for SQLAlchemy designed to support an agile approach
@@ -29,7 +34,9 @@
 
 %prep
 %setup -q -n %{srcname}-%{version}
-%patch1 -p1 -b .pytest
+%patch0 -p1 -b .pytest
+%patch1 -p0 -b .repomigrate
+%patch2 -p1 -b .rename
 
 %build
 %{__python} setup.py build
@@ -37,7 +44,6 @@
 %install
 %{__rm} -rf %{buildroot}
 %{__python} setup.py install --skip-build --root %{buildroot}
-%{__mv} %{buildroot}%{_bindir}/migrate %{buildroot}%{_bindir}/sqlalchemy-migrate
 
 %clean
 %{__rm} -rf %{buildroot}
@@ -52,10 +58,14 @@
 %files
 %defattr(-,root,root,-)
 %doc README CHANGELOG docs/
-%{_bindir}/sqlalchemy-migrate
+%{_bindir}/*
 %{python_sitelib}/*
 
 %changelog
+* 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.
 




More information about the scm-commits mailing list