3 %bcond_with python2 # CPython 2.x module [not supported as of 1.2]
4 %bcond_without python3 # CPython 3.x module
6 Summary: Python wrapper for libcangjie, the library implementing the Cangjie input method
7 Summary(pl.UTF-8): Interfejs Pythona do libcangjie - biblioteki implementującej metodę wprowadzania Cangjie
12 Group: Libraries/Python
13 #Source0Download: https://github.com/Cangjians/pycangjie/releases
14 Source0: https://github.com/Cangjians/pycangjie/releases/download/v%{version}/cangjie-%{version}.tar.xz
15 # Source0-md5: 25a618f487a6e041d8ebe76881c83b22
16 URL: https://github.com/Cangjians/pycangjie
17 BuildRequires: autoconf >= 2.63
18 BuildRequires: automake >= 1:1.11
19 BuildRequires: libcangjie-devel >= 1.0
20 BuildRequires: libtool >= 2:2
21 BuildRequires: pkgconfig
22 BuildRequires: rpm-pythonprov
24 BuildRequires: python-Cython >= 0.14
25 BuildRequires: python-devel >= 2.0
28 BuildRequires: python3-Cython >= 0.14
29 BuildRequires: python3-devel >= 1:3.2.3
31 Requires: libcangjie >= 1.0
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 This is a Python wrapper to libcangjie, the library implementing the
37 Cangjie input method (for Chinese).
39 %description -l pl.UTF-8
40 Ten pakiet zawiera interfejs Pythona do libcangjie - biblioteki
41 implementującej metodę wprowadzania znaków chińskich Cangjie.
43 %package -n python3-cangjie
44 Summary: Python 3 wrapper for libcangjie, the library implementing the Cangjie input method
45 Summary(pl.UTF-8): Interfejs Pythona 3 do libcangjie - biblioteki implementującej metodę wprowadzania Cangjie
46 Group: Libraries/Python
47 Requires: libcangjie >= 1.0
48 Requires: python3-libs >= 1:3.2.3
50 %description -n python3-cangjie
51 This is a Python 3 wrapper to libcangjie, the library implementing the
52 Cangjie input method (for Chinese).
54 %description -n python3-cangjie -l pl.UTF-8
55 Ten pakiet zawiera interfejs Pythona 3 do libcangjie - biblioteki
56 implementującej metodę wprowadzania znaków chińskich Cangjie.
59 %setup -q -n cangjie-%{version}
68 --disable-silent-rules
73 rm -rf $RPM_BUILD_ROOT
76 DESTDIR=$RPM_BUILD_ROOT
78 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/cangjie/*.la
81 rm -rf $RPM_BUILD_ROOT
85 %defattr(644,root,root,755)
86 %doc AUTHORS README.md docs/*.md
87 %dir %{py_sitedir}/cangjie
91 %files -n python3-cangjie
92 %defattr(644,root,root,755)
93 %doc AUTHORS README.md docs/*.md
94 %dir %{py3_sitedir}/cangjie
95 %attr(755,root,root) %{py3_sitedir}/cangjie/_core.so
96 %attr(755,root,root) %{py3_sitedir}/cangjie/errors.so
97 %attr(755,root,root) %{py3_sitedir}/cangjie/filters.so
98 %attr(755,root,root) %{py3_sitedir}/cangjie/versions.so
99 %{py3_sitedir}/cangjie/__init__.py
100 %{py3_sitedir}/cangjie/__pycache__