From f08f9b065ed5747e2e1041b8a2646657d43c0d5a Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 11 Apr 2023 03:51:02 +0000 Subject: automatic import of python-html --- .gitignore | 1 + python-html.spec | 270 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 272 insertions(+) create mode 100644 python-html.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..2f3275f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/html-1.16.tar.gz diff --git a/python-html.spec b/python-html.spec new file mode 100644 index 0000000..32d0ced --- /dev/null +++ b/python-html.spec @@ -0,0 +1,270 @@ +%global _empty_manifest_terminate_build 0 +Name: python-html +Version: 1.16 +Release: 1 +Summary: simple, elegant HTML, XHTML and XML generation +License: UNKNOWN +URL: http://pypi.python.org/pypi/html +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/4a/df/0e3d22d50ee43274eb5116f49972a164d853bb3ab305a69a0540b6292252/html-1.16.tar.gz +BuildArch: noarch + + +%description +To construct HTML start with an instance of ``html.HTML()``. Add +tags by accessing the tag's attribute on that object. For example: +>>> from html import HTML +>>> h = HTML() +>>> h.p('Hello, world!') +>>> print h # or print(h) in python 3+ +

Hello, world!

+You may supply a tag name and some text contents when creating a HTML +instance: +>>> h = HTML('html', 'text') +>>> print h +text +You may also append text content later using the tag's ``.text()`` method +or using augmented addition ``+=``. Any HTML-specific characters (``<>&"``) +in the text will be escaped for HTML safety as appropriate unless +``escape=False`` is passed. Each of the following examples uses a new +``HTML`` instance: +>>> p = h.p('hello world!\n') +>>> p.br +>>> p.text('more → text', escape=False) +>>> p += ' ... augmented' +>>> h.p +>>> print h +

hello, world!
more → text ... augmented

+

+Note also that the top-level ``HTML`` object adds newlines between tags by +default. Finally in the above you'll see an empty paragraph tag - tags with +no contents get no closing tag. +If the tag should have sub-tags you have two options. You may either add +the sub-tags directly on the tag: +>>> l = h.ol +>>> l.li('item 1') +>>> l.li.b('item 2 > 1') +>>> print h +

    +
  1. item 1
  2. +
  3. item 2 > 1
  4. +
+Note that the default behavior with lists (and tables) is to add newlines +between sub-tags to generate a nicer output. You can also see in that +example the chaining of tags in ``l.li.b``. +Tag attributes may be passed in as well: +>>> t = h.table(border='1') +>>> for i in range(2): +>>> r = t.tr +>>> r.td('column 1') +>>> r.td('column 2') +>>> print t + + + +
column 1column 2
column 1column 2
+A variation on the above is to use a tag as a context variable. The +following is functionally identical to the first list construction but +with a slightly different sytax emphasising the HTML structure: +>>> with h.ol as l: +You may turn off/on adding newlines by passing ``newlines=False`` or +``True`` to the tag (or ``HTML`` instance) at creation time: +>>> l = h.ol(newlines=False) +>>> l.li('item 1') +>>> l.li('item 2') +>>> print h +
  1. item 1
  2. item 2
+Since we can't use ``class`` as a keyword, the library recognises ``klass`` +as a substitute: +>>> print h.p(content, klass="styled") +

content

+ +%package -n python3-html +Summary: simple, elegant HTML, XHTML and XML generation +Provides: python-html +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-html +To construct HTML start with an instance of ``html.HTML()``. Add +tags by accessing the tag's attribute on that object. For example: +>>> from html import HTML +>>> h = HTML() +>>> h.p('Hello, world!') +>>> print h # or print(h) in python 3+ +

Hello, world!

+You may supply a tag name and some text contents when creating a HTML +instance: +>>> h = HTML('html', 'text') +>>> print h +text +You may also append text content later using the tag's ``.text()`` method +or using augmented addition ``+=``. Any HTML-specific characters (``<>&"``) +in the text will be escaped for HTML safety as appropriate unless +``escape=False`` is passed. Each of the following examples uses a new +``HTML`` instance: +>>> p = h.p('hello world!\n') +>>> p.br +>>> p.text('more → text', escape=False) +>>> p += ' ... augmented' +>>> h.p +>>> print h +

hello, world!
more → text ... augmented

+

+Note also that the top-level ``HTML`` object adds newlines between tags by +default. Finally in the above you'll see an empty paragraph tag - tags with +no contents get no closing tag. +If the tag should have sub-tags you have two options. You may either add +the sub-tags directly on the tag: +>>> l = h.ol +>>> l.li('item 1') +>>> l.li.b('item 2 > 1') +>>> print h +

    +
  1. item 1
  2. +
  3. item 2 > 1
  4. +
+Note that the default behavior with lists (and tables) is to add newlines +between sub-tags to generate a nicer output. You can also see in that +example the chaining of tags in ``l.li.b``. +Tag attributes may be passed in as well: +>>> t = h.table(border='1') +>>> for i in range(2): +>>> r = t.tr +>>> r.td('column 1') +>>> r.td('column 2') +>>> print t + + + +
column 1column 2
column 1column 2
+A variation on the above is to use a tag as a context variable. The +following is functionally identical to the first list construction but +with a slightly different sytax emphasising the HTML structure: +>>> with h.ol as l: +You may turn off/on adding newlines by passing ``newlines=False`` or +``True`` to the tag (or ``HTML`` instance) at creation time: +>>> l = h.ol(newlines=False) +>>> l.li('item 1') +>>> l.li('item 2') +>>> print h +
  1. item 1
  2. item 2
+Since we can't use ``class`` as a keyword, the library recognises ``klass`` +as a substitute: +>>> print h.p(content, klass="styled") +

content

+ +%package help +Summary: Development documents and examples for html +Provides: python3-html-doc +%description help +To construct HTML start with an instance of ``html.HTML()``. Add +tags by accessing the tag's attribute on that object. For example: +>>> from html import HTML +>>> h = HTML() +>>> h.p('Hello, world!') +>>> print h # or print(h) in python 3+ +

Hello, world!

+You may supply a tag name and some text contents when creating a HTML +instance: +>>> h = HTML('html', 'text') +>>> print h +text +You may also append text content later using the tag's ``.text()`` method +or using augmented addition ``+=``. Any HTML-specific characters (``<>&"``) +in the text will be escaped for HTML safety as appropriate unless +``escape=False`` is passed. Each of the following examples uses a new +``HTML`` instance: +>>> p = h.p('hello world!\n') +>>> p.br +>>> p.text('more → text', escape=False) +>>> p += ' ... augmented' +>>> h.p +>>> print h +

hello, world!
more → text ... augmented

+

+Note also that the top-level ``HTML`` object adds newlines between tags by +default. Finally in the above you'll see an empty paragraph tag - tags with +no contents get no closing tag. +If the tag should have sub-tags you have two options. You may either add +the sub-tags directly on the tag: +>>> l = h.ol +>>> l.li('item 1') +>>> l.li.b('item 2 > 1') +>>> print h +

    +
  1. item 1
  2. +
  3. item 2 > 1
  4. +
+Note that the default behavior with lists (and tables) is to add newlines +between sub-tags to generate a nicer output. You can also see in that +example the chaining of tags in ``l.li.b``. +Tag attributes may be passed in as well: +>>> t = h.table(border='1') +>>> for i in range(2): +>>> r = t.tr +>>> r.td('column 1') +>>> r.td('column 2') +>>> print t + + + +
column 1column 2
column 1column 2
+A variation on the above is to use a tag as a context variable. The +following is functionally identical to the first list construction but +with a slightly different sytax emphasising the HTML structure: +>>> with h.ol as l: +You may turn off/on adding newlines by passing ``newlines=False`` or +``True`` to the tag (or ``HTML`` instance) at creation time: +>>> l = h.ol(newlines=False) +>>> l.li('item 1') +>>> l.li('item 2') +>>> print h +
  1. item 1
  2. item 2
+Since we can't use ``class`` as a keyword, the library recognises ``klass`` +as a substitute: +>>> print h.p(content, klass="styled") +

content

+ +%prep +%autosetup -n html-1.16 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-html -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot - 1.16-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..48f5acd --- /dev/null +++ b/sources @@ -0,0 +1 @@ +39b9db7cdcc84607828be021172d441f html-1.16.tar.gz -- cgit v1.2.3