]> git.pld-linux.org Git - packages/python-recordclass.git/blob - python-recordclass.spec
Release 1. Works for me.
[packages/python-recordclass.git] / python-recordclass.spec
1 # Conditional build:
2 %bcond_with     doc     # don't build doc
3 %bcond_with     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  recordclass
8 Summary:        Mutable variant of collections.namedtuple, which supports assignments
9 Summary(pl.UTF-8):      Modyfikowalny wariant collections.namedtuple, wspierajÄ…cy przypisania
10 Name:           python-%{module}
11 Version:        0.4.3
12 Release:        1
13 License:        MIT
14 Group:          Libraries/Python
15 # Source0:      https://pypi.python.org/packages/source/M/MODULE/%{module}-%{version}.tar.gz
16 Source0:        https://pypi.python.org/packages/cb/33/dbfc5b2945acad0a741e66e96d9416a2860a2b8c49e807cf9f915432b5b4/recordclass-%{version}.tar.gz
17 # Source0-md5:  3e36bba64024b70a49b475fd20b56710
18 URL:            http://intellimath.bitbucket.org/recordclass
19 BuildRequires:  rpm-pythonprov
20 # for the py_build, py_install macros
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 %if %{with python2}
23 BuildRequires:  python-devel
24 #BuildRequires: python-setuptools
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-devel
28 #BuildRequires: python3-setuptools
29 %endif
30 Requires:       python-modules
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34
35 %description -l pl.UTF-8
36
37 %package -n python3-%{module}
38 Summary:        -
39 Summary(pl.UTF-8):      -
40 Group:          Libraries/Python
41 Requires:       python3-modules
42
43 %description -n python3-%{module}
44
45 %description -n python3-%{module} -l pl.UTF-8
46
47 %package apidocs
48 Summary:        %{module} API documentation
49 Summary(pl.UTF-8):      Dokumentacja API %{module}
50 Group:          Documentation
51
52 %description apidocs
53 API documentation for %{module}.
54
55 %description apidocs -l pl.UTF-8
56 Dokumentacja API %{module}.
57
58 %prep
59 %setup -q -n %{module}-%{version}
60
61 %build
62 %if %{with python2}
63 %py_build %{?with_tests:test}
64 %endif
65
66 %if %{with python3}
67 %py3_build %{?with_tests:test}
68 %endif
69
70 %if %{with doc}
71 cd docs
72 %{__make} -j1 html
73 rm -rf _build/html/_sources
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 %if %{with python2}
79 %py_install
80 %py_postclean
81 %endif
82
83 %if %{with python3}
84 %py3_install
85 %endif
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %files
92 %defattr(644,root,root,755)
93 %doc README.rst
94 %dir %{py_sitedir}/%{module}
95 %{py_sitedir}/%{module}/*.py[co]
96 %dir %{py_sitedir}/%{module}/test
97 %{py_sitedir}/%{module}/test/*.py[co]
98 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
99 %{py_sitedir}/%{module}-%{version}-py*.egg-info
100 %endif
101
102 %if %{with python3}
103 %files -n python3-%{module}
104 %defattr(644,root,root,755)
105 %doc README.rst
106 %dir %{py3_sitedir}/%{module}
107 %{py3_sitedir}/%{module}/*.py
108 %{py3_sitedir}/%{module}/test
109 %{py3_sitedir}/%{module}/typing
110 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
111 %{py3_sitedir}/%{module}/__pycache__
112 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
113 %endif
114
115 %if %{with doc}
116 %files apidocs
117 %defattr(644,root,root,755)
118 %doc docs/_build/html/*
119 %endif
This page took 0.06699 seconds and 3 git commands to generate.