]> git.pld-linux.org Git - packages/python-simplexml.git/blame - python-simplexml.spec
rebuild with tests and docs
[packages/python-simplexml.git] / python-simplexml.spec
CommitLineData
be5cfb8d
WF
1%bcond_without python2 # CPython 2.x module
2%bcond_without python3 # CPython 3.x module
3
4%define module simplexml
5Summary: Simplexml in Python
6Summary(pl.UTF-8): simplexml w Pythonie
7Name: python-%{module}
0711a0f6 8Version: 0.6.5
828ffcba 9Release: 6
be5cfb8d
WF
10License: GPL
11Group: Libraries/Python
12Source0: http://www.fit.vutbr.cz/~smrcka/projects/simplexml/%{module}-%{version}.tar.gz
0711a0f6 13# Source0-md5: a150742499c483a38267a885dca4f245
be5cfb8d
WF
14URL: http://www.fit.vutbr.cz/~smrcka/projects/simplexml
15BuildRequires: rpm-pythonprov
16BuildRequires: rpmbuild(macros) >= 1.219
17%if %{with python2}
18Requires: python-modules
19%endif
20%if %{with python3}
21BuildRequires: python3-2to3
22%endif
23BuildArch: noarch
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
27SimpleXML is a commandline tool and library for very simply
28manipulating XML files. It lets you harvest data from XML files,
29change values of attributes, print or change data of elements, create
30new elements, etc. All you need is to know the path to element with
31definition of attributes and/or order of element. If you work with
32commandline tool, you must also know what do you want (change data,
33attributes, create new element, ...) In case you use the python
34module, you get an object with attributes like name, attr, value, data
35etc.
36
37For help with commandline tool, run it. It's really simple! ;-) For
38help with python module, import it and see __doc__ attributes ;-)
39
40Python 2.x version.
41
42%package -n python3-%{module}
43Summary: Simplexml in Python
44Summary(pl.UTF-8): Simplexml w Pythonie
45Group: Libraries/Python
46
47%description -n python3-%{module}
48SimpleXML is a commandline tool and library for very simply
49manipulating XML files. It lets you harvest data from XML files,
50change values of attributes, print or change data of elements, create
51new elements, etc. All you need is to know the path to element with
52definition of attributes and/or order of element. If you work with
53commandline tool, you must also know what do you want (change data,
54attributes, create new element, ...) In case you use the python
55module, you get an object with attributes like name, attr, value, data
56etc.
57
58For help with commandline tool, run it. It's really simple! ;-) For
59help with python module, import it and see __doc__ attributes ;-)
60
61Python 2.x version.
62
63%prep
64%setup -q -n %{module}-%{version}
65
0984783d
JR
66%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' \
67 simplexml
68
be5cfb8d
WF
69%build
70
71%install
72rm -rf $RPM_BUILD_ROOT
73%if %{with python2}
c23e648b
WF
74install -d $RPM_BUILD_ROOT{%{py_sitescriptdir}/simplexml,%{_bindir}}
75install *.py $RPM_BUILD_ROOT%{py_sitescriptdir}/simplexml/
be5cfb8d
WF
76install simplexml $RPM_BUILD_ROOT%{_bindir}
77%endif
78
79%if %{with python3}
c23e648b
WF
80install -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/simplexml
81install *.py $RPM_BUILD_ROOT%{py3_sitescriptdir}/simplexml/
be5cfb8d
WF
82%endif
83
84%if %{with python2}
85%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
86%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
87%py_postclean
88%endif
89
90%if %{with python3}
0711a0f6 912to3 -w -n $RPM_BUILD_ROOT%{py3_sitescriptdir}
dd8385e6
WF
92%py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
93%py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
be5cfb8d
WF
94%endif
95
96%clean
97rm -rf $RPM_BUILD_ROOT
98
99%if %{with python2}
100%files
101%defattr(644,root,root,755)
102%doc README
103%attr(755,root,root) %{_bindir}/simplexml
c23e648b
WF
104%dir %{py_sitescriptdir}/simplexml
105%{py_sitescriptdir}/simplexml/*
be5cfb8d
WF
106%endif
107
108%if %{with python3}
109%files -n python3-%{module}
110%defattr(644,root,root,755)
c23e648b
WF
111%dir %{py3_sitescriptdir}/simplexml
112%{py3_sitescriptdir}/simplexml/*
be5cfb8d 113%endif
This page took 0.415957 seconds and 4 git commands to generate.