diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..47dd471 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/portend-2.3.tar.gz diff --git a/python-portend.spec b/python-portend.spec new file mode 100644 index 0000000..e89e920 --- /dev/null +++ b/python-portend.spec @@ -0,0 +1,88 @@ +# Created by pyp2rpm-3.3.2 +%global pypi_name portend +# Some docs deps are not in fedora yet +%global with_docs 0 + +Name: python-%{pypi_name} +Version: 2.3 +Release: 1%{?dist} +Summary: TCP port monitoring utilities + +License: MIT +URL: https://github.com/jaraco/portend +Source0: %{pypi_source} +BuildArch: noarch + +%description + por·tend pôrˈtend/ be a sign or warning that (something, especially something +momentous or calamitous) is likely to happen. + +%package -n python3-%{pypi_name} +Summary: portend documentation + +BuildRequires: python3-devel +BuildRequires: python3dist(jaraco-functools) +BuildRequires: python3dist(pytest) >= 3.5 +BuildRequires: python3dist(pytest-flake8) +#BuildRequires: python3dist(pytest-sugar) >= 0.9.1 +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(setuptools-scm) >= 1.15.0 +BuildRequires: python3dist(tempora) >= 1.8 + +%description -n python3-%{pypi_name} + por·tend pôrˈtend/ be a sign or warning that (something, especially something +momentous or calamitous) is likely to happen. + +%if 0%{?with_docs} +%package -n python3-%{pypi_name}-doc +Summary: portend documentation + +BuildRequires: python3dist(jaraco-packaging) >= 3.2 +BuildRequires: python3dist(rst-linker) >= 1.9 +BuildRequires: python3dist(sphinx) + +%description -n python3-%{pypi_name}-doc +Documentation for portend +%endif + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info +# disable flake8 in the tests, need a newer version of pytest-flake8 +# https://src.fedoraproject.org/rpms/python-pytest-flake8/pull-request/2 +# AttributeError: 'Application' object has no attribute 'make_notifier' +sed -i 's/ --flake8//' pytest.ini + +%build +%py3_build + +%if 0%{?with_docs} +# generate html docs +PYTHONPATH=${PWD} sphinx-build-3 docs html +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} +%endif + +%install +%py3_install + +%check +LANG=C.utf-8 %{__python3} -m pytest --ignore=build + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/%{pypi_name}.py +%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info + +%if 0%{?with_docs} +%files -n python-%{pypi_name}-doc +%doc html +%license LICENSE +%endif + +%changelog +* Tue Apr 02 2019 Dan Radez - 2.3-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..8df5086 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (portend-2.3.tar.gz) = eb438c9967bd1540534bc9deb5bdb8b7ed41c7328aeee0c9376b00018ec6c07773c0d782efe3f460cf6e68bd4d899bceedf0c581dd29080cd3fe44a3a17b0004