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