Blob Blame History Raw
%bcond_with bootstrap

%global srcname constantly

%global common_description %{expand:
A library that provides symbolic constant support. It includes collections and
constants with text, numeric, and bit flag values. Originally
twisted.python.constants from the Twisted project.}

Name:           python-%{srcname}
Version:        23.10.4
Release:        5%{?dist}
Summary:        Symbolic constants in Python

License:        MIT
URL:            https://github.com/twisted/constantly
Source0:        %url/archive/%{version}/%{srcname}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3dist(sphinx-rtd-theme)

# the tests are enabled by default but can be disabled
# to avoid a circular dependency on twisted->constantly
%if %{with bootstrap}
BuildRequires:  python3dist(twisted)
%endif

Patch:          disable-pip-in-tox.patch


%description %{common_description}

%package -n     python3-%{srcname}
Summary:        %{summary}

%description -n python3-%{srcname} %{common_description}

%package doc
Summary:        Documentation for %{name}

%description doc
%{common_description}

This is the documentation package for %{name}.

%prep
%autosetup -p1 -n %{srcname}-%{version}

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

sphinx-build docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%install
%pyproject_install
%pyproject_save_files %{srcname}

%check
%if %{with bootstrap}
%pyproject_check_import
%tox
%else
%py3_check_import %{srcname}
%endif

%files -n python3-%{srcname} -f %{pyproject_files}

%files -n python-%{srcname}-doc
%doc html
%license LICENSE

%changelog
* Thu Feb 06 2025 Joel Capitao <jcapitao@redhat.com> - 23.10.4-5
- Enable bootstrap mode

* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 23.10.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild

* Fri Jan 03 2025 Jonathan Wright <jonathan@almalinux.org> - 23.10.4-3
- fix bootstrapping conditionals to what koji allows us to define in side
  tags

* Fri Jan 03 2025 Jonathan Wright <jonathan@almalinux.org> - 23.10.4-2
- fix conditional logic for bootstrap

* Fri Jan 03 2025 Jonathan Wright <jonathan@almalinux.org> - 23.10.4-1
- update to 24.10.4 rhbz#2246791

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 15.1.0-32
- Rebuilt for Python 3.13

* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 15.1.0-31
- Bootstrap for Python 3.13

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Thu Jun 29 2023 Python Maint <python-maint@redhat.com> - 15.1.0-27
- Rebuilt for Python 3.12

* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 15.1.0-26
- Bootstrap for Python 3.12

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Wed Sep 21 2022 Miro Hrončok <miro@hroncok.cz> - 15.1.0-24
- Introduce a tests %%bcond to avoid a bootstrap loop

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Sun Jul 03 2022 Robert-André Mauchin <zebob.m@gmail.com> - 15.1.0-22
- Minor fixes

* Tue Jun 21 2022 Robert-André Mauchin <zebob.m@gmail.com> - 15.1.0-21
- Remove deletion of egg.info

* Tue Jun 21 2022 Robert-André Mauchin <zebob.m@gmail.com> - 15.1.0-20
- Convert to new Python guidelines

* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 15.1.0-19
- Rebuilt for Python 3.11

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Sat Dec 18 2021 Robert-André Mauchin <zebob.m@gmail.com> - 15.1.0-17
- Fix BR

* Sat Dec 18 2021 Robert-André Mauchin <zebob.m@gmail.com> - 15.1.0-16
- Update versioneer.py to be compatible with Python 3.11 Close:
  rhbz#2019059

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 15.1.0-13
- Rebuilt for Python 3.10

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 15.1.0-10
- Rebuilt for Python 3.9

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Sun Oct 13 23:11:50 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 15.1.0-8
- Drop Python 2 support (#1761209)

* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 15.1.0-7
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 15.1.0-6
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 15.1.0-2
- Rebuilt for Python 3.7

* Mon May 14 2018 Robert-André Mauchin <zebob.m@gmail.com> - 15.1.0-1
- Initial package.