]>
Commit | Line | Data |
---|---|---|
4aeef27c JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module xlwt | |
7 | Summary: Library to create spreadsheets compatible with MS Excel 97/2000/XP/2003 XLS | |
8 | Name: python-%{module} | |
9 | Version: 1.3.0 | |
93a5f40b | 10 | Release: 4 |
4aeef27c JP |
11 | License: BSD |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/xlwt/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/x/xlwt/%{module}-%{version}.tar.gz | |
15 | # Source0-md5: 4b1ca8a3cef3261f4b4dc3f138e383a8 | |
16 | URL: http://www.python-excel.org/ | |
17 | %if %{with python2} | |
18 | BuildRequires: python-modules >= 1:2.7 | |
19 | BuildRequires: python-setuptools | |
20 | %endif | |
21 | %if %{with python3} | |
22 | BuildRequires: python3-modules >= 1:3.3 | |
23 | BuildRequires: python3-setuptools | |
24 | %endif | |
25 | BuildRequires: rpm-pythonprov | |
26 | BuildRequires: rpmbuild(macros) >= 1.714 | |
27 | Requires: python-modules >= 1:2.7 | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | This is a library for developers to use to generate spreadsheet files | |
33 | compatible with Microsoft Excel versions 95 to 2003. | |
34 | ||
35 | The package itself is pure Python with no dependencies on modules or | |
36 | packages outside the standard Python distribution. | |
37 | ||
38 | %package -n python3-%{module} | |
39 | Summary: Library to create spreadsheets compatible with MS Excel 97/2000/XP/2003 XLS | |
40 | Requires: python3-modules >= 1:3.5 | |
41 | ||
42 | %description -n python3-%{module} | |
43 | This is a library for developers to use to generate spreadsheet files | |
44 | compatible with Microsoft Excel versions 95 to 2003. | |
45 | ||
46 | The package itself is pure Python with no dependencies on modules or | |
47 | packages outside the standard Python distribution. | |
48 | ||
49 | %prep | |
50 | %setup -q -n %{module}-%{version} | |
51 | ||
52 | %build | |
53 | %if %{with python2} | |
54 | %py_build | |
55 | %endif | |
56 | ||
57 | %if %{with python3} | |
58 | %py3_build | |
59 | %endif | |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %if %{with python2} | |
65 | %py_install | |
66 | %py_postclean | |
67 | %endif | |
68 | ||
69 | %if %{with python3} | |
70 | %py3_install | |
71 | %endif | |
72 | ||
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %if %{with python2} | |
77 | %files | |
78 | %defattr(644,root,root,755) | |
79 | %doc README.rst | |
80 | %{py_sitescriptdir}/%{module} | |
81 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
82 | %endif | |
83 | ||
84 | %if %{with python3} | |
85 | %files -n python3-%{module} | |
86 | %defattr(644,root,root,755) | |
87 | %doc README.rst | |
88 | %{py3_sitescriptdir}/%{module} | |
89 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
90 | %endif |