]> git.pld-linux.org Git - packages/python-wcwidth.git/blob - python-wcwidth.spec
a6f1faec4b1d2d059de61f912749df715d583fbf
[packages/python-wcwidth.git] / python-wcwidth.spec
1 # Conditional build:
2 %bcond_with     doc     # don't build doc
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  wcwidth
8 Summary:        Measures number of Terminal column cells of wide-character codes
9 Summary(pl.UTF-8):      Mierzy liczbe kolumn terminala konieczna do wyświetlenia znaków
10 Name:           python-%{module}
11 Version:        0.1.6
12 Release:        2
13 License:        MIT
14 Group:          Libraries/Python
15 Source0:        https://github.com/jquast/wcwidth/archive/%{version}.tar.gz
16 # Source0-md5:  fc5fd0275d76b6a7a7ab2cc8829c919a
17 URL:            https://pypi.python.org/pypi/wcwidth
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 %if %{with python2}
21 BuildRequires:  python-modules
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-modules
26 BuildRequires:  python3-setuptools
27 %endif
28 Requires:       python-modules
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 This Library is mainly for those implementing a Terminal Emulator, or
34 programs that carefully produce output to be interpreted by one.
35
36 # %%description -l pl.UTF-8
37
38 %package -n python3-%{module}
39 Summary:        -
40 Summary(pl.UTF-8):      -
41 Group:          Libraries/Python
42 Requires:       python3-modules
43
44 %description -n python3-%{module}
45 This Library is mainly for those implementing a Terminal Emulator, or
46 programs that carefully produce output to be interpreted by one.
47
48 # %%description -n python3-%{module} -l pl.UTF-8
49
50 %package apidocs
51 Summary:        %{module} API documentation
52 Summary(pl.UTF-8):      Dokumentacja API %{module}
53 Group:          Documentation
54
55 %description apidocs
56 API documentation for %{module}.
57
58 %description apidocs -l pl.UTF-8
59 Dokumentacja API %{module}.
60
61 %prep
62 %setup -q -n %{module}-%{version}
63
64 #%{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py
65
66 %build
67 %if %{with python2}
68 %py_build %{?with_tests:test}
69 %endif
70
71 %if %{with python3}
72 %py3_build %{?with_tests:test}
73 %endif
74
75 %if %{with doc}
76 cd docs
77 %{__make} -j1 html
78 rm -rf _build/html/_sources
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{with python2}
85 %py_install
86
87 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
88 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
89
90 %py_postclean
91 %endif
92
93 %if %{with python3}
94 %py3_install
95 %endif
96
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %files
103 %defattr(644,root,root,755)
104 %doc README.rst
105 %{py_sitescriptdir}/%{module}
106 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
107 %endif
108
109 %if %{with python3}
110 %files -n python3-%{module}
111 %defattr(644,root,root,755)
112 %doc README.rst
113 %{py3_sitescriptdir}/%{module}
114 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
115 %endif
116
117 %if %{with doc}
118 %files apidocs
119 %defattr(644,root,root,755)
120 %doc docs/_build/html/*
121 %endif
This page took 0.083344 seconds and 2 git commands to generate.