]> git.pld-linux.org Git - packages/python-sqlalchemy.git/commitdiff
- updated to 1.3.12 auto/th/python-sqlalchemy-1.3.12-1
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 21 Jan 2020 16:00:36 +0000 (17:00 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 21 Jan 2020 16:00:36 +0000 (17:00 +0100)
- updated tests patch

python-sqlalchemy-tests.patch
python-sqlalchemy.spec

index a404e2428e2338f618a960d88695a415c9e5411e..a00146f05561f884c9685b1f6662ec456cb36746 100644 (file)
@@ -9,26 +9,12 @@
  
      def initialize_options(self):
          TestCommand.initialize_options(self)
-@@ -121,6 +121,13 @@
-     readme = r_file.read()
-+def get_mock_dep():
-+    try:
-+        from unittest import mock
-+        return []
-+    except ImportError:
-+        return ['mock']
-+
- def run_setup(with_cext):
-     kwargs = {}
-     if with_cext:
-@@ -139,7 +146,7 @@
-         package_dir={'': 'lib'},
-         license="MIT License",
+@@ -159,7 +159,7 @@
          cmdclass=cmdclass,
--        tests_require=['pytest>=2.5.2,!=3.9.1,!=3.9.2', 'mock', 'pytest-xdist'],
-+        tests_require=['pytest>=2.5.2,!=3.9.1,!=3.9.2', 'pytest-xdist'] + get_mock_dep(),
+         tests_require=[
+             "pytest>=2.5.2,!=3.9.1,!=3.9.2",
+-            "mock",
++            "mock;python_version<'3.3'",
+             "pytest-xdist",
+         ],
          long_description=readme,
-         classifiers=[
-             "Development Status :: 5 - Production/Stable",
index 0b2ed82336158766d568f1745415bc109c2eafed..2b931f46e474b31ffbfe01243cf8aea0497e46ef 100644 (file)
@@ -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,13 +8,13 @@
 Summary:       Database Abstraction Library for Python 2
 Summary(pl.UTF-8):     Biblioteka abstrakcji baz danych dla Pythona 2
 Name:          python-%{module}
-Version:       1.2.15
-Release:       2
+Version:       1.3.12
+Release:       1
 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: e5df26cee44a3df9fa9b7daf169a3a69
+# Source0-md5: 02a46be841903b60c52a83342d3ced8e
 Patch0:                %{name}-tests.patch
 URL:           http://www.sqlalchemy.org/
 BuildRequires: rpm-pythonprov
@@ -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,7 +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"
+%if "%{_rpmversion}" >= "4.6"
 BuildArch:     noarch
 %endif
 
@@ -103,7 +104,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"
+%if "%{_rpmversion}" >= "4.6"
 BuildArch:     noarch
 %endif
 
@@ -119,11 +120,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 +164,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 +186,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
This page took 0.132734 seconds and 4 git commands to generate.