!1 Initial packaging

From: @zhang__3125 
Reviewed-by: @dwl301 
Signed-off-by: @dwl301
This commit is contained in:
openeuler-ci-bot 2022-04-19 09:24:31 +00:00 committed by Gitee
commit 35e8f6a6d4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 69 additions and 0 deletions

65
python-smartypants.spec Normal file
View File

@ -0,0 +1,65 @@
%global pypi_name smartypants
Name: python-%{pypi_name}
Version: 2.0.1
Release: 1
Summary: plug-in that easily translates ASCII punctuation characters into smart entities
License: BSD
URL: https://github.com/leohemsted/smartypants.py
Source0: https://github.com/leohemsted/smartypants.py/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: make python3-devel python3dist(setuptools) 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.
%prep
%autosetup -n %{pypi_name}.py-%{version}
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}
%license COPYING
%doc README.rst
%doc CHANGES.rst
%doc docs/_build/html
%license COPYING
%{_bindir}/%{pypi_name}
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{pypi_name}.py
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%changelog
* Mon Mar 28 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 2.0.1-1
- initial packaging

4
python-smartypants.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: smartypants
tag_prefix: ^v
seperator: .

BIN
smartypants-2.0.1.tar.gz Normal file

Binary file not shown.