]> git.pld-linux.org Git - packages/python-enum.git/blob - python-enum.spec
f0556904ba61b5178767558e6e4d37e1ae63694a
[packages/python-enum.git] / python-enum.spec
1 #
2 # Conditional build:
3 %bcond_with     doc             # don't build doc
4 %bcond_with     tests   # do not perform "make test"
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  enum
9 Summary:        Robust enumerated type support in Python.
10 Summary(pl.UTF-8):      Odporny typ wyliczeniowy dla Pythona
11 # Name must match the python module/package name (as in 'import' statement)
12 Name:           python-%{module}
13 Version:        0.4.4
14 Release:        1
15 License:        GPL or PSF
16 Group:          Libraries/Python
17 Source:         http://pypi.python.org/packages/source/e/%{module}/%{module}-%{version}.tar.gz
18 Patch0:         %{name}-py3_setup_fix.patch
19 URL:            http://pypi.python.org/pypi/enum/
20 BuildRequires:  rpm-pythonprov
21 # if py_postclean is used
22 BuildRequires:  rpmbuild(macros) >= 1.710
23 %if %{with python2}
24 BuildRequires:  python-distribute
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-distribute
28 BuildRequires:  python3-modules
29 %endif
30 # Below Rs only work for main package (python2)
31 #Requires:              python-libs
32 Requires:               python-modules
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 Package provides a module for robust enumerations in Python.
38
39 # %description -l pl.UTF-8
40
41 %package -n python3-%{module}
42 Summary:        -
43 Summary(pl.UTF-8):      -
44 Group:          Libraries/Python
45 Requires:               python3-modules
46
47 %description -n python3-%{module}
48
49 %description -n python3-%{module} -l pl.UTF-8
50
51 %package apidocs
52 Summary:        %{module} API documentation
53 Summary(pl.UTF-8):      Dokumentacja API %{module}
54 Group:          Documentation
55
56 %description apidocs
57 API documentation for %{module}.
58
59 %description apidocs -l pl.UTF-8
60 Dokumentacja API %{module}.
61
62 %prep
63 %setup -q -n %{module}-%{version}
64 %patch0 -p1
65
66
67 %build
68 %if %{with python2}
69 %py_build %{?with_tests:test}
70 %endif
71
72 %if %{with python3}
73 %py3_build %{?with_tests:test}
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %if %{with python2}
80 %py_install
81
82 %py_postclean
83 %endif
84
85 %if %{with python3}
86 %py3_install
87 %endif
88
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python2}
94 %files
95 %defattr(644,root,root,755)
96 %{py_sitescriptdir}/*.py[co]
97 %if "%{py_ver}" > "2.4"
98 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
99 %endif
100 %endif
101
102 %if %{with python3}
103 %files -n python3-%{module}
104 %defattr(644,root,root,755)
105 %{py3_sitescriptdir}/%{module}.py
106 %{py3_sitescriptdir}/__pycache__/*py[co]
107 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
108 %endif
109
110 %if %{with doc}
111 %files apidocs
112 %defattr(644,root,root,755)
113 %doc docs/_build/html/*
114 %endif
This page took 0.043012 seconds and 2 git commands to generate.