]>
Commit | Line | Data |
---|---|---|
56841c08 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
4 | %bcond_without tests # unit tests | |
56841c08 JB |
5 | |
6 | Summary: Set of flexible objects for representing UFO data | |
7 | Summary(pl.UTF-8): Zbiór elastycznych obiektów reprezentujących dane UFO | |
238eada4 JB |
8 | Name: python3-defcon |
9 | Version: 0.9.0 | |
56841c08 JB |
10 | Release: 1 |
11 | License: MIT | |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/defcon/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/d/defcon/defcon-%{version}.zip | |
238eada4 | 15 | # Source0-md5: 7d725879cb9529b04e7f212d56b8f731 |
56841c08 | 16 | URL: https://pypi.org/project/defcon/ |
238eada4 | 17 | BuildRequires: python3-modules >= 1:3.6 |
d47ede33 | 18 | BuildRequires: python3-setuptools >= 1:42 |
238eada4 | 19 | BuildRequires: python3-setuptools_scm |
56841c08 | 20 | %if %{with tests} |
238eada4 | 21 | BuildRequires: python3-fonttools >= 4.10.0 |
56841c08 JB |
22 | BuildRequires: python3-fs >= 2.2.0 |
23 | BuildRequires: python3-pytest >= 3.0.3 | |
24 | %endif | |
56841c08 JB |
25 | BuildRequires: rpm-pythonprov |
26 | BuildRequires: rpmbuild(macros) >= 1.714 | |
27 | %if %{with doc} | |
238eada4 | 28 | BuildRequires: sphinx-pdg-3 |
56841c08 | 29 | %endif |
238eada4 JB |
30 | BuildRequires: unzip |
31 | Requires: python3-modules >= 1:3.6 | |
56841c08 JB |
32 | BuildArch: noarch |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | Defcon is a set of UFO based objects optimized for use in font editing | |
37 | applications. The objects are built to be lightweight, fast and | |
38 | flexible. The objects are very bare-bones and they are not meant to be | |
39 | end-all, be-all objects. Rather, they are meant to provide base | |
40 | functionality so that you can focus on your application's behavior, | |
41 | not object observing or maintaining cached data. Defcon implements | |
42 | UFO3 as described by the UFO font format | |
43 | <http://unifiedfontobject.org/>. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Defcon to zbiór opartych na UFO obiektów zoptymalizowanych do używania | |
47 | w aplikacjach modyfikujących fonty. Obiekty są zbudowane jako lekkie, | |
48 | szybkie i elastyczne. Są bardzo podstawowe, nie mają służyć do | |
49 | wszystkiego naraz. Mają raczej udostępniać podstawową funkcjonalność, | |
50 | dzięki czemu można skupić się na zachowaniu aplikacji, a nie | |
51 | obserwowaniu obiektów czy utrzymywaniu danych podręcznych. Defcon ma | |
52 | zaimplementowane UFO3, opisane w formacie fontów UFO: | |
53 | <http://unifiedfontobject.org/>. | |
54 | ||
56841c08 JB |
55 | %package apidocs |
56 | Summary: API documentation for Python defcon module | |
57 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona defcon | |
58 | Group: Documentation | |
59 | ||
60 | %description apidocs | |
61 | API documentation for Python defcon module. | |
62 | ||
63 | %description apidocs -l pl.UTF-8 | |
64 | Dokumentacja API modułu Pythona defcon. | |
65 | ||
66 | %prep | |
67 | %setup -q -n defcon-%{version} | |
68 | ||
69 | %build | |
56841c08 JB |
70 | %py3_build |
71 | ||
72 | %if %{with tests} | |
73 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
74 | %{__python3} -m pytest Lib/defcon | |
75 | %endif | |
56841c08 JB |
76 | |
77 | %if %{with doc} | |
78 | %{__make} -C documentation html \ | |
238eada4 | 79 | SPHINXBUILD=sphinx-build-3 |
56841c08 JB |
80 | %endif |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
56841c08 | 85 | %py3_install |
56841c08 JB |
86 | |
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
56841c08 JB |
90 | %files |
91 | %defattr(644,root,root,755) | |
92 | %doc License.txt README.rst | |
56841c08 JB |
93 | %{py3_sitescriptdir}/defcon |
94 | %{py3_sitescriptdir}/defcon-%{version}-py*.egg-info | |
56841c08 JB |
95 | |
96 | %if %{with doc} | |
97 | %files apidocs | |
98 | %defattr(644,root,root,755) | |
99 | %doc documentation/build/html/{_static,concepts,objects,*.html,*.js} | |
100 | %endif |