commit 639407726019126d4821773d17b8a0ea62f5cde0 Author: James Antill Date: Mon Feb 27 15:08:27 2023 -0500 Import rpm: c8s diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..13ed8f1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/ntplib-0.3.3.tar.gz +/ntplib-0.3.3.tar.gz diff --git a/python-ntplib.spec b/python-ntplib.spec new file mode 100644 index 0000000..fb4d68b --- /dev/null +++ b/python-ntplib.spec @@ -0,0 +1,168 @@ +%if 0%{?fedora} || 0%{?rhel} > 7 +# Enable python3 build by default +%bcond_without python3 +%else +%bcond_with python3 +%endif + +%if 0%{?rhel} > 7 +# Disable python2 build by default +%bcond_with python2 +%else +%bcond_without python2 +%endif + +# tests require internet connection +%global with_tests 0 +Name: python-ntplib +Version: 0.3.3 +Release: 10%{?dist} +Summary: Python module that offers a simple interface to query NTP servers + +License: MIT +URL: http://pypi.python.org/pypi/ntplib/ +Source0: https://pypi.python.org/packages/source/n/ntplib/ntplib-%{?version}.tar.gz + +BuildArch: noarch + +%description +The ntplib is a python module that offers a simple interface to query NTP +servers. It also provides utility functions to translate NTP fields' values to +text (mode, leap indicator...). Since it's pure Python, and only depends on core +modules, it should work on any platform with a Python implementation. + +%if %{with python2} +%package -n python2-ntplib +Summary: Python 2 module that offers a simple interface to query NTP servers + +BuildRequires: python2-devel +BuildRequires: python2-setuptools + +%{?python_provide:%python_provide python2-ntplib} + +%description -n python2-ntplib +The ntplib is a python module that offers a simple interface to query NTP +servers. It also provides utility functions to translate NTP fields' values to +text (mode, leap indicator...). Since it's pure Python, and only depends on core +modules, it should work on any platform with a Python implementation. + +Python 2 version. +%endif # with python2 + + +%if %{with python3} +%package -n python3-ntplib +Summary: Python 3 module that offers a simple interface to query NTP servers + +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%{?python_provide:%python_provide python3-ntplib} + +%description -n python3-ntplib +The ntplib is a python module that offers a simple interface to query NTP +servers. It also provides utility functions to translate NTP fields' values to +text (mode, leap indicator...). Since it's pure Python, and only depends on core +modules, it should work on any platform with a Python implementation. + +Python 3 version. + +%endif # with python3 + + +%prep +%setup -q -n ntplib-%{?version} + +%build +%if %{with python2} +%py2_build +%endif # with python2 + +%if %{with python3} +%py3_build +%endif # with python3 + +%install +%if %{with python2} +%py2_install +%endif # with python2 + +%if %{with python3} +%py3_install +%endif # with python3 + +%if 0%{?with_tests} +%if %{with python2} +%check +%{__python2} test_ntplib.py +%endif # with python2 + +%if %{with python3} +%{__python3} test_ntplib.py +%endif # with python3 +%endif # with_tests + +%if %{with python2} +%files -n python2-ntplib +%doc CHANGELOG +%{python2_sitelib}/* +%endif # with python2 + +%if %{with python3} +%files -n python3-ntplib +%doc CHANGELOG +%{python3_sitelib}/ntplib* +%{python3_sitelib}/__pycache__/* +%endif # with python3 + +%changelog +* Thu Mar 15 2018 Charalampos Stratakis - 0.3.3-10 +- Don't build Python 2 subpackage on EL > 7 + +* Fri Feb 09 2018 Fedora Release Engineering - 0.3.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Jan 26 2018 Iryna Shcherbina - 0.3.3-8 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Thu Jul 27 2017 Fedora Release Engineering - 0.3.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.3.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 12 2016 Charalampos Stratakis - 0.3.3-5 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 0.3.3-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Wed Feb 3 2016 Orion Poplawski - 0.3.3-3 +- Modernize spec +- Fix python3 package file ownership + +* Tue Nov 03 2015 Robert Kuska - 0.3.3-2 +- Rebuilt for Python3.5 rebuild + +* Tue Jul 28 2015 Vratislav Podzimek - 0.3.3-1 +- New upstream version ntplib-0.3.3 (license change LGPLv2+ -> MIT) + +* Thu Jun 18 2015 Fedora Release Engineering - 0.3.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 28 2014 Miro HronĨok - 0.3.2-3 +- Introduced Python 3 subpackage +- Conditional %%check section + +* Sat Jun 07 2014 Fedora Release Engineering - 0.3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Feb 05 2014 Vratislav Podzimek 0.3.2-1 +- New upstream version ntplib-0.3.2 + +* Sun Aug 04 2013 Fedora Release Engineering - 0.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Jun 28 2013 Vratislav Podzimek 0.3.1-1 +- Initial release diff --git a/sources b/sources new file mode 100644 index 0000000..39003d0 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (ntplib-0.3.3.tar.gz) = 4175ebb78228475b32744a59ad4c404f7b88344859c19874606967c7d83a4680bbc78ff42d13b866b8e6ef939d2f1948b0a0b42819c78a8520856bae48ec907f