| 
							
							
							
						 |  |  | @@ -1,7 +1,7 @@ | 
		
	
		
			
				|  |  |  |  | # | 
		
	
		
			
				|  |  |  |  | # spec file | 
		
	
		
			
				|  |  |  |  | # spec file for package python-semantic_version | 
		
	
		
			
				|  |  |  |  | # | 
		
	
		
			
				|  |  |  |  | # Copyright (c) 2023 SUSE LLC | 
		
	
		
			
				|  |  |  |  | # Copyright (c) 2025 SUSE LLC | 
		
	
		
			
				|  |  |  |  | # | 
		
	
		
			
				|  |  |  |  | # All modifications and additions to the file contributed by third parties | 
		
	
		
			
				|  |  |  |  | # remain the property of their copyright owners, unless otherwise agreed | 
		
	
	
		
			
				
					
					|  |  |  | @@ -16,7 +16,13 @@ | 
		
	
		
			
				|  |  |  |  | # | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  | %{?!python_module:%define python_module() python-%{**} python3-%{**}} | 
		
	
		
			
				|  |  |  |  | %if 0%{?suse_version} == 1600 || 0%{?suse_version} <= 1550 | 
		
	
		
			
				|  |  |  |  | # No django in SLFO:Main | 
		
	
		
			
				|  |  |  |  | %bcond_with django | 
		
	
		
			
				|  |  |  |  | %else | 
		
	
		
			
				|  |  |  |  | %bcond_without django | 
		
	
		
			
				|  |  |  |  | %endif | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  | %global flavor @BUILD_FLAVOR@%{nil} | 
		
	
		
			
				|  |  |  |  | %if "%{flavor}" == "test" | 
		
	
		
			
				|  |  |  |  | %define psuffix -test | 
		
	
	
		
			
				
					
					|  |  |  | @@ -34,13 +40,15 @@ License:        BSD-2-Clause | 
		
	
		
			
				|  |  |  |  | Group:          Development/Languages/Python | 
		
	
		
			
				|  |  |  |  | URL:            https://github.com/rbarrois/python-semanticversion | 
		
	
		
			
				|  |  |  |  | Source:         https://files.pythonhosted.org/packages/source/s/semantic_version/semantic_version-%{version}.tar.gz | 
		
	
		
			
				|  |  |  |  | BuildRequires:  %{python_module pip} | 
		
	
		
			
				|  |  |  |  | BuildRequires:  %{python_module setuptools} | 
		
	
		
			
				|  |  |  |  | BuildRequires:  %{python_module wheel} | 
		
	
		
			
				|  |  |  |  | BuildRequires:  fdupes | 
		
	
		
			
				|  |  |  |  | BuildRequires:  python-rpm-macros | 
		
	
		
			
				|  |  |  |  | BuildArch:      noarch | 
		
	
		
			
				|  |  |  |  | %if %{with test} | 
		
	
		
			
				|  |  |  |  | BuildRequires:  %{python_module pytest} | 
		
	
		
			
				|  |  |  |  | %if 0%{?suse_version} > 1550 | 
		
	
		
			
				|  |  |  |  | %if %{with django} | 
		
	
		
			
				|  |  |  |  | # Django 4.0 dropped support for Python < 3.8 | 
		
	
		
			
				|  |  |  |  | BuildRequires:  %{python_module Django >= 1.11 if (%python-base without python36-base)} | 
		
	
		
			
				|  |  |  |  | %endif | 
		
	
	
		
			
				
					
					|  |  |  | @@ -55,19 +63,24 @@ It follows strictly the 2.0.0 version of the SemVer scheme. | 
		
	
		
			
				|  |  |  |  | %autosetup -n semantic_version-%{version} | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  | %build | 
		
	
		
			
				|  |  |  |  | %python_build | 
		
	
		
			
				|  |  |  |  | %pyproject_wheel | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  | %install | 
		
	
		
			
				|  |  |  |  | %if !%{with test} | 
		
	
		
			
				|  |  |  |  | %python_install | 
		
	
		
			
				|  |  |  |  | %pyproject_install | 
		
	
		
			
				|  |  |  |  | %python_expand %fdupes %{buildroot}%{$python_sitelib} | 
		
	
		
			
				|  |  |  |  | %endif | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  | %if %{with test} | 
		
	
		
			
				|  |  |  |  | %check | 
		
	
		
			
				|  |  |  |  | %if %{without django} | 
		
	
		
			
				|  |  |  |  | python_flags="--ignore tests/test_django.py" | 
		
	
		
			
				|  |  |  |  | %else | 
		
	
		
			
				|  |  |  |  | # Django 4.0 dropped support for Python < 3.8 | 
		
	
		
			
				|  |  |  |  | python36_flags="--ignore tests/test_django.py" | 
		
	
		
			
				|  |  |  |  | %pytest ${$python_flags} | 
		
	
		
			
				|  |  |  |  | %endif | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  | %pytest ${$python_flags} ${python_flags} | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  | %else | 
		
	
		
			
				|  |  |  |  |  | 
		
	
	
		
			
				
					
					|  |  |  | @@ -75,7 +88,7 @@ python36_flags="--ignore tests/test_django.py" | 
		
	
		
			
				|  |  |  |  | %license LICENSE | 
		
	
		
			
				|  |  |  |  | %doc README.rst ChangeLog | 
		
	
		
			
				|  |  |  |  | %{python_sitelib}/semantic_version | 
		
	
		
			
				|  |  |  |  | %{python_sitelib}/semantic_version-%{version}*-info | 
		
	
		
			
				|  |  |  |  | %{python_sitelib}/semantic_version-%{version}.dist-info | 
		
	
		
			
				|  |  |  |  | %endif | 
		
	
		
			
				|  |  |  |  |  | 
		
	
		
			
				|  |  |  |  | %changelog | 
		
	
	
		
			
				
					
					| 
							
							
							
						 |  |  |   |