From b4fa87cd076ab0b182c12866e78c8ee999ddf0b7 Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Apr 03 2019 19:19:13 +0000 Subject: initial spec file --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe93504 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/rst.linker-1.10.tar.gz diff --git a/python-rst-linker.spec b/python-rst-linker.spec new file mode 100644 index 0000000..14068d9 --- /dev/null +++ b/python-rst-linker.spec @@ -0,0 +1,83 @@ +# Created by pyp2rpm-3.2.2 +%global pypi_name rst.linker +%global pkg_name rst-linker +# This package is interdependant on jaraco-packaging to build docs +# will build both with out docs and add docs in later +%global with_docs 0 + +Name: python-%{pkg_name} +Version: 1.10 +Release: 1%{?dist} +Summary: Can add links and perform other custom replacements to rst + +License: MIT +URL: https://github.com/jaraco/rst.linker +Source0: https://files.pythonhosted.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +Requires: python3-six +Requires: python3-dateutil + +BuildRequires: python3-devel +BuildRequires: python3-pathspec +BuildRequires: python3-setuptools_scm >= 1.15.0 +BuildRequires: python3-setuptools +%if 0%{?with_docs} +BuildRequires: python3-sphinx +BuildRequires: python3-jaraco-packaging +%endif + +%description + rst.linker provides a routine for adding links and performing other custom +replacements to restructured text files as a Sphinx extension.License License +is indicated in the project metadata (typically one or more of the Trove +classifiers). For more details, see this explanation < In your sphinx +configuration file, include rst.linker as an extension and then add a +link_files configuration section... + +%if 0%{?with_docs} +%package -n python-%{pkg_name}-doc +Summary: rst.linker documentation +%description -n python-%{pkg_name}-doc +Documentation for rst.linker +%endif + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%py3_build +%if 0%{?with_docs} +# generate html docs +# this package requires itself to build docs :/ +PYTHONPATH=./ sphinx-build docs html +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} +%endif + +%install +# Must do the subpackages' install first because the scripts in /usr/bin are +# overwritten with every setup.py install. +%py3_install + +%check +# BuildRequires: python(2/3)-path does not meet the test-requirement for path.py +#%%{__python3} setup.py test + +%files -n python-%{pkg_name} +%license LICENSE +%doc README.rst +%{python3_sitelib}/rst +%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info + +%if 0%{?with_docs} +%files -n python-%{pkg_name}-doc +%license LICENSE +%doc html +%endif + +%changelog +* Wed May 02 2018 Dan Radez - 1.10-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..ddd362a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (rst.linker-1.10.tar.gz) = 5541d0ba5299a6efee444ed3c4fb4f108bcdd7c84e4be0b0a44f71c9f13e18d5b5c4c38328a542fe5666d435e1e04c35c0db5535706a45932dc01590813a85cc