forked from pool/python-recommonmark
- Switch to pyproject and autosetup macros.
- Add missing postun section. - Drop unneeded future requirement. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-recommonmark?expand=0&rev=28
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 1 05:47:27 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to pyproject and autosetup macros.
|
||||||
|
- Add missing postun section.
|
||||||
|
- Drop unneeded future requirement.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 11 08:15:47 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
Thu May 11 08:15:47 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||||
|
|
||||||
|
@@ -27,13 +27,16 @@ URL: https://github.com/rtfd/recommonmark
|
|||||||
Source: https://files.pythonhosted.org/packages/source/r/recommonmark/recommonmark-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/r/recommonmark/recommonmark-%{version}.tar.gz
|
||||||
#Source0: https://github.com/rtfd/recommonmark/archive/%%{version}.tar.gz#/recommonmark-%%{version}.tar.gz
|
#Source0: https://github.com/rtfd/recommonmark/archive/%%{version}.tar.gz#/recommonmark-%%{version}.tar.gz
|
||||||
Patch0: sphinx2.patch
|
Patch0: sphinx2.patch
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-CommonMark >= 0.7.3
|
Requires: python-CommonMark >= 0.7.3
|
||||||
Requires: python-Sphinx >= 1.3.1
|
Requires: python-Sphinx >= 1.3.1
|
||||||
Requires: python-docutils >= 0.11
|
Requires: python-docutils >= 0.11
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun):update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun):update-alternatives
|
||||||
Provides: python-reCommonMark = %{version}
|
Provides: python-reCommonMark = %{version}
|
||||||
Obsoletes: python-reCommonMark < %{version}
|
Obsoletes: python-reCommonMark < %{version}
|
||||||
@@ -42,7 +45,6 @@ BuildArch: noarch
|
|||||||
BuildRequires: %{python_module CommonMark >= 0.7.3}
|
BuildRequires: %{python_module CommonMark >= 0.7.3}
|
||||||
BuildRequires: %{python_module Sphinx >= 1.3.1}
|
BuildRequires: %{python_module Sphinx >= 1.3.1}
|
||||||
BuildRequires: %{python_module docutils >= 0.11}
|
BuildRequires: %{python_module docutils >= 0.11}
|
||||||
BuildRequires: %{python_module future}
|
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
# /SECTION tests
|
# /SECTION tests
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@@ -56,18 +58,17 @@ Documentation is available on Read the Docs:
|
|||||||
http://recommonmark.readthedocs.org
|
http://recommonmark.readthedocs.org
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n recommonmark-%{version}
|
%autosetup -p1 -n recommonmark-%{version}
|
||||||
%patch0 -p1
|
|
||||||
# Remove upstream's egg-info
|
# Remove upstream's egg-info
|
||||||
rm -rf %{pypi_name}.egg-info
|
rm -rf %{pypi_name}.egg-info
|
||||||
# find and remove unneeded shebangs
|
# find and remove unneeded shebangs
|
||||||
find recommonmark -name "*.py" | xargs sed -i '1 {/^#!/ d}'
|
find recommonmark -name "*.py" | xargs sed -i '1 {/^#!/ d}'
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%python_clone -a %{buildroot}%{_bindir}/cm2html
|
%python_clone -a %{buildroot}%{_bindir}/cm2html
|
||||||
@@ -84,6 +85,9 @@ find recommonmark -name "*.py" | xargs sed -i '1 {/^#!/ d}'
|
|||||||
%post
|
%post
|
||||||
%{python_install_alternative cm2man cm2latex cm2xetex cm2pseudoxml cm2html cm2xml}
|
%{python_install_alternative cm2man cm2latex cm2xetex cm2pseudoxml cm2html cm2xml}
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%{python_uninstall_alternative cm2man cm2latex cm2xetex cm2pseudoxml cm2html cm2xml}
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%python_uninstall_alternative cm2man
|
%python_uninstall_alternative cm2man
|
||||||
|
|
||||||
@@ -96,7 +100,7 @@ find recommonmark -name "*.py" | xargs sed -i '1 {/^#!/ d}'
|
|||||||
%python_alternative %{_bindir}/cm2xetex
|
%python_alternative %{_bindir}/cm2xetex
|
||||||
%python_alternative %{_bindir}/cm2xml
|
%python_alternative %{_bindir}/cm2xml
|
||||||
%{python_sitelib}/recommonmark/
|
%{python_sitelib}/recommonmark/
|
||||||
%{python_sitelib}/recommonmark-%{version}-py*.egg-info
|
%{python_sitelib}/recommonmark-%{version}.dist-info
|
||||||
%doc README.md CHANGELOG.md
|
%doc README.md CHANGELOG.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user