]> git.pld-linux.org Git - packages/python-cu2qu.git/blame - python-cu2qu.spec
rebuild with python 3.10
[packages/python-cu2qu.git] / python-cu2qu.spec
CommitLineData
b191917f
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Cubic-to-quadratic Bezier curve conversion
8Summary(pl.UTF-8): Konwersja krzywych Beziera stopnia trzeciego do drugiego
9Name: python-cu2qu
10Version: 1.6.7.post1
b8592914 11Release: 2
b191917f
JB
12License: Apache v2.0
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/cu2qu/
15Source0: https://files.pythonhosted.org/packages/source/c/cu2qu/cu2qu-%{version}.zip
16# Source0-md5: 6858c0b17180d009765006f0b81b73d3
17URL: https://pypi.org/project/cu2qu/
18%if %{with python2}
19BuildRequires: python-Cython
20BuildRequires: python-modules >= 1:2.5
21BuildRequires: python-setuptools
22BuildRequires: python-setuptools_scm
23%if %{with tests}
24BuildRequires: python-defcon >= 0.6.0
25# fonttools[ufo]
26BuildRequires: python-fonttools >= 3.32.0
27BuildRequires: python-fs >= 2.2
28BuildRequires: python-pytest >= 2.8
29%endif
30%endif
31%if %{with python3}
32BuildRequires: python3-Cython
33BuildRequires: python3-modules >= 1:3.2
34BuildRequires: python3-setuptools
35BuildRequires: python3-setuptools_scm
36%if %{with tests}
37BuildRequires: python3-defcon >= 0.6.0
38BuildRequires: python3-fonttools >= 3.32.0
39BuildRequires: python3-fs >= 2.2
40BuildRequires: python3-pytest >= 2.8
41%endif
42%endif
43BuildRequires: rpm-pythonprov
44BuildRequires: rpmbuild(macros) >= 1.714
45BuildRequires: unzip
46Requires: python-modules >= 1:2.5
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
50This library provides functions which take in UFO objects (Defcon
51Fonts or Robofab RFonts) and converts any cubic curves to quadratic.
52
53%description -l pl.UTF-8
54Ta biblioteka udostępnia funkcje przyjmujące obiekty UFO (Font z
55biblioteki Defcon albo RFont z Robofab) i konwertujące krzywe
56trzeciego stopnia do drugiego.
57
58%package -n python3-cu2qu
59Summary: Cubic-to-quadratic Bezier curve conversion
60Summary(pl.UTF-8): Konwersja krzywych Beziera stopnia trzeciego do drugiego
61Group: Libraries/Python
62Requires: python3-modules >= 1:3.2
63
64%description -n python3-cu2qu
65This library provides functions which take in UFO objects (Defcon
66Fonts or Robofab RFonts) and converts any cubic curves to quadratic.
67
68%description -n python3-cu2qu -l pl.UTF-8
69Ta biblioteka udostępnia funkcje przyjmujące obiekty UFO (Font z
70biblioteki Defcon albo RFont z Robofab) i konwertujące krzywe
71trzeciego stopnia do drugiego.
72
73%prep
74%setup -q -n cu2qu-%{version}
75
76%build
77%if %{with python2}
78%py_build \
79 --with-cython
80
81%if %{with tests}
82PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
83PYTHONPATH=$(pwd)/Lib \
84%{__python} -m pytest tests
85%endif
86%endif
87
88%if %{with python3}
89%py3_build \
90 --with-cython
91
92%if %{with tests}
93PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
94PYTHONPATH=$(pwd)/Lib \
95%{__python3} -m pytest tests
96%endif
97%endif
98
99%install
100rm -rf $RPM_BUILD_ROOT
101
102%if %{with python2}
103%py_install
104
105%{__mv} $RPM_BUILD_ROOT%{_bindir}/cu2qu{,-2}
106%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/cu2qu/*.c
107
108%py_postclean
109%endif
110
111%if %{with python3}
112%py3_install
113
114%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/cu2qu/*.c
115%endif
116
117%clean
118rm -rf $RPM_BUILD_ROOT
119
120%if %{with python2}
121%files
122%defattr(644,root,root,755)
123%doc README.rst
124%attr(755,root,root) %{_bindir}/cu2qu-2
125%dir %{py_sitedir}/cu2qu
126%attr(755,root,root) %{py_sitedir}/cu2qu/cu2qu.so
127%{py_sitedir}/cu2qu/*.py[co]
128%{py_sitedir}/cu2qu-%{version}-py*.egg-info
129%endif
130
131%if %{with python3}
132%files -n python3-cu2qu
133%defattr(644,root,root,755)
134%doc README.rst
135%attr(755,root,root) %{_bindir}/cu2qu
136%dir %{py3_sitedir}/cu2qu
137%attr(755,root,root) %{py3_sitedir}/cu2qu/cu2qu.cpython-*.so
138%{py3_sitedir}/cu2qu/*.py
139%{py3_sitedir}/cu2qu/__pycache__
140%{py3_sitedir}/cu2qu-%{version}-py*.egg-info
141%endif
This page took 0.112078 seconds and 4 git commands to generate.