X-Git-Url: http://git.pld-linux.org/?p=packages%2Fpython-sqlalchemy.git;a=blobdiff_plain;f=python-SQLAlchemy.spec;h=a71f6cd21ef19ca0080b07fb25d82680697b8642;hp=3684ba91f50c418d01c705c55a10a2edc73053b4;hb=a61c4ed5215bcce23d8076b8939a77a0866af3b3;hpb=666da0825155845d0320b6894c72a591263ca673 diff --git a/python-SQLAlchemy.spec b/python-SQLAlchemy.spec index 3684ba9..a71f6cd 100644 --- a/python-SQLAlchemy.spec +++ b/python-SQLAlchemy.spec @@ -1,45 +1,128 @@ +# TODO: +# - examples and docs for python3 +# - builds, but got syntax errors when buildings +# +%bcond_without python3 +%bcond_without python2 +%define module SQLAlchemy +# Summary: Database Abstraction Library -Name: python-SQLAlchemy -Version: 0.1.7 -Release: 1 -Group: Development/Languages/Python +Summary(pl.UTF-8): Biblioteka abstrakcji baz danych +Name: python-%{module} +Version: 0.6.3 +Release: 0.1 License: MIT -Source0: http://cheeseshop.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz -# Source0-md5: 1c9c0124ad057c9fbcf8c4e16ecae960 +Group: Libraries/Python +Source0: http://downloads.sourceforge.net/sqlalchemy/%{module}-%{version}.tar.gz +# Source0-md5: 103bdc156a95291a302acc42c136bf7d URL: http://www.sqlalchemy.org/ -BuildRequires: python-devel +%if %{with python2} +BuildRequires: python-devel >= 1:2.4 +BuildRequires: python-distribute 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 +%if %{with python2} %pyrequires_eq python-modules +%endif BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -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 languag. +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 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 +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 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 SQLAlchemy-%{version} +%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 -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 -find $RPM_BUILD_ROOT%{py_sitescriptdir} -name \*.py -exec rm -f \{\} \; +%py_postclean +%endif + +%if %{with python3} +%{__python3} setup.py build -b build-3 \ + install \ + --root=$RPM_BUILD_ROOT \ + --optimize=2 + +%py3_postclean +%endif + +install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} +cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc README CHANGES doc/*html examples/ +%doc CHANGES README* doc/*.html %{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