%global _empty_manifest_terminate_build 0

Name:           python-django-health-check
Version:        4.4.3
Release:        1
Summary:        Run checks on services like databases, queue servers, celery processes, etc.
License:        MIT
URL:            https://github.com/KristianOellegaard/django-health-check
Source0:        https://files.pythonhosted.org/packages/source/d/django_health_check/django_health_check-%{version}.tar.gz
BuildArch:      noarch

%description
Run checks on services like databases, queue servers, celery processes, etc.

%package -n python3-django-health-check
Summary:        Run checks on services like databases, queue servers, celery processes, etc.
Provides:       python-django-health-check = %{version}-%{release}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-setuptools_scm
BuildRequires:  python3-pip
BuildRequires:  python3-wheel
BuildRequires:  python3-flit
BuildRequires:  python3-flit-scm
BuildRequires:  python3-pytest-runner
BuildRequires:  python3-sphinx

Requires:       python3-django

%description -n python3-django-health-check
Run checks on services like databases, queue servers, celery processes, etc.

%package help
Summary:        Development documents and examples for django-health-check
Provides:       python3-django-health-check-doc

%description help
Run checks on services like databases, queue servers, celery processes, etc.

%prep
%autosetup -n django_health_check-%{version}

%build
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_build

%install
%pyproject_install

install -d -m755 %{buildroot}%{_pkgdocdir}
if [ -d doc ]; then
    cp -a doc %{buildroot}%{_pkgdocdir}/
fi
if [ -d docs ]; then
    cp -a docs %{buildroot}%{_pkgdocdir}/
fi
if [ -d example ]; then
    cp -a example %{buildroot}%{_pkgdocdir}/
fi
if [ -d examples ]; then
    cp -a examples %{buildroot}%{_pkgdocdir}/
fi
if [ -f README.rst ]; then
    cp -a README.rst %{buildroot}%{_pkgdocdir}/
elif [ -f README.md ]; then
    cp -a README.md %{buildroot}%{_pkgdocdir}/
elif [ -f README.txt ]; then
    cp -a README.txt %{buildroot}%{_pkgdocdir}/
fi
if [ -f LICENSE ]; then
    cp -a LICENSE %{buildroot}%{_pkgdocdir}/
fi


%files -n python3-django-health-check
%{python3_sitelib}/health_check/
%{python3_sitelib}/django_health_check*.dist-info/

%files help
%{_pkgdocdir}/*

%changelog
* Mon Jul 06 2026 jinshuaiyu <jinshuaiyu@kylinos.cn> - 4.4.3-1
- Update to 4.4.3
- Remove blank lines in OpenMetrics output

* Fri Jun 26 2026 wuzhaomin <wuzhaomin@kylinos.cn> - 3.24.0-1
- Fix Change as_view to a classmethod
- Fix HealthCheckView.as_view() returning None
- Fix migration command in migration guide

* Mon Jan 05 2026 Yu Peng <yupeng@kylinos.cn> - 3.20.8-1
- Upgrade to 3.20.8 
  * Add conainerization documentation
  * Convert all tests from Django TestCase to pytest
  * Limit coverage reporting to the package source
  * Switch from Sphinx to MkDocs 

* Fri Nov 21 2025 Jianbin Zhao <zhaojianbin@kylinos.com> - 3.20.0-1
- Fix %%files section: use directory wildcards to include __pycache__ files generated during byte compilation
- Remove filelist.lst generation as it doesn't capture .pyc files created by brp-python-bytecompile

* Mon Jul 10 2023 zhangchenglin <zhangchenglin@kylinos.cn> - 3.17.0-1
- Update package to version 3.17.0

* Mon Aug 08 2022 wenzhiwei <wenzhiwei@kylinos.cn> - 3.16.5-1
- Update to 3.16.5

* Fri Jul 23 2021 Xu Jin <jinxu@kylinos.cn> - 3.16.4-1
- Update package to 3.16.4
- Add Buildrequires: python3-pip python3-pytest-runner python3-sphinx python-setuptools_scm

* Sat Aug 01 2020 Python_Bot <Python_Bot@openeuler.org>
- Package Spec generated