diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-12 05:11:11 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-12 05:11:11 +0000 |
| commit | 0d172f1c4b12582c79871b2b93df3c9b44082801 (patch) | |
| tree | b338e2de4b6da6e3d4e97d1c55e57579e67881be /python-uharfbuzz.spec | |
| parent | 1633e7e93de4f7f22e74419938dc0918204026b5 (diff) | |
automatic import of python-uharfbuzz
Diffstat (limited to 'python-uharfbuzz.spec')
| -rw-r--r-- | python-uharfbuzz.spec | 251 |
1 files changed, 251 insertions, 0 deletions
diff --git a/python-uharfbuzz.spec b/python-uharfbuzz.spec new file mode 100644 index 0000000..e3a8040 --- /dev/null +++ b/python-uharfbuzz.spec @@ -0,0 +1,251 @@ +%global _empty_manifest_terminate_build 0 +Name: python-uharfbuzz +Version: 0.35.0 +Release: 1 +Summary: Streamlined Cython bindings for the harfbuzz shaping engine +License: Apache License 2.0 +URL: https://github.com/trufont/uharfbuzz +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ad/f0/0b9203f0b239df7ae0028aa33f443d9f08888e2af119faf0f9559b752b13/uharfbuzz-0.35.0.zip + + +%description +[](https://github.com/harfbuzz/uharfbuzz/actions?query=workflow%3A%22Build+%2B+Deploy%22) +[](https://pypi.org/project/uharfbuzz) + +## uharfbuzz + +Streamlined Cython bindings for the [HarfBuzz][hb] shaping engine. + + +### Example + +```python +import sys + +import uharfbuzz as hb + + +fontfile = sys.argv[1] +text = sys.argv[2] + +blob = hb.Blob.from_file_path(fontfile) +face = hb.Face(blob) +font = hb.Font(face) + +buf = hb.Buffer() +buf.add_str(text) +buf.guess_segment_properties() + +features = {"kern": True, "liga": True} +hb.shape(font, buf, features) + +infos = buf.glyph_infos +positions = buf.glyph_positions + +for info, pos in zip(infos, positions): + gid = info.codepoint + cluster = info.cluster + x_advance = pos.x_advance + x_offset = pos.x_offset + y_offset = pos.y_offset + print(f"gid{gid}={cluster}@{x_advance},{y_offset}+{x_advance}") +``` + + +### How to make a release + +Use `git tag -a` to make a new annotated tag, or `git tag -s` for a GPG-signed annotated tag, if you prefer. + +Name the new tag with with a leading ‘v’ followed by three MAJOR.MINOR.PATCH digits, like in semantic versioning. Look at the existing tags for examples. + +In the tag message write some short release notes describing the changes since the previous tag. The subject line will be the release name and the message body will be the release notes. + +Finally, push the tag to the remote repository (e.g. assuming upstream is called origin): + + $ git push origin v0.4.3 + +This will trigger the CI to build the distribution packages and upload them to the Python Package Index automatically, if all the tests pass successfully. The CI will also automatically create a new Github Release and use the content of the annotated git tag for the release notes. + + +[hb]: https://github.com/harfbuzz/harfbuzz + + +%package -n python3-uharfbuzz +Summary: Streamlined Cython bindings for the harfbuzz shaping engine +Provides: python-uharfbuzz +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-cffi +BuildRequires: gcc +BuildRequires: gdb +%description -n python3-uharfbuzz +[](https://github.com/harfbuzz/uharfbuzz/actions?query=workflow%3A%22Build+%2B+Deploy%22) +[](https://pypi.org/project/uharfbuzz) + +## uharfbuzz + +Streamlined Cython bindings for the [HarfBuzz][hb] shaping engine. + + +### Example + +```python +import sys + +import uharfbuzz as hb + + +fontfile = sys.argv[1] +text = sys.argv[2] + +blob = hb.Blob.from_file_path(fontfile) +face = hb.Face(blob) +font = hb.Font(face) + +buf = hb.Buffer() +buf.add_str(text) +buf.guess_segment_properties() + +features = {"kern": True, "liga": True} +hb.shape(font, buf, features) + +infos = buf.glyph_infos +positions = buf.glyph_positions + +for info, pos in zip(infos, positions): + gid = info.codepoint + cluster = info.cluster + x_advance = pos.x_advance + x_offset = pos.x_offset + y_offset = pos.y_offset + print(f"gid{gid}={cluster}@{x_advance},{y_offset}+{x_advance}") +``` + + +### How to make a release + +Use `git tag -a` to make a new annotated tag, or `git tag -s` for a GPG-signed annotated tag, if you prefer. + +Name the new tag with with a leading ‘v’ followed by three MAJOR.MINOR.PATCH digits, like in semantic versioning. Look at the existing tags for examples. + +In the tag message write some short release notes describing the changes since the previous tag. The subject line will be the release name and the message body will be the release notes. + +Finally, push the tag to the remote repository (e.g. assuming upstream is called origin): + + $ git push origin v0.4.3 + +This will trigger the CI to build the distribution packages and upload them to the Python Package Index automatically, if all the tests pass successfully. The CI will also automatically create a new Github Release and use the content of the annotated git tag for the release notes. + + +[hb]: https://github.com/harfbuzz/harfbuzz + + +%package help +Summary: Development documents and examples for uharfbuzz +Provides: python3-uharfbuzz-doc +%description help +[](https://github.com/harfbuzz/uharfbuzz/actions?query=workflow%3A%22Build+%2B+Deploy%22) +[](https://pypi.org/project/uharfbuzz) + +## uharfbuzz + +Streamlined Cython bindings for the [HarfBuzz][hb] shaping engine. + + +### Example + +```python +import sys + +import uharfbuzz as hb + + +fontfile = sys.argv[1] +text = sys.argv[2] + +blob = hb.Blob.from_file_path(fontfile) +face = hb.Face(blob) +font = hb.Font(face) + +buf = hb.Buffer() +buf.add_str(text) +buf.guess_segment_properties() + +features = {"kern": True, "liga": True} +hb.shape(font, buf, features) + +infos = buf.glyph_infos +positions = buf.glyph_positions + +for info, pos in zip(infos, positions): + gid = info.codepoint + cluster = info.cluster + x_advance = pos.x_advance + x_offset = pos.x_offset + y_offset = pos.y_offset + print(f"gid{gid}={cluster}@{x_advance},{y_offset}+{x_advance}") +``` + + +### How to make a release + +Use `git tag -a` to make a new annotated tag, or `git tag -s` for a GPG-signed annotated tag, if you prefer. + +Name the new tag with with a leading ‘v’ followed by three MAJOR.MINOR.PATCH digits, like in semantic versioning. Look at the existing tags for examples. + +In the tag message write some short release notes describing the changes since the previous tag. The subject line will be the release name and the message body will be the release notes. + +Finally, push the tag to the remote repository (e.g. assuming upstream is called origin): + + $ git push origin v0.4.3 + +This will trigger the CI to build the distribution packages and upload them to the Python Package Index automatically, if all the tests pass successfully. The CI will also automatically create a new Github Release and use the content of the annotated git tag for the release notes. + + +[hb]: https://github.com/harfbuzz/harfbuzz + + +%prep +%autosetup -n uharfbuzz-0.35.0 + +%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-uharfbuzz -f filelist.lst +%dir %{python3_sitearch}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed Apr 12 2023 Python_Bot <Python_Bot@openeuler.org> - 0.35.0-1 +- Package Spec generated |
