%if 0%{?fedora} || 0%{?rhel} > 7 # Enable python3 build by default %endif %if 0%{?rhel} > 7 # Disable python2 build by default %endif # tests require internet connection %global with_tests 0 Name: python-ntplib Version: 0.3.3 Release: 1%{?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. %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. %prep %setup -q -n ntplib-%{?version} %build %py3_build %install %py3_install %if 0%{?with_tests} %{__python3} test_ntplib.py %endif %files -n python3-ntplib %doc CHANGELOG %{python3_sitelib}/ntplib* %{python3_sitelib}/__pycache__/* %changelog * Sun Jul 30 2023 Vratislav Podzimek - 0.3.3-1 - Initial build for EPEL 9