]> git.pld-linux.org Git - packages/python-xhtml2pdf.git/blame - python-xhtml2pdf.spec
- drop python3-distribute deps
[packages/python-xhtml2pdf.git] / python-xhtml2pdf.spec
CommitLineData
bb02f9bf
MK
1# TODO: Fix tests
2# TODO: Fix dependencies for Python 3.x version
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_with python3 # CPython 3.x module
28152574 7
8%define module xhtml2pdf
9Summary: PDF generator using HTML and CSS
bb02f9bf 10Summary(pl.UTF-8): Generator PDF używający HTML i CSS
28152574 11Name: python-%{module}
bb02f9bf 12Version: 0.1a4
38dd1869 13Release: 4
bb02f9bf
MK
14License: Apache v2.0
15Group: Libraries/Python
16Source0: https://pypi.python.org/packages/1c/04/a52a262a9ae6cd07b86baf2d9486d00da1dec5edf638cbe19c5983ebd266/xhtml2pdf-%{version}.tar.gz
17# Source0-md5: beb2d99bb99376a3a4f584599eacec23
18URL: https://pypi.python.org/pypi/xhtml2pdf/
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-PyPDF2
28152574 23BuildRequires: python-ReportLab >= 2.2
24BuildRequires: python-distribute
25BuildRequires: python-html5lib >= 0.11.1
bb02f9bf
MK
26BuildRequires: python-modules
27BuildRequires: python-pillow
bb02f9bf 28%endif
44355c76 29BuildRequires: rpm-pythonprov
bb02f9bf
MK
30%if %{with python3}
31BuildRequires: python3-PyPDF2
32BuildRequires: python3-ReportLab >= 2.2
bb02f9bf
MK
33BuildRequires: python3-html5lib >= 0.11.1
34BuildRequires: python3-modules
35BuildRequires: python3-pillow
36%endif
28152574 37Requires: python-modules
82f842a1
MK
38# /usr/bin/xhtml2pdf needs python-setuptools
39Requires: python-setuptools
bb02f9bf 40Obsoletes: python-pisa
28152574 41BuildArch: noarch
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
bb02f9bf
MK
45html2pdf converter using the ReportLab Toolkit, the HTML5lib and
46pyPdf.
47
48%description -l pl.UTF-8
49Konwertor html2pdf używający narzędzi ReportLab, HTML5lib i pyPdf.
50
51%package -n python3-%{module}
52Summary: PDF generator using HTML and CSS
53Summary(pl.UTF-8): Generator PDF używający HTML i CSS
54Group: Libraries/Python
bb02f9bf 55Requires: python3-modules
44355c76 56Requires: python3-pillow
82f842a1 57Requires: python3-setuptools
bb02f9bf
MK
58
59%description -n python3-%{module}
60html2pdf converter using the ReportLab Toolkit, the HTML5lib and
61pyPdf.
62
63%description -n python3-%{module} -l pl.UTF-8
64Konwertor html2pdf używający narzędzi ReportLab, HTML5lib i pyPdf.
65
66%package apidocs
67Summary: %{module} API documentation
68Summary(pl.UTF-8): Dokumentacja API %{module}
69Group: Documentation
70
71%description apidocs
72API documentation for %{module}.
73
74%description apidocs -l pl.UTF-8
75Dokumentacja API %{module}.
28152574 76
77%prep
78%setup -q -n %{module}-%{version}
79
28152574 80%build
bb02f9bf
MK
81%if %{with python2}
82%py_build %{?with_tests:test}
83%endif
84
85%if %{with python3}
86%py3_build %{?with_tests:test}
87%endif
28152574 88
bb02f9bf
MK
89%if %{with doc}
90cd docs
91%{__make} -j1 html
92rm -rf _build/html/_sources
93%endif
28152574 94
95%install
96rm -rf $RPM_BUILD_ROOT
28152574 97
bb02f9bf
MK
98%if %{with python2}
99%py_install
100%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
101%py_comp $RPM_BUILD_ROOT%{py_sitedir}
28152574 102%py_postclean
bb02f9bf
MK
103%endif
104
105%if %{with python3}
106%py3_install
107%endif
28152574 108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
bb02f9bf 112%if %{with python2}
28152574 113%files
114%defattr(644,root,root,755)
115%doc README.rst
116%attr(755,root,root) %{_bindir}/*
117%dir %{py_sitescriptdir}/%{module}
118%{py_sitescriptdir}/%{module}/*.py[co]
119%dir %{py_sitescriptdir}/%{module}/w3c
120%{py_sitescriptdir}/%{module}/w3c/*.py[co]
bb02f9bf 121
28152574 122%if "%{py_ver}" > "2.4"
bb02f9bf
MK
123%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
124%endif
125%endif
126
127%if %{with python3}
128%files -n python3-%{module}
129%defattr(644,root,root,755)
130%doc README.rst
131# TODO: files
132%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
133%endif
134
135%if %{with doc}
136%files apidocs
137%defattr(644,root,root,755)
138%doc docs/_build/html/*
28152574 139%endif
This page took 0.076686 seconds and 4 git commands to generate.