summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-03-09 17:09:02 +0000
committerCoprDistGit <infra@openeuler.org>2023-03-09 17:09:02 +0000
commit263bd9e3304f23a47d4506113bdf80e60df4df89 (patch)
treec6db189eeca67e65db95eab4628bae9604eee3eb
parenta9987937599c2cad44d1287875596722712442d1 (diff)
automatic import of python-sphinxtesters
-rw-r--r--.gitignore1
-rw-r--r--python-sphinxtesters.spec465
-rw-r--r--sources1
3 files changed, 467 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..1a04086 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/sphinxtesters-0.2.3.tar.gz
diff --git a/python-sphinxtesters.spec b/python-sphinxtesters.spec
new file mode 100644
index 0000000..7ab88bf
--- /dev/null
+++ b/python-sphinxtesters.spec
@@ -0,0 +1,465 @@
+%global _empty_manifest_terminate_build 0
+Name: python-sphinxtesters
+Version: 0.2.3
+Release: 1
+Summary: Utilities for testing Sphinx extensions
+License: BSD license
+URL: http://github.com/matthew-brett/sphinxtesters
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/23/35/1c4d8d18ab8585063c65d8aa5abcc3ca2a68b852a473fa98d773f9e43c8e/sphinxtesters-0.2.3.tar.gz
+BuildArch: noarch
+
+
+%description
+#######################################################
+Sphinxtesters - utilities for testing Sphinx extensions
+#######################################################
+
+.. shared-text-body
+
+**********
+Quickstart
+**********
+
+If you have a directory containing a sphinx project, test that it builds with
+something like:
+
+.. code:: python
+
+ class TestMyProject(SourcesBuilder):
+
+ page_source_template = 'path/to/sphinx_dir'
+
+ def test_basic_build(self):
+ # Get doctree for page "a_page.rst"
+ doctree = self.get_doctree('a_page')
+ # Assert stuff about doctree version of page
+ html = self.get_built_file('a_page.html')
+ # Assert stuff about html version of page
+
+You can try adding other page content by using the ``rst_sources`` dictionary:
+
+.. code:: python
+
+ class TestChangedProject(SourcesBuilder):
+
+ page_source_template = 'path/to/sphinx_dir'
+ rst_sources = {'a_page': """Replacement text for page""",
+ 'b_page': """An entirely new page"""}
+
+ def test_basic_build(self):
+ a_doctree = self.get_doctree('a_page')
+ b_doctree = self.get_doctree('b_page')
+ # Your tests for the new page content here
+
+Set the text of the ``conf.py`` file with the ``conf_source`` attribute:
+
+.. code:: python
+
+ class TestConfeddProject(SourcesBuilder):
+
+ page_source_template = 'path/to/sphinx_dir'
+ rst_sources = {'a_page': """Replacement text for page""",
+ 'b_page': """An entirely new page"""}
+ conf_source = """ # This overwrites existing conf.py """
+
+ def test_basic_build(self):
+ a_doctree = self.get_doctree('a_page')
+ b_doctree = self.get_doctree('b_page')
+ # Your tests for the new page content here
+
+You don't need to set ``page_source_template``; if you don't, you start with a
+fresh project, where the only pages are the ones you specify in
+``rst_sources``.
+
+.. code:: python
+
+ class TestFreshProject(SourcesBuilder):
+
+ rst_sources = {'a_page': """A new page""",
+ 'b_page': """Another new page"""}
+ conf_source = """ # Stuff for the conf.py file """
+
+ def test_basic_build(self):
+ a_doctree = self.get_doctree('a_page')
+ b_doctree = self.get_doctree('b_page')
+ # Your tests for the new page content here
+
+See the tests for examples of using Sphinxtesters for testing builds of Sphinx
+projects.
+
+************
+Installation
+************
+
+::
+
+ pip install sphinxtesters
+
+****
+Code
+****
+
+See https://github.com/matthew-brett/sphinxtesters
+
+Released under the BSD two-clause license - see the file ``LICENSE`` in the
+source distribution.
+
+`travis-ci <https://travis-ci.org/matthew-brett/sphinxtesters>`_ kindly tests the
+code automatically under Python versions 2.7, and 3.3 through 3.6.
+
+The latest released version is at https://pypi.python.org/pypi/sphinxtesters
+
+*****
+Tests
+*****
+
+* Install ``sphinxtesters``
+* Install the pytest_ testing framework::
+
+ pip install pytest
+
+* Run the tests with::
+
+ pytest sphinxtesters
+
+*******
+Support
+*******
+
+Please put up issues on the `sphinxtesters issue tracker`_.
+
+.. standalone-references
+
+.. |sphinxtesters-documentation| replace:: `sphinxtesters documentation`_
+.. _sphinxtesters documentation:
+ https://matthew-brett.github.com/sphinxtesters/sphinxtesters.html
+.. _documentation: https://matthew-brett.github.com/sphinxtesters
+.. _pandoc: http://pandoc.org
+.. _jupyter: jupyter.org
+.. _homebrew: brew.sh
+.. _sphinx: http://sphinx-doc.org
+.. _rest: http://docutils.sourceforge.net/rst.html
+.. _sphinxtesters issue tracker: https://github.com/matthew-brett/sphinxtesters/issues
+.. _pytest: https://pytest.org
+.. _mock: https://github.com/testing-cabal/mock
+
+%package -n python3-sphinxtesters
+Summary: Utilities for testing Sphinx extensions
+Provides: python-sphinxtesters
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-sphinxtesters
+#######################################################
+Sphinxtesters - utilities for testing Sphinx extensions
+#######################################################
+
+.. shared-text-body
+
+**********
+Quickstart
+**********
+
+If you have a directory containing a sphinx project, test that it builds with
+something like:
+
+.. code:: python
+
+ class TestMyProject(SourcesBuilder):
+
+ page_source_template = 'path/to/sphinx_dir'
+
+ def test_basic_build(self):
+ # Get doctree for page "a_page.rst"
+ doctree = self.get_doctree('a_page')
+ # Assert stuff about doctree version of page
+ html = self.get_built_file('a_page.html')
+ # Assert stuff about html version of page
+
+You can try adding other page content by using the ``rst_sources`` dictionary:
+
+.. code:: python
+
+ class TestChangedProject(SourcesBuilder):
+
+ page_source_template = 'path/to/sphinx_dir'
+ rst_sources = {'a_page': """Replacement text for page""",
+ 'b_page': """An entirely new page"""}
+
+ def test_basic_build(self):
+ a_doctree = self.get_doctree('a_page')
+ b_doctree = self.get_doctree('b_page')
+ # Your tests for the new page content here
+
+Set the text of the ``conf.py`` file with the ``conf_source`` attribute:
+
+.. code:: python
+
+ class TestConfeddProject(SourcesBuilder):
+
+ page_source_template = 'path/to/sphinx_dir'
+ rst_sources = {'a_page': """Replacement text for page""",
+ 'b_page': """An entirely new page"""}
+ conf_source = """ # This overwrites existing conf.py """
+
+ def test_basic_build(self):
+ a_doctree = self.get_doctree('a_page')
+ b_doctree = self.get_doctree('b_page')
+ # Your tests for the new page content here
+
+You don't need to set ``page_source_template``; if you don't, you start with a
+fresh project, where the only pages are the ones you specify in
+``rst_sources``.
+
+.. code:: python
+
+ class TestFreshProject(SourcesBuilder):
+
+ rst_sources = {'a_page': """A new page""",
+ 'b_page': """Another new page"""}
+ conf_source = """ # Stuff for the conf.py file """
+
+ def test_basic_build(self):
+ a_doctree = self.get_doctree('a_page')
+ b_doctree = self.get_doctree('b_page')
+ # Your tests for the new page content here
+
+See the tests for examples of using Sphinxtesters for testing builds of Sphinx
+projects.
+
+************
+Installation
+************
+
+::
+
+ pip install sphinxtesters
+
+****
+Code
+****
+
+See https://github.com/matthew-brett/sphinxtesters
+
+Released under the BSD two-clause license - see the file ``LICENSE`` in the
+source distribution.
+
+`travis-ci <https://travis-ci.org/matthew-brett/sphinxtesters>`_ kindly tests the
+code automatically under Python versions 2.7, and 3.3 through 3.6.
+
+The latest released version is at https://pypi.python.org/pypi/sphinxtesters
+
+*****
+Tests
+*****
+
+* Install ``sphinxtesters``
+* Install the pytest_ testing framework::
+
+ pip install pytest
+
+* Run the tests with::
+
+ pytest sphinxtesters
+
+*******
+Support
+*******
+
+Please put up issues on the `sphinxtesters issue tracker`_.
+
+.. standalone-references
+
+.. |sphinxtesters-documentation| replace:: `sphinxtesters documentation`_
+.. _sphinxtesters documentation:
+ https://matthew-brett.github.com/sphinxtesters/sphinxtesters.html
+.. _documentation: https://matthew-brett.github.com/sphinxtesters
+.. _pandoc: http://pandoc.org
+.. _jupyter: jupyter.org
+.. _homebrew: brew.sh
+.. _sphinx: http://sphinx-doc.org
+.. _rest: http://docutils.sourceforge.net/rst.html
+.. _sphinxtesters issue tracker: https://github.com/matthew-brett/sphinxtesters/issues
+.. _pytest: https://pytest.org
+.. _mock: https://github.com/testing-cabal/mock
+
+%package help
+Summary: Development documents and examples for sphinxtesters
+Provides: python3-sphinxtesters-doc
+%description help
+#######################################################
+Sphinxtesters - utilities for testing Sphinx extensions
+#######################################################
+
+.. shared-text-body
+
+**********
+Quickstart
+**********
+
+If you have a directory containing a sphinx project, test that it builds with
+something like:
+
+.. code:: python
+
+ class TestMyProject(SourcesBuilder):
+
+ page_source_template = 'path/to/sphinx_dir'
+
+ def test_basic_build(self):
+ # Get doctree for page "a_page.rst"
+ doctree = self.get_doctree('a_page')
+ # Assert stuff about doctree version of page
+ html = self.get_built_file('a_page.html')
+ # Assert stuff about html version of page
+
+You can try adding other page content by using the ``rst_sources`` dictionary:
+
+.. code:: python
+
+ class TestChangedProject(SourcesBuilder):
+
+ page_source_template = 'path/to/sphinx_dir'
+ rst_sources = {'a_page': """Replacement text for page""",
+ 'b_page': """An entirely new page"""}
+
+ def test_basic_build(self):
+ a_doctree = self.get_doctree('a_page')
+ b_doctree = self.get_doctree('b_page')
+ # Your tests for the new page content here
+
+Set the text of the ``conf.py`` file with the ``conf_source`` attribute:
+
+.. code:: python
+
+ class TestConfeddProject(SourcesBuilder):
+
+ page_source_template = 'path/to/sphinx_dir'
+ rst_sources = {'a_page': """Replacement text for page""",
+ 'b_page': """An entirely new page"""}
+ conf_source = """ # This overwrites existing conf.py """
+
+ def test_basic_build(self):
+ a_doctree = self.get_doctree('a_page')
+ b_doctree = self.get_doctree('b_page')
+ # Your tests for the new page content here
+
+You don't need to set ``page_source_template``; if you don't, you start with a
+fresh project, where the only pages are the ones you specify in
+``rst_sources``.
+
+.. code:: python
+
+ class TestFreshProject(SourcesBuilder):
+
+ rst_sources = {'a_page': """A new page""",
+ 'b_page': """Another new page"""}
+ conf_source = """ # Stuff for the conf.py file """
+
+ def test_basic_build(self):
+ a_doctree = self.get_doctree('a_page')
+ b_doctree = self.get_doctree('b_page')
+ # Your tests for the new page content here
+
+See the tests for examples of using Sphinxtesters for testing builds of Sphinx
+projects.
+
+************
+Installation
+************
+
+::
+
+ pip install sphinxtesters
+
+****
+Code
+****
+
+See https://github.com/matthew-brett/sphinxtesters
+
+Released under the BSD two-clause license - see the file ``LICENSE`` in the
+source distribution.
+
+`travis-ci <https://travis-ci.org/matthew-brett/sphinxtesters>`_ kindly tests the
+code automatically under Python versions 2.7, and 3.3 through 3.6.
+
+The latest released version is at https://pypi.python.org/pypi/sphinxtesters
+
+*****
+Tests
+*****
+
+* Install ``sphinxtesters``
+* Install the pytest_ testing framework::
+
+ pip install pytest
+
+* Run the tests with::
+
+ pytest sphinxtesters
+
+*******
+Support
+*******
+
+Please put up issues on the `sphinxtesters issue tracker`_.
+
+.. standalone-references
+
+.. |sphinxtesters-documentation| replace:: `sphinxtesters documentation`_
+.. _sphinxtesters documentation:
+ https://matthew-brett.github.com/sphinxtesters/sphinxtesters.html
+.. _documentation: https://matthew-brett.github.com/sphinxtesters
+.. _pandoc: http://pandoc.org
+.. _jupyter: jupyter.org
+.. _homebrew: brew.sh
+.. _sphinx: http://sphinx-doc.org
+.. _rest: http://docutils.sourceforge.net/rst.html
+.. _sphinxtesters issue tracker: https://github.com/matthew-brett/sphinxtesters/issues
+.. _pytest: https://pytest.org
+.. _mock: https://github.com/testing-cabal/mock
+
+%prep
+%autosetup -n sphinxtesters-0.2.3
+
+%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-sphinxtesters -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 0.2.3-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..86abde6
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+3df3720ba757d3d8270fed5aff622852 sphinxtesters-0.2.3.tar.gz