]> git.pld-linux.org Git - packages/python-xhtml2pdf.git/commitdiff
Version 0.1a4. Recent python template used. auto/th/python-xhtml2pdf-0.1a4-1
authorMateusz Korniak <matkor@pld-linux.org>
Mon, 23 May 2016 07:41:03 +0000 (09:41 +0200)
committerMateusz Korniak <matkor@pld-linux.org>
Mon, 23 May 2016 07:41:03 +0000 (09:41 +0200)
python-xhtml2pdf.spec

index 3700e84c8971361dfa9375bdf7936d67bf403615..7284d0940292a17d1e5cd295bafab685822737a9 100644 (file)
-#
-# Conditional build:
-%bcond_without tests   # do not perform "make test"
+# TODO: Fix tests
+# TODO: Fix dependencies for Python 3.x version
+%bcond_with    doc     # don't build doc
+%bcond_with    tests   # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_with    python3 # CPython 3.x module
 
 %define        module  xhtml2pdf
 Summary:       PDF generator using HTML and CSS
+Summary(pl.UTF-8):     Generator PDF używający HTML i CSS
 Name:          python-%{module}
-Version:       0.0.3
-Release:       0.1
-License:       Apache License 2.0
-Group:         Development/Languages/Python
-Source0:       http://pypi.python.org/packages/source/x/xhtml2pdf/%{module}-%{version}.tar.gz
-# Source0-md5: 13b0d6059b72c994473fddfa7a528451
-URL:           http://pypi.python.org/pypi/xhtml2pdf/
+Version:       0.1a4
+Release:       1
+License:       Apache v2.0
+Group:         Libraries/Python
+Source0:       https://pypi.python.org/packages/1c/04/a52a262a9ae6cd07b86baf2d9486d00da1dec5edf638cbe19c5983ebd266/xhtml2pdf-%{version}.tar.gz
+# Source0-md5: beb2d99bb99376a3a4f584599eacec23
+URL:           https://pypi.python.org/pypi/xhtml2pdf/
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires: python-PyPDF2
 BuildRequires: python-ReportLab >= 2.2
 BuildRequires: python-distribute
 BuildRequires: python-html5lib >= 0.11.1
-BuildRequires: python-pyPdf >= 1.11
+BuildRequires: python-modules
+BuildRequires: python-pillow
 BuildRequires: rpm-pythonprov
-# if py_postclean is used
-BuildRequires: rpmbuild(macros) >= 1.710
+%endif
+%if %{with python3}
+BuildRequires: python3-PyPDF2
+BuildRequires: python3-ReportLab >= 2.2
+BuildRequires: python3-distribute
+BuildRequires: python3-html5lib >= 0.11.1
+BuildRequires: python3-modules
+BuildRequires: python3-pillow
+%endif
 Requires:      python-modules
+Obsoletes:     python-pisa
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-HTML/CSS to PDF converter based on Python.
+html2pdf converter using the ReportLab Toolkit, the HTML5lib and
+pyPdf.
+
+%description -l pl.UTF-8
+Konwertor html2pdf używający narzędzi ReportLab, HTML5lib i pyPdf.
+
+%package -n python3-%{module}
+Summary:       PDF generator using HTML and CSS
+Summary(pl.UTF-8):     Generator PDF używający HTML i CSS
+Group:         Libraries/Python
+BuildRequires: python3-pillow
+Requires:      python3-modules
+
+%description -n python3-%{module}
+html2pdf converter using the ReportLab Toolkit, the HTML5lib and
+pyPdf.
+
+%description -n python3-%{module} -l pl.UTF-8
+Konwertor html2pdf używający narzędzi ReportLab, HTML5lib i pyPdf.
+
+%package apidocs
+Summary:       %{module} API documentation
+Summary(pl.UTF-8):     Dokumentacja API %{module}
+Group:         Documentation
+
+%description apidocs
+API documentation for %{module}.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API %{module}.
 
 %prep
 %setup -q -n %{module}-%{version}
 
-
 %build
-%py_build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
 
-%{?with_tests:%{__python} setup.py test}
+%if %{with doc}
+cd docs
+%{__make} -j1 html
+rm -rf _build/html/_sources
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%py_install
 
-%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%if %{with python2}
+%py_install
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
 %py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc README.rst
@@ -54,6 +116,22 @@ rm -rf $RPM_BUILD_ROOT
 %{py_sitescriptdir}/%{module}/*.py[co]
 %dir %{py_sitescriptdir}/%{module}/w3c
 %{py_sitescriptdir}/%{module}/w3c/*.py[co]
+
 %if "%{py_ver}" > "2.4"
-%{py_sitescriptdir}/%{module}-*.egg-info
+%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc README.rst
+# TODO: files
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/*
 %endif
This page took 0.034679 seconds and 4 git commands to generate.