]> git.pld-linux.org Git - packages/python-pyclipper.git/blame - python-pyclipper.spec
rebuild with python 3.10
[packages/python-pyclipper.git] / python-pyclipper.spec
CommitLineData
d814dcb6
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: Cython wrapper for Clipper library
8Summary(pl.UTF-8): Cythonowe obudowanie biblioteki Clipper
9Name: python-pyclipper
10Version: 1.3.0.post2
0e7ac138 11Release: 2
d814dcb6
JB
12License: MIT
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/pyclipper/
15Source0: https://files.pythonhosted.org/packages/source/p/pyclipper/pyclipper-%{version}.tar.gz
16# Source0-md5: ac53748592d18d8c8b63b5bd65a2ab28
17Patch0: %{name}-tests.patch
18URL: https://pypi.org/project/pyclipper/
19BuildRequires: libstdc++-devel
20%if %{with python2}
21BuildRequires: python-Cython >= 0.28
22BuildRequires: python-devel >= 1:2.7
23BuildRequires: python-setuptools
24BuildRequires: python-setuptools_scm >= 1.11.1
25%if %{with tests}
26BuildRequires: python-pytest
27%endif
28%endif
29%if %{with python3}
30BuildRequires: python3-Cython >= 0.28
31BuildRequires: python3-devel >= 1:3.4
32BuildRequires: python3-setuptools
33BuildRequires: python3-setuptools_scm >= 1.11.1
34%if %{with tests}
35BuildRequires: python3-pytest
36%endif
37%endif
38BuildRequires: rpm-pythonprov
39BuildRequires: rpmbuild(macros) >= 1.714
40Requires: python-modules >= 1:2.7
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44Pyclipper is a Cython wrapper exposing public functions and classes of
45the C++ translation of the Angus Johnson's Clipper library.
46
47The Clipper library performs line & polygon clipping - intersection,
48union, difference & exclusive-or, and line & polygon offsetting. The
49library is based on Vatti's clipping algorithm.
50
51%description -l pl.UTF-8
52Pyclipper to cythonowe obudowanie udostępniające funkcje i klasy
53publiczne tłumaczenia C++ biblioteki Clipper Angusa Johnsona.
54
55Biblioteka Clipper wykonuje obcinanie linii i wielokątów (wyznaczanie
56części wspólnej, sumy, różnicy i różnicy symetrycznej) oraz
57obrysowywanie linii i wielokątów. Jest oparta na algorytmie obcinania
58Vattiego.
59
60%package -n python3-pyclipper
61Summary: Cython wrapper for Clipper library
62Summary(pl.UTF-8): Cythonowe obudowanie biblioteki Clipper
63Group: Libraries/Python
64Requires: python3-modules >= 1:3.4
65
66%description -n python3-pyclipper
67Pyclipper is a Cython wrapper exposing public functions and classes of
68the C++ translation of the Angus Johnson's Clipper library.
69
70%description -n python3-pyclipper -l pl.UTF-8
71Pyclipper to cythonowe obudowanie udostępniające funkcje i klasy
72publiczne tłumaczenia C++ biblioteki Clipper Angusa Johnsona.
73
74Biblioteka Clipper wykonuje obcinanie linii i wielokątów (wyznaczanie
75części wspólnej, sumy, różnicy i różnicy symetrycznej) oraz
76obrysowywanie linii i wielokątów. Jest oparta na algorytmie obcinania
77Vattiego.
78
79%prep
80%setup -q -n pyclipper-%{version}
81%patch0 -p1
82
83%build
84%if %{with python2}
85%py_build
86
87%if %{with tests}
88PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
89PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
90%{__python} -m pytest tests
91%endif
92%endif
93
94%if %{with python3}
95%py3_build
96
97%if %{with tests}
98PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
99PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
100%{__python3} -m pytest tests
101%endif
102%endif
103
104%install
105rm -rf $RPM_BUILD_ROOT
106
107%if %{with python2}
108%py_install
109
110%py_postclean
111%endif
112
113%if %{with python3}
114%py3_install
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 LICENSE README.rst
124%dir %{py_sitedir}/pyclipper
125%{py_sitedir}/pyclipper/*.py[co]
126%attr(755,root,root) %{py_sitedir}/pyclipper/*.so
127%{py_sitedir}/pyclipper-%{version}-py*.egg-info
128%endif
129
130%if %{with python3}
131%files -n python3-pyclipper
132%defattr(644,root,root,755)
133%doc LICENSE README.rst
134%dir %{py3_sitedir}/pyclipper
135%{py3_sitedir}/pyclipper/*.py
136%attr(755,root,root) %{py3_sitedir}/pyclipper/*.so
137%{py3_sitedir}/pyclipper/__pycache__
138%{py3_sitedir}/pyclipper-%{version}-py*.egg-info
139%endif
This page took 0.088619 seconds and 4 git commands to generate.