[python-bleach] initial import

Matthias Runge mrunge at fedoraproject.org
Mon Feb 16 08:12:09 UTC 2015


commit 232434965ae29ccab4cfb5da61d64de9dafe0236
Author: Matthias Runge <mrunge at redhat.com>
Date:   Mon Feb 16 09:11:53 2015 +0100

    initial import

 .gitignore         |    1 +
 python-bleach.spec |  104 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources            |    1 +
 3 files changed, 106 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..bf7892b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/bleach-1.4.1.tar.gz
diff --git a/python-bleach.spec b/python-bleach.spec
new file mode 100644
index 0000000..27ae6ab
--- /dev/null
+++ b/python-bleach.spec
@@ -0,0 +1,104 @@
+%if 0%{?fedora} > 12
+%bcond_without python3
+%else
+%bcond_with python3
+%endif
+%global pypi_name bleach
+
+Name:           python-%{pypi_name}
+Version:        1.4.1
+Release:        2%{?dist}
+Summary:        An easy whitelist-based HTML-sanitizing tool
+
+License:        ASL 2.0
+URL:            http://github.com/jsocol/bleach
+Source0:        https://pypi.python.org/packages/source/b/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+BuildArch:      noarch
+
+BuildRequires:  python2-devel
+BuildRequires:  python-nose >= 1.3
+
+# Runtime requirements are test requirements, mirror them here
+BuildRequires:  python-six
+BuildRequires:  python-html5lib >= 0.999
+
+Requires:       python-six
+Requires:       python-html5lib >= 0.999
+
+%if %{with python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-nose >= 1.3
+# Runtime requirements are test requirements, mirror them here
+BuildRequires:  python3-six
+BuildRequires:  python3-html5lib >= 0.999
+Requires:       python3-html5lib >= 0.999
+Requires:       python3-six
+
+%package -n python3-%{pypi_name}
+Summary:        An easy whitelist-based HTML-sanitizing tool
+
+%description -n python3-%{pypi_name}
+Bleach is an HTML sanitizing library that escapes or strips markup and
+attributes based on a white list.
+%endif
+
+%description
+Bleach is an HTML sanitizing library that escapes or strips markup and
+attributes based on a white list.
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+# Remove bundled egg-info
+rm -rf %{pypi_name}.egg-info
+
+%if %{with python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
+%build
+%{__python2} setup.py build
+
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
+
+%install
+%{__python2} setup.py install --skip-build --root %{buildroot}
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif
+
+%check
+%{__python2} setup.py test
+
+%if %{with python3}
+%{__python3} setup.py test
+%endif
+
+
+%files
+%doc README.rst
+%license LICENSE
+%{python2_sitelib}/%{pypi_name}
+%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+
+%if %{with python3}
+%files -n python3-%{pypi_name}
+%doc README.rst
+%license LICENSE
+%{python3_sitelib}/%{pypi_name}
+%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+%endif
+
+%changelog
+* Thu Feb 12 2015 Matthias Runge <mrunge at redhat.com> - 1.4.1-2
+- add python3 subpackage
+
+* Sat Feb 07 2015 Matthias Runge <mrunge at redhat.com> - 1.4.1-1
+- Initial package. (rhbz#1190378)
diff --git a/sources b/sources
index e69de29..23fa39d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+3bb9f392f055daf015c30db6ad8646fa  bleach-1.4.1.tar.gz


More information about the scm-commits mailing list