Avoid mypy dependency in RHEL builds
RHEL does not include mypy, and the plugin is deprecated in 2.0: https://docs.sqlalchemy.org/en/20/orm/extensions/mypy.html
This commit is contained in:
		
							parent
							
								
									4cdab0416c
								
							
						
					
					
						commit
						8a0ad755ca
					
				| @ -1,5 +1,7 @@ | |||||||
|  | # Mypy plugin is deprecated in 2.0. mypy is not in RHEL. | ||||||
|  | %bcond mypy %{undefined rhel} | ||||||
| # Tests crash when being run by pytest-xdist | # Tests crash when being run by pytest-xdist | ||||||
| %bcond_with xdist | %bcond xdist 0 | ||||||
| 
 | 
 | ||||||
| %global srcname SQLAlchemy | %global srcname SQLAlchemy | ||||||
| %global canonicalname %{py_dist_name %{srcname}} | %global canonicalname %{py_dist_name %{srcname}} | ||||||
| @ -10,7 +12,7 @@ | |||||||
|     mssql_pyodbc \ |     mssql_pyodbc \ | ||||||
|     mysql \ |     mysql \ | ||||||
|     mysql_connector \ |     mysql_connector \ | ||||||
|     mypy \ |     %{?with_mypy:mypy} \ | ||||||
|     postgresql \ |     postgresql \ | ||||||
|     postgresql_pg8000 \ |     postgresql_pg8000 \ | ||||||
|     postgresql_asyncpg \ |     postgresql_asyncpg \ | ||||||
| @ -36,7 +38,9 @@ BuildRequires:  findutils | |||||||
| BuildRequires:  gcc | BuildRequires:  gcc | ||||||
| BuildRequires:  python3-devel >= 3.7 | BuildRequires:  python3-devel >= 3.7 | ||||||
| # The dependencies needed for testing don’t get auto-generated. | # The dependencies needed for testing don’t get auto-generated. | ||||||
|  | %if %{with mypy} | ||||||
| BuildRequires:  python3dist(mypy) | BuildRequires:  python3dist(mypy) | ||||||
|  | %endif | ||||||
| BuildRequires:  python3dist(pytest) | BuildRequires:  python3dist(pytest) | ||||||
| %if %{with xdist} | %if %{with xdist} | ||||||
| BuildRequires:  python3dist(pytest-xdist) | BuildRequires:  python3dist(pytest-xdist) | ||||||
| @ -110,6 +114,9 @@ done > doc-files.txt | |||||||
| 
 | 
 | ||||||
| %check | %check | ||||||
| %pytest test \ | %pytest test \ | ||||||
|  | %if %{without mypy} | ||||||
|  |   -k 'not Mypy' \ | ||||||
|  | %endif | ||||||
| %if %{with xdist} | %if %{with xdist} | ||||||
| --numprocesses=auto | --numprocesses=auto | ||||||
| %endif | %endif | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user