]>
Commit | Line | Data |
---|---|---|
25c87403 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | ||
5 | %define module kitchen | |
25c87403 ER |
6 | Summary: Small, useful pieces of code to make Python coding easier |
7 | Name: python-%{module} | |
4f667449 | 8 | Version: 1.1.1 |
efd9dac2 | 9 | Release: 3 |
25c87403 ER |
10 | License: LGPL v2+ |
11 | Group: Development/Languages | |
4f667449 ER |
12 | Source0: https://fedorahosted.org/releases/k/i/kitchen/%{module}-%{version}.tar.gz |
13 | # Source0-md5: 059d7ce048ca1d0fb53e6755145137b0 | |
25c87403 | 14 | URL: https://fedorahosted.org/kitchen/ |
4f667449 | 15 | BuildRequires: python-modules >= 2.3.1 |
2b13992b | 16 | BuildRequires: python-setuptools |
17 | BuildRequires: rpm-pythonprov | |
1a087bf9 | 18 | BuildRequires: rpmbuild(macros) >= 1.710 |
25c87403 ER |
19 | %if %{with tests} |
20 | BuildRequires: python-chardet | |
21 | BuildRequires: python-coverage | |
22 | BuildRequires: python-nose | |
9a1a2b7b ER |
23 | %if %(locale -a | grep -q '^en_US$'; echo $?) |
24 | BuildRequires: glibc-localedb-all | |
25 | %endif | |
25c87403 | 26 | %endif |
4f667449 | 27 | Suggests: python-chardet |
25c87403 ER |
28 | BuildArch: noarch |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | kitchen includes functions to make gettext easier to use, handling | |
33 | unicode text easier (conversion with bytes, outputting xml, and | |
34 | calculating how many columns a string takes), and compatibility | |
4f667449 ER |
35 | modules for writing code that uses Python 2.7 modules but needs to run |
36 | on Python 2.3 | |
25c87403 ER |
37 | |
38 | %prep | |
4f667449 | 39 | %setup -q -n %{module}-%{version} |
25c87403 ER |
40 | |
41 | # can't find origin of this import | |
42 | grep -r 'from test import test_support' tests -l | xargs rm | |
43 | ||
44 | %build | |
8fa068e3 | 45 | %py_build |
25c87403 ER |
46 | |
47 | %if %{with tests} | |
4f667449 | 48 | nosetests-%{py_ver} --with-coverage --cover-package kitchen |
25c87403 ER |
49 | %endif |
50 | ||
51 | %install | |
52 | rm -rf $RPM_BUILD_ROOT | |
8fa068e3 | 53 | %py_install |
25c87403 ER |
54 | |
55 | %py_postclean | |
56 | ||
57 | %clean | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
62 | %doc COPYING README NEWS COPYING.LESSER docs | |
96448bb0 | 63 | %dir %{py_sitescriptdir}/kitchen |
25c87403 ER |
64 | %{py_sitescriptdir}/kitchen/*.py[co] |
65 | %{py_sitescriptdir}/kitchen/collections | |
66 | %{py_sitescriptdir}/kitchen/i18n | |
4f667449 | 67 | %{py_sitescriptdir}/kitchen/iterutils |
25c87403 ER |
68 | %{py_sitescriptdir}/kitchen/pycompat24 |
69 | %{py_sitescriptdir}/kitchen/pycompat25 | |
70 | %{py_sitescriptdir}/kitchen/pycompat27 | |
71 | %{py_sitescriptdir}/kitchen/text | |
72 | %{py_sitescriptdir}/kitchen/versioning | |
73 | %if "%{py_ver}" > "2.4" | |
74 | %{py_sitescriptdir}/kitchen-%{version}*.egg-info | |
75 | %endif |