diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-20 03:44:28 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-20 03:44:28 +0000 |
commit | 75d2e923c68a9b7091f4389cdc39f5566ae8bf8b (patch) | |
tree | df051c2a2f457f1720964b41215f0809c0e044bd | |
parent | 8d65d1099f097b7fdfe0aa0ce1aca298da219250 (diff) |
automatic import of python-docwriteropeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-docwriter.spec | 448 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 450 insertions, 0 deletions
@@ -0,0 +1 @@ +/docwriter-1.3.2.tar.gz diff --git a/python-docwriter.spec b/python-docwriter.spec new file mode 100644 index 0000000..8ecbbf3 --- /dev/null +++ b/python-docwriter.spec @@ -0,0 +1,448 @@ +%global _empty_manifest_terminate_build 0 +Name: python-docwriter +Version: 1.3.2 +Release: 1 +Summary: API reference documentation generator for FreeType. +License: FreeType License +URL: https://gitlab.freedesktop.org/freetype/docwriter +Source0: https://mirrors.aliyun.com/pypi/web/packages/b3/74/c54e53b448e23b539b9a460b364259503bca186fc453e0b04b098c9cb01c/docwriter-1.3.2.tar.gz +BuildArch: noarch + +Requires: python3-mistune +Requires: python3-mkdocs +Requires: python3-mkdocs-material +Requires: python3-PyYAML + +%description +[](https://gitlab.freedesktop.org/freetype/docwriter/-/commits/master) +[](https://pypi.org/project/docwriter/) + +# FreeType Docwriter + +Docwriter is an API documentation generator for the FreeType Library that extracts and builds +Markdown docs from the FreeType header files. + +## Installation + +Run `pip install docwriter` (see (4) below for an automated `virtualenv` usage). It requires +Python >= 3.5 to run. + +## Steps to Generate Docs +1. Ensure `docwriter` is installed using `pip`. + +2. Clone the freetype repository from + [here](https://gitlab.freedesktop.org/freetype/freetype.git). + +3. The FreeType build system can be used to generate the docs: + + ```bash + sh autogen.sh + ./configure + make refdoc + ``` + +4. Alternatively, step 1 and the make target can be replaced with `make refdoc-venv`. This installs + all requirements automatically in a separate virtual environment. More information on + `virtualenv` usage can be found + [here](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/docs/README). + +## Development Usage +1. Clone this repository. +2. Clone the freetype repository from + [here](https://gitlab.freedesktop.org/freetype/freetype.git). +3. Run `pip install -r requirements.txt` in your environment (`virtualenv` recommended). +4. Copy the `include/` directory from `freetype` to `docwriter`. +5. Run in the `docwriter` directory: + + ```bash + python -m docwriter \ + --prefix=ft2 \ + --title=FreeType-2.9.1 \ + --site=reference \ + --output=./docs \ + ./include/freetype/*.h \ + ./include/freetype/config/*.h \ + ./include/freetype/cache/*.h + ``` +6. The markdown files are generated in `docs/markdown/`. Static site can be built by running + `mkdocs build` in `docs/`. Read more about Mkdocs + [here](https://www.mkdocs.org/getting-started/#building-the-site). + +## Usage Information + +``` +docwriter [-h] [-t T] -o DIR [-p PRE] [-s DIR] [-q | -v] files [files ...] + +DocWriter Usage information + +positional arguments: + files list of source files to parse, wildcards are allowed + +optional arguments: + -h, --help show this help message and exit + -t T, --title T set project title, as in '-t "My Project"' + -o DIR, --output DIR set output directory, as in '-o mydir' + -p PRE, --prefix PRE set documentation prefix, as in '-p ft2' + -s DIR, --site DIR set 'site_dir' in mkdocs.yml [default=site] + -q, --quiet run quietly, show only errors + -v, --verbose increase output verbosity +``` + +## Running Tests + +To test on all supported Python versions: + +1. Make sure `tox` is installed: + ```bash + pip install tox + ``` + +2. Ensure that all Python versions that you need to run the tests on are installed. + +3. Run tests: + ```bash + tox + ``` + +To run specifc tests, use the `-e` argument. For example, + +```bash +tox -e py37,py38 +``` + +will run tests only on Python 3.7 and 3.8 (assuming they are installed). See [tox.ini](tox.ini) for +all available environments. + +More information on running specific tox environments can be found +[here](https://tox.readthedocs.io/en/latest/example/general.html#selecting-one-or-more-environments-to-run-tests-against). + +### Regression Tests + +Regression tests require internet access, `git`, and other FreeType [build +dependencies](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/README.git), and are +time-consuming. These tests are largely meant to run on Gitlab CI, but can also be run locally: + +```bash +tox -e regression +``` + +## License + +This library is licensed under the [FreeType License](https://www.freetype.org/license.html). + +## History + +This library was originally written by David Turner as `docmaker` which collected and presented +documentation in HTML. It has since been modified multiple times, including a major refactor to +allow multiple output formats. The current `docwriter` is the biggest rewrite, with lots of changes +and additions that allow it to be more flexible, readable, maintainable and usable. + + + + +%package -n python3-docwriter +Summary: API reference documentation generator for FreeType. +Provides: python-docwriter +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-docwriter +[](https://gitlab.freedesktop.org/freetype/docwriter/-/commits/master) +[](https://pypi.org/project/docwriter/) + +# FreeType Docwriter + +Docwriter is an API documentation generator for the FreeType Library that extracts and builds +Markdown docs from the FreeType header files. + +## Installation + +Run `pip install docwriter` (see (4) below for an automated `virtualenv` usage). It requires +Python >= 3.5 to run. + +## Steps to Generate Docs +1. Ensure `docwriter` is installed using `pip`. + +2. Clone the freetype repository from + [here](https://gitlab.freedesktop.org/freetype/freetype.git). + +3. The FreeType build system can be used to generate the docs: + + ```bash + sh autogen.sh + ./configure + make refdoc + ``` + +4. Alternatively, step 1 and the make target can be replaced with `make refdoc-venv`. This installs + all requirements automatically in a separate virtual environment. More information on + `virtualenv` usage can be found + [here](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/docs/README). + +## Development Usage +1. Clone this repository. +2. Clone the freetype repository from + [here](https://gitlab.freedesktop.org/freetype/freetype.git). +3. Run `pip install -r requirements.txt` in your environment (`virtualenv` recommended). +4. Copy the `include/` directory from `freetype` to `docwriter`. +5. Run in the `docwriter` directory: + + ```bash + python -m docwriter \ + --prefix=ft2 \ + --title=FreeType-2.9.1 \ + --site=reference \ + --output=./docs \ + ./include/freetype/*.h \ + ./include/freetype/config/*.h \ + ./include/freetype/cache/*.h + ``` +6. The markdown files are generated in `docs/markdown/`. Static site can be built by running + `mkdocs build` in `docs/`. Read more about Mkdocs + [here](https://www.mkdocs.org/getting-started/#building-the-site). + +## Usage Information + +``` +docwriter [-h] [-t T] -o DIR [-p PRE] [-s DIR] [-q | -v] files [files ...] + +DocWriter Usage information + +positional arguments: + files list of source files to parse, wildcards are allowed + +optional arguments: + -h, --help show this help message and exit + -t T, --title T set project title, as in '-t "My Project"' + -o DIR, --output DIR set output directory, as in '-o mydir' + -p PRE, --prefix PRE set documentation prefix, as in '-p ft2' + -s DIR, --site DIR set 'site_dir' in mkdocs.yml [default=site] + -q, --quiet run quietly, show only errors + -v, --verbose increase output verbosity +``` + +## Running Tests + +To test on all supported Python versions: + +1. Make sure `tox` is installed: + ```bash + pip install tox + ``` + +2. Ensure that all Python versions that you need to run the tests on are installed. + +3. Run tests: + ```bash + tox + ``` + +To run specifc tests, use the `-e` argument. For example, + +```bash +tox -e py37,py38 +``` + +will run tests only on Python 3.7 and 3.8 (assuming they are installed). See [tox.ini](tox.ini) for +all available environments. + +More information on running specific tox environments can be found +[here](https://tox.readthedocs.io/en/latest/example/general.html#selecting-one-or-more-environments-to-run-tests-against). + +### Regression Tests + +Regression tests require internet access, `git`, and other FreeType [build +dependencies](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/README.git), and are +time-consuming. These tests are largely meant to run on Gitlab CI, but can also be run locally: + +```bash +tox -e regression +``` + +## License + +This library is licensed under the [FreeType License](https://www.freetype.org/license.html). + +## History + +This library was originally written by David Turner as `docmaker` which collected and presented +documentation in HTML. It has since been modified multiple times, including a major refactor to +allow multiple output formats. The current `docwriter` is the biggest rewrite, with lots of changes +and additions that allow it to be more flexible, readable, maintainable and usable. + + + + +%package help +Summary: Development documents and examples for docwriter +Provides: python3-docwriter-doc +%description help +[](https://gitlab.freedesktop.org/freetype/docwriter/-/commits/master) +[](https://pypi.org/project/docwriter/) + +# FreeType Docwriter + +Docwriter is an API documentation generator for the FreeType Library that extracts and builds +Markdown docs from the FreeType header files. + +## Installation + +Run `pip install docwriter` (see (4) below for an automated `virtualenv` usage). It requires +Python >= 3.5 to run. + +## Steps to Generate Docs +1. Ensure `docwriter` is installed using `pip`. + +2. Clone the freetype repository from + [here](https://gitlab.freedesktop.org/freetype/freetype.git). + +3. The FreeType build system can be used to generate the docs: + + ```bash + sh autogen.sh + ./configure + make refdoc + ``` + +4. Alternatively, step 1 and the make target can be replaced with `make refdoc-venv`. This installs + all requirements automatically in a separate virtual environment. More information on + `virtualenv` usage can be found + [here](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/docs/README). + +## Development Usage +1. Clone this repository. +2. Clone the freetype repository from + [here](https://gitlab.freedesktop.org/freetype/freetype.git). +3. Run `pip install -r requirements.txt` in your environment (`virtualenv` recommended). +4. Copy the `include/` directory from `freetype` to `docwriter`. +5. Run in the `docwriter` directory: + + ```bash + python -m docwriter \ + --prefix=ft2 \ + --title=FreeType-2.9.1 \ + --site=reference \ + --output=./docs \ + ./include/freetype/*.h \ + ./include/freetype/config/*.h \ + ./include/freetype/cache/*.h + ``` +6. The markdown files are generated in `docs/markdown/`. Static site can be built by running + `mkdocs build` in `docs/`. Read more about Mkdocs + [here](https://www.mkdocs.org/getting-started/#building-the-site). + +## Usage Information + +``` +docwriter [-h] [-t T] -o DIR [-p PRE] [-s DIR] [-q | -v] files [files ...] + +DocWriter Usage information + +positional arguments: + files list of source files to parse, wildcards are allowed + +optional arguments: + -h, --help show this help message and exit + -t T, --title T set project title, as in '-t "My Project"' + -o DIR, --output DIR set output directory, as in '-o mydir' + -p PRE, --prefix PRE set documentation prefix, as in '-p ft2' + -s DIR, --site DIR set 'site_dir' in mkdocs.yml [default=site] + -q, --quiet run quietly, show only errors + -v, --verbose increase output verbosity +``` + +## Running Tests + +To test on all supported Python versions: + +1. Make sure `tox` is installed: + ```bash + pip install tox + ``` + +2. Ensure that all Python versions that you need to run the tests on are installed. + +3. Run tests: + ```bash + tox + ``` + +To run specifc tests, use the `-e` argument. For example, + +```bash +tox -e py37,py38 +``` + +will run tests only on Python 3.7 and 3.8 (assuming they are installed). See [tox.ini](tox.ini) for +all available environments. + +More information on running specific tox environments can be found +[here](https://tox.readthedocs.io/en/latest/example/general.html#selecting-one-or-more-environments-to-run-tests-against). + +### Regression Tests + +Regression tests require internet access, `git`, and other FreeType [build +dependencies](https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/README.git), and are +time-consuming. These tests are largely meant to run on Gitlab CI, but can also be run locally: + +```bash +tox -e regression +``` + +## License + +This library is licensed under the [FreeType License](https://www.freetype.org/license.html). + +## History + +This library was originally written by David Turner as `docmaker` which collected and presented +documentation in HTML. It has since been modified multiple times, including a major refactor to +allow multiple output formats. The current `docwriter` is the biggest rewrite, with lots of changes +and additions that allow it to be more flexible, readable, maintainable and usable. + + + + +%prep +%autosetup -n docwriter-1.3.2 + +%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-docwriter -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 1.3.2-1 +- Package Spec generated @@ -0,0 +1 @@ +06d1ac2289efdd62d75d1094c797d077 docwriter-1.3.2.tar.gz |