## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %if 0%{?rhel} < 10 # sphinx version is too old %bcond_with doc %else %bcond_without doc %endif %global pypi_name django-configurations Name: python-%{pypi_name} Version: 2.5.1 Release: %autorelease Summary: A helper for organizing Django settings License: BSD-3-Clause URL: https://django-configurations.readthedocs.io/ Source: %{pypi_source} Patch: %{pypi_name}-adjust_test_cases.diff BuildArch: noarch %global _description %{expand: django-configurations eases Django project configuration by relying on the composability of Python classes. It extends the notion of Django's module based settings loading with well established object oriented programming patterns.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-devel BuildRequires: python3dist(pytest) %description -n python3-%{pypi_name} %_description %if %{with doc} %package -n python-%{pypi_name}-doc Summary: The documentation for %{name} %description -n python-%{pypi_name}-doc Documentation for %{name}. %endif %prep %autosetup -n %{pypi_name}-%{version} -p1 rm -rf %{pypi_name}.egg-info # Remove unnecessary test BRs sed -i '/coverage$/d' tox.ini sed -i '/coverage_enable_subprocess$/d' tox.ini %generate_buildrequires %if %{with doc} %pyproject_buildrequires -e docs -t %else %pyproject_buildrequires -t %endif %build %pyproject_wheel %if %{with doc} PYTHONPATH=${PWD} sphinx-build-3 docs html rm -rf html/.{doctrees,buildinfo} %endif %install %pyproject_install %pyproject_save_files configurations %check export DJANGO_CONFIGURATION="Test" export DJANGO_SETTINGS_MODULE="tests.settings.main" export PATH=$PATH:%{buildroot}%{_bindir} export PYTHONPATH=%{buildroot}%{python3_sitelib}:$(pwd) %pytest %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.rst %{_bindir}/django-cadmin %if %{with doc} %files -n python-%{pypi_name}-doc %doc html %license LICENSE %endif %changelog ## START: Generated by rpmautospec * Fri Jul 19 2024 Fedora Release Engineering - 2.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 2.5.1-2 - Rebuilt for Python 3.13 * Mon Apr 08 2024 Fabian Affolter - 2.5.1-1 - UPdate to latest upstream relase 2.5.1 (closes rhbz#2271801) * Fri Jan 26 2024 Fedora Release Engineering - 2.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 2.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Oct 24 2023 Michel Lind - 2.5-1 - Update to 2.5 - Modernize spec to use current guidelines - Reenable tests - Conditionalize documentation building - Use SPDX license identifier * Fri Jul 21 2023 Fedora Release Engineering - 2.2-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jun 29 2023 Python Maint - 2.2-13 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 2.2-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 2.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 14 2022 Python Maint - 2.2-10 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 2.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Jul 27 2021 Fedora Release Engineering - 2.2-8 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 2.2-7 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 2.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 2.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro HronĨok - 2.2-4 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 2.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Tue Jan 07 2020 Fabian Affolter - 2.2-2 - Use var for source URL - Better use of wildcards (rhbz#1786875) * Sat Dec 28 2019 Fabian Affolter - 2.2-1 - Initial package for Fedora ## END: Generated by rpmautospec