]> git.pld-linux.org Git - packages/python-fontParts.git/blob - python-fontParts.spec
- temporarily(?) use hashed paths
[packages/python-fontParts.git] / python-fontParts.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_with     python3 # CPython 3.x module (built from python3-fontParts.spec)
6
7 Summary:        Set of objects for performing math operations on font data
8 Summary(pl.UTF-8):      Zbiór obiektów do wykonywania operacji matematycznych na danych fontów
9 Name:           python-fontParts
10 # keep 0.8.x for python2 support
11 Version:        0.8.9
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/fontparts/
16 #Source0:       https://files.pythonhosted.org/packages/source/f/fontparts/fontParts-%{version}.zip
17 Source0:        https://files.pythonhosted.org/packages/5f/d2/4afe54075ba11b3bcd7803f21b0c265992ceb572ca94725272cd3a30cd35/fontParts-%{version}.zip
18 # Source0-md5:  e6b517961d4da511e2ebe49fab763126
19 URL:            https://pypi.org/project/fontparts/
20 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
21 BuildRequires:  glibc-localedb-all
22 %endif
23 %if %{with python2}
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-setuptools
26 BuildRequires:  python-setuptools_scm
27 %if %{with tests}
28 BuildRequires:  python-booleanOperations
29 # defcon[pens]
30 BuildRequires:  python-defcon >= 0.6.0
31 BuildRequires:  python-enum34 >= 1.1.6
32 BuildRequires:  python-fontMath >= 0.4.8
33 BuildRequires:  python-fontPens >= 0.1.0
34 # FontTools[ufo,lxml,unicode] >= 3.32.0
35 BuildRequires:  python-fonttools >= 3.32.0
36 BuildRequires:  python-fs >= 2.2.0
37 BuildRequires:  python-lxml >= 4.0
38 BuildRequires:  python-unittest2 >= 1.1.0
39 %endif
40 %endif
41 %if %{with python3}
42 BuildRequires:  python3-modules >= 1:3.6
43 BuildRequires:  python3-setuptools
44 BuildRequires:  python3-setuptools_scm
45 %if %{with tests}
46 BuildRequires:  python3-booleanOperations
47 BuildRequires:  python3-fontMath >= 0.4.8
48 BuildRequires:  python3-fontPens >= 0.1.0
49 BuildRequires:  python3-fonttools >= 3.32.0
50 BuildRequires:  python3-fs >= 2.2.0
51 BuildRequires:  python3-lxml >= 4.0
52 BuildRequires:  python3-unittest2 >= 1.1.0
53 %endif
54 %endif
55 BuildRequires:  rpm-pythonprov
56 BuildRequires:  rpmbuild(macros) >= 1.714
57 BuildRequires:  unzip
58 # missing in setup
59 Requires:       python-booleanOperations
60 Requires:       python-modules >= 1:2.7
61 BuildArch:      noarch
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %description
65 A collection of objects that implement fast font, glyph, etc. math.
66
67 %description -l pl.UTF-8
68 Zbiór obiektów implementujących szybkie operacje matematyczne na
69 fontach, glifach itp.
70
71 %package -n python3-fontParts
72 Summary:        Set of objects for performing math operations on font data
73 Summary(pl.UTF-8):      Zbiór obiektów do wykonywania operacji matematycznych na danych fontów
74 Group:          Libraries/Python
75 # missing in setup
76 Requires:       python3-booleanOperations
77 Requires:       python3-modules >= 1:3.6
78
79 %description -n python3-fontParts
80 A collection of objects that implement fast font, glyph, etc. math.
81
82 %description -n python3-fontParts -l pl.UTF-8
83 Zbiór obiektów implementujących szybkie operacje matematyczne na
84 fontach, glifach itp.
85
86 %prep
87 %setup -q -n fontParts-%{version}
88
89 %build
90 export LC_ALL=C.UTF-8
91
92 %if %{with python2}
93 %py_build
94
95 %if %{with tests}
96 PYTHONPATH=$(pwd)/Lib \
97 %{__python} Lib/fontParts/fontshell/test.py
98 %endif
99 %endif
100
101 %if %{with python3}
102 %py3_build
103
104 %if %{with tests}
105 PYTHONPATH=$(pwd)/Lib \
106 %{__python3} Lib/fontParts/fontshell/test.py
107 %endif
108 %endif
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112
113 export LC_ALL=C.UTF-8
114
115 %if %{with python2}
116 %py_install
117
118 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/fontParts/test
119 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/fontParts/fontshell/test.py*
120 %py_postclean
121 %endif
122
123 %if %{with python3}
124 %py3_install
125
126 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/fontParts/test
127 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/fontParts/fontshell/test.py*
128 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/fontParts/fontshell/__pycache__/test.*.py*
129 %endif
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %if %{with python2}
135 %files
136 %defattr(644,root,root,755)
137 %doc LICENSE README.rst
138 %{py_sitescriptdir}/fontParts
139 %{py_sitescriptdir}/fontParts-%{version}-py*.egg-info
140 %endif
141
142 %if %{with python3}
143 %files -n python3-fontParts
144 %defattr(644,root,root,755)
145 %doc LICENSE README.rst
146 %{py3_sitescriptdir}/fontParts
147 %{py3_sitescriptdir}/fontParts-%{version}-py*.egg-info
148 %endif
This page took 0.073639 seconds and 3 git commands to generate.