From af2c2ca769d9aba6e7c5a25d6c808521a440bb38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Matos?= Date: Wed, 12 Jun 2019 17:15:54 +0100 Subject: [PATCH] fix source url, license short hand, description and summary. remove shebang lines and make smartypants a shebang line use python3. --- .gitignore | 2 + python-smartypants.spec | 87 +++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 90 insertions(+) create mode 100644 .gitignore create mode 100644 python-smartypants.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..875a139 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/smartypants-2.0.1.tar.gz +clog diff --git a/python-smartypants.spec b/python-smartypants.spec new file mode 100644 index 0000000..5d4e234 --- /dev/null +++ b/python-smartypants.spec @@ -0,0 +1,87 @@ +%global pypi_name smartypants + +Name: python-%{pypi_name} +Version: 2.0.1 +Release: 2%{?dist} +Summary: plug-in that easily translates ASCII punctuation characters into smart entities + +License: BSD +URL: https://github.com/leohemsted/smartypants.py +Source0: %url/archive/v%{version}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(sphinx) + +%description +SmartyPants is a free web publishing plug-in for Movable +Type, Blosxom, and BBEdit that easily translates plain ASCII +punctuation characters into “smart” typographic punctuation HTML +entities. + + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +Requires: python3dist(setuptools) +%description -n python3-%{pypi_name} +SmartyPants is a free web publishing plug-in for Movable +Type, Blosxom, and BBEdit that easily translates plain ASCII +punctuation characters into “smart” typographic punctuation HTML +entities. + + +%package -n python-%{pypi_name}-doc +Summary: python-smartypants documentation +%description -n python-%{pypi_name}-doc +Documentation for python-smartypants + + +%prep +%autosetup -n %{pypi_name}.py-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info +for lib in $(find -type f -name '*.py'); do + sed -i.python -e '1{\@^#!@d}' $lib +done +sed -i.python -e 's|#!/usr/bin/env python|#!/usr/bin/python3|' smartypants + + +%build +%py3_build +# generate html documentation +cd docs +make html +# remove the sphinx-build leftovers +rm -rf _build/html/.{doctrees,buildinfo} + + +%install +%py3_install + +%check +%{__python3} setup.py test + + +%files -n python3-%{pypi_name} +%doc README.rst +%doc CHANGES.rst +%license COPYING +%{_bindir}/%{pypi_name} +%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/%{pypi_name}.py +%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info + +%files -n python-%{pypi_name}-doc +%doc docs/_build/html +%license COPYING + +%changelog +* Tue Jun 11 2019 José Matos - 2.0.1-2 +- fix source url, license short hand, description and summary. +- remove shebang lines and make smartypants a shebang line use python3. + +* Sat Sep 1 2018 José Matos - 2.0.1-1 +- initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..a95f296 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (smartypants-2.0.1.tar.gz) = d47a866a5478c3520251f87a93a468a5eea10318b24b2e8d4bc918d533b5a5789aa56d3a8d5fb8ccff9572fb63e5b6f2eafc44f93fb57a19e6621ebef5d64d9d