]> git.pld-linux.org Git - packages/python-sqlalchemy.git/blobdiff - python-SQLAlchemy.spec
up to 0.6.9
[packages/python-sqlalchemy.git] / python-SQLAlchemy.spec
index 5a8ab94789983cc56676ba52a60fe9f1c42ba9d9..5f2f0ede33c1842f84e537074c07cded4131013d 100644 (file)
@@ -1,19 +1,36 @@
+# TODO:
+# - examples and docs for python3
+# - builds, but got syntax errors when buildings
+#
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
 %define                module  SQLAlchemy
 Summary:       Database Abstraction Library
 Summary(pl.UTF-8):     Biblioteka abstrakcji baz danych
 %define                module  SQLAlchemy
 Summary:       Database Abstraction Library
 Summary(pl.UTF-8):     Biblioteka abstrakcji baz danych
-Name:          python-SQLAlchemy
-Version:       0.5.3
+Name:          python-%{module}
+Version:       0.6.9
 Release:       1
 License:       MIT
 Group:         Libraries/Python
 Release:       1
 License:       MIT
 Group:         Libraries/Python
-Source0:       http://dl.sourceforge.net/sqlalchemy/%{module}-%{version}.tar.gz
-# Source0-md5: 8a03ac93aa28a9f4ea5ecc0557e90954
+Source0:       http://downloads.sourceforge.net/sqlalchemy/%{module}-%{version}.tar.gz
+# Source0-md5: 518c5eeca5623bb1fbac74f6917f922a
 URL:           http://www.sqlalchemy.org/
 URL:           http://www.sqlalchemy.org/
-BuildRequires: python-devel >= 1:2.5
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.4
+BuildRequires: python-distribute
 BuildRequires: python-setuptools >= 0.6-0.a9.1
 BuildRequires: python-setuptools >= 0.6-0.a9.1
+%endif
+%if %{with python3}
+BuildRequires: python3-2to3
+BuildRequires: python3-devel
+BuildRequires: python3-modules
+%endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.219
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.219
+%if %{with python2}
 %pyrequires_eq  python-modules
 %pyrequires_eq  python-modules
+%endif
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -24,6 +41,8 @@ SQLAlchemy provides a full suite of well known enterprise-level
 persistence patterns, designed for efficient and high-performing
 database access, adapted into a simple and Pythonic domain language.
 
 persistence patterns, designed for efficient and high-performing
 database access, adapted into a simple and Pythonic domain language.
 
+Python 2.x version.
+
 %description -l pl.UTF-8
 Zestaw narzędzi SQL dla Pythona oraz odwzorowań obiektowo-relacyjnych
 dających programistom całą potęgę i elastyczność SQL-a. SQLAlchemy
 %description -l pl.UTF-8
 Zestaw narzędzi SQL dla Pythona oraz odwzorowań obiektowo-relacyjnych
 dających programistom całą potęgę i elastyczność SQL-a. SQLAlchemy
@@ -31,24 +50,64 @@ udostępnia pełny zbiór dobrze znanych wzorców trwałości,
 zaprojektowanych do wydajnego dostępu do baz danych, zaadoptowanych do
 prostej, pythonowej domeny językowej.
 
 zaprojektowanych do wydajnego dostępu do baz danych, zaadoptowanych do
 prostej, pythonowej domeny językowej.
 
+Wersja dla pythona 2.x.
+
+%package -n python3-%{module}
+Summary:       Database Abstraction Library
+Summary(pl.UTF-8):     Biblioteka abstrakcji baz danych
+Group:         Libraries/Python
+
+%description -n python3-%{module}
+The Python SQL toolkit and Object Relational Mapper that gives
+application developers the full power and flexibility of SQL.
+SQLAlchemy provides a full suite of well known enterprise-level
+persistence patterns, designed for efficient and high-performing
+database access, adapted into a simple and Pythonic domain language.
+
+Python 3.x version.
+
+%description -n python3-%{module} -l pl.UTF-8
+Zestaw narzędzi SQL dla Pythona oraz odwzorowań obiektowo-relacyjnych
+dających programistom całą potęgę i elastyczność SQL-a. SQLAlchemy
+udostępnia pełny zbiór dobrze znanych wzorców trwałości,
+zaprojektowanych do wydajnego dostępu do baz danych, zaadoptowanych do
+prostej, pythonowej domeny językowej.
+
+Wersja dla Pythona 3.x.
+
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
-%{__python} setup.py build
+%if %{with python2}
+%{__python} setup.py build -b build-2
+%endif
+%if %{with python3}
+%{__python3} setup.py build -b build-3
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install \
+%if %{with python2}
+%{__python} setup.py build -b build-2 \
+       install \
        --single-version-externally-managed \
        --optimize=2 \
        --root=$RPM_BUILD_ROOT
 
        --single-version-externally-managed \
        --optimize=2 \
        --root=$RPM_BUILD_ROOT
 
+%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py build -b build-3 \
+       install \
+       --root=$RPM_BUILD_ROOT \
+       --optimize=2
+%endif
+
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
-%py_postclean
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -58,3 +117,10 @@ rm -rf $RPM_BUILD_ROOT
 %{py_sitescriptdir}/SQLAlchemy*
 %{py_sitescriptdir}/sqlalchemy*
 %{_examplesdir}/%{name}-%{version}
 %{py_sitescriptdir}/SQLAlchemy*
 %{py_sitescriptdir}/sqlalchemy*
 %{_examplesdir}/%{name}-%{version}
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%{py3_sitescriptdir}/SQLAlchemy*
+%{py3_sitescriptdir}/sqlalchemy*
+%endif
This page took 0.093096 seconds and 4 git commands to generate.