X-Git-Url: http://git.pld-linux.org/?p=packages%2Fpython-sqlalchemy.git;a=blobdiff_plain;f=python-sqlalchemy.spec;h=f5ec7ad34e073b8672858618eb4eb04194b50221;hp=f2dcf044d6e75e6f0494762811e43b970b307401;hb=3bbbe704af167518fea7f76a2eb3d024955a2217;hpb=7192b5b4ee69315d46a03379f7823232050c3387 diff --git a/python-sqlalchemy.spec b/python-sqlalchemy.spec index f2dcf04..f5ec7ad 100644 --- a/python-sqlalchemy.spec +++ b/python-sqlalchemy.spec @@ -1,4 +1,5 @@ # +# Conditional build: %bcond_without python2 # CPython 2.x module %bcond_without python3 # CPython 3.x module %bcond_without tests # unit tests @@ -7,15 +8,15 @@ Summary: Database Abstraction Library for Python 2 Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 2 Name: python-%{module} -Version: 1.2.13 -Release: 1 +Version: 1.3.23 +Release: 3 License: MIT Group: Libraries/Python #Source0Download: https://pypi.org/simple/sqlalchemy/ Source0: https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz -# Source0-md5: 0448f6f777cbca996bd0b2490ebde9cf +# Source0-md5: 179d25a8fea451f06539c12bb0a00081 Patch0: %{name}-tests.patch -URL: http://www.sqlalchemy.org/ +URL: https://www.sqlalchemy.org/ BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.714 %if %{with python2} @@ -29,8 +30,8 @@ BuildRequires: python-pytest-xdist %endif %endif %if %{with python3} -BuildRequires: python3-devel >= 1:3.2 -BuildRequires: python3-modules >= 1:3.2 +BuildRequires: python3-devel >= 1:3.4 +BuildRequires: python3-modules >= 1:3.4 BuildRequires: python3-setuptools >= 0.6-0.a9.1 %if %{with tests} BuildRequires: python3-pytest >= 2.5.2 @@ -89,9 +90,7 @@ Wersja dla Pythona 3.x. Summary: API documentation for Python SQLAlchemy module Summary(pl.UTF-8): Dokumentacja API modułu Pythona SQLAlchemy Group: Documentation -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description apidocs API documentation for Python SQLAlchemy module. @@ -103,9 +102,7 @@ Dokumentacja API modułu Pythona SQLAlchemy. Summary: Examples for Python SQLAlchemy module Summary(pl.UTF-8): Przykłady do modułu Pythona SQLAlchemy Group: Documentation -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description examples Examples for Python SQLAlchemy module. @@ -119,11 +116,19 @@ Przykłady do modułu Pythona SQLAlchemy. %build %if %{with python2} -%py_build %{?with_tests:test} +%py_build + +%if %{with tests} +%{__python} -m pytest test +%endif %endif %if %{with python3} -%py3_build %{?with_tests:test} +%py3_build + +%if %{with tests} +%{__python3} -m pytest test +%endif %endif %install @@ -155,6 +160,7 @@ rm -rf $RPM_BUILD_ROOT %{py_sitedir}/sqlalchemy/event %{py_sitedir}/sqlalchemy/ext %{py_sitedir}/sqlalchemy/orm +%{py_sitedir}/sqlalchemy/pool %{py_sitedir}/sqlalchemy/sql %{py_sitedir}/sqlalchemy/testing %{py_sitedir}/sqlalchemy/util @@ -176,6 +182,7 @@ rm -rf $RPM_BUILD_ROOT %{py3_sitedir}/sqlalchemy/event %{py3_sitedir}/sqlalchemy/ext %{py3_sitedir}/sqlalchemy/orm +%{py3_sitedir}/sqlalchemy/pool %{py3_sitedir}/sqlalchemy/sql %{py3_sitedir}/sqlalchemy/testing %{py3_sitedir}/sqlalchemy/util