diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2eb7448 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/jaraco.functools-2.0.tar.gz diff --git a/python-jaraco-functools.spec b/python-jaraco-functools.spec new file mode 100644 index 0000000..462c7e0 --- /dev/null +++ b/python-jaraco-functools.spec @@ -0,0 +1,89 @@ +# Created by pyp2rpm-3.3.2 +%global pypi_name jaraco-functools +# Fedora doesn't have all the docs deps yet +%bcond_with docs + +Name: python-%{pypi_name} +Version: 2.0 +Release: 1%{?dist} +Summary: Functools like those found in stdlib + +License: MIT +URL: https://github.com/jaraco/jaraco.functools +Source0: %{pypi_source jaraco.functools} +BuildArch: noarch + +%description +Functools like those found in stdlib + +%package -n python3-%{pypi_name} +Summary: %{summary} +Requires: python3-jaraco + +BuildRequires: python3-devel +BuildConflicts: python3dist(pytest) = 3.7.3 +BuildRequires: python3dist(jaraco.classes) +BuildRequires: python3dist(more-itertools) +BuildRequires: python3dist(pytest) >= 3.5 +BuildRequires: python3dist(pytest-flake8) +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(setuptools-scm) >= 1.15.0 +BuildRequires: python3dist(six) +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +Functools like those found in stdlib + +%if %{with docs} +BuildRequires: python3dist(jaraco.packaging) >= 3.2 +BuildRequires: python3dist(rst.linker) >= 1.9 +BuildRequires: python3dist(sphinx) +%package -n python-%{pypi_name}-doc +Summary: jaraco-functools documentation +%description -n python-%{pypi_name}-doc +Documentation for jaraco-functools +%endif + +%prep +%autosetup -n jaraco.functools-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%py3_build + +%if %{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 +# disabled for right now, 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' +# LANG=C.utf-8 %%{__python3} -m pytest --ignore=build + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +# These excludes are provided by python3-jaraco +%exclude %{python3_sitelib}/jaraco/__init__* +%exclude %{python3_sitelib}/jaraco/__pycache__/__init__* +%{python3_sitelib}/jaraco/functools* +%{python3_sitelib}/jaraco/__pycache__/functools* +%{python3_sitelib}/jaraco.functools-%{version}-py?.?.egg-info + +%if %{with docs} +%files -n python-%{pypi_name}-doc +%doc html +%license LICENSE +%endif + +%changelog +* Wed Apr 03 2019 Dan Radez - 2.0-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..3a05fbe --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (jaraco.functools-2.0.tar.gz) = dce30c08f0e9f3c7b682c78fc3a46a26d9972706f4c8449a12ba11aa5ed130c6d9ca405213fd93b6b4110ef9cea549e5fa925c96bfaf18681cd6957d8ba0889f