Changeset 874 for spec/trunk/SPECS/python-lxml.spec
- Timestamp:
- Oct 26, 2016, 6:16:21 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/python-lxml.spec
r613 r874 1 # Note: this .spec is borrowed from python-lxml-3.4.4-2.fc24.src.rpm 1 # Note: this .spec is borrowed from http://pkgs.fedoraproject.org/cgit/rpms/python-lxml.git/tree/python-lxml.spec 2 # and adapted to our needs 2 3 3 %if 0%{?fedora} > 12 4 %global with_python3 1 5 %endif 4 %global pypi_name lxml 6 5 7 %if 0%{?fedora} >= 20 8 %global with_python3_cssselect19 %endif 6 # remove the comment below, when we have python3 support 7 #global with_python3 1 8 10 9 11 10 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} 12 11 13 Name: python- lxml14 Version: 3. 5.012 Name: python-%{pypi_name} 13 Version: 3.6.4 15 14 Release: 1%{?dist} 16 Summary: ElementTree-like Python bindings for libxml2 and libxslt15 Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API 17 16 18 17 Group: Development/Libraries 19 18 License: BSD 20 19 URL: http://lxml.de 21 Source0: http://lxml.de/files/lxml-%{version}.tgz 22 #Source1: http://lxml.de/files/lxml-%{version}.tgz.asc 20 Vendor: bww bitwise works GmbH 21 Source0: https://files.pythonhosted.org/packages/source/l/%{pypi_name}/%{pypi_name}-%{version}.tar.gz 23 22 23 BuildRequires: libxml2-devel 24 24 BuildRequires: libxslt-devel 25 25 26 BuildRequires: python-devel 27 #BuildRequires: python-setuptools 28 #BuildRequires: python-cssselect 29 #BuildRequires: Cython >= 0.20 30 31 #Requires: python-cssselect 26 BuildRequires: python2-devel 32 27 33 28 %if 0%{?with_python3} 34 29 BuildRequires: python3-devel 35 30 BuildRequires: python3-setuptools 36 %if 0%{?with_python3_cssselect}37 BuildRequires: python3-cssselect38 %endif39 31 %endif 40 32 41 33 %description 42 lxml provides a Python binding to the libxslt and libxml2 libraries. 43 It follows the ElementTree API as much as possible in order to provide 44 a more Pythonic interface to libxml2 and libxslt than the default 45 bindings. In particular, lxml deals with Python Unicode strings 46 rather than encoded UTF-8 and handles memory management automatically, 47 unlike the default bindings. 34 lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It 35 provides safe and convenient access to these libraries using the ElementTree It 36 extends the ElementTree API significantly to offer support for XPath, RelaxNG, 37 XML Schema, XSLT, C14N and much more.To contact the project, go to the project 38 home page < or see our bug tracker at case you want to use the current ... 48 39 49 %package docs50 Summary: Documentation for %{name}51 Group: Documentation 52 BuildArch: noarch 53 %description docs 54 This package provides the documentation for %{name}, e.g. the API as html. 40 %package -n python2-%{pypi_name} 41 Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API 42 #Requires: python-cssselect 43 #Requires: python-html5lib 44 #Requires: python-beautifulsoup4 45 Provides: python-%{pypi_name} 55 46 47 %description -n python2-%{pypi_name} 48 lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It 49 provides safe and convenient access to these libraries using the ElementTree It 50 extends the ElementTree API significantly to offer support for XPath, RelaxNG, 51 XML Schema, XSLT, C14N and much more.To contact the project, go to the project 52 home page < or see our bug tracker at case you want to use the current ... 56 53 57 54 %if 0%{?with_python3} 58 %package -n python3-lxml 59 Summary: ElementTree-like Python 3 bindings for libxml2 and libxslt 60 Group: Development/Libraries 61 %if 0%{?with_python3_cssselect} 55 %package -n python3-lxml 56 Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API 62 57 Requires: python3-cssselect 63 %endif 58 Requires: python3-html5lib 59 Requires: python3-beautifulsoup4 60 %{?python_provide:%python_provide python3-%{pypi_name}} 64 61 65 %description -n python3-lxml 66 lxml provides a Python 3 binding to the libxslt and libxml2 libraries. 67 It follows the ElementTree API as much as possible in order to provide 68 a more Pythonic interface to libxml2 and libxslt than the default 69 bindings. In particular, lxml deals with Python 3 Unicode strings 70 rather than encoded UTF-8 and handles memory management automatically, 71 unlike the default bindings. 62 %description -n python3-%{pypi_name} 63 lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It 64 provides safe and convenient access to these libraries using the ElementTree It 65 extends the ElementTree API significantly to offer support for XPath, RelaxNG, 66 XML Schema, XSLT, C14N and much more.To contact the project, go to the project 67 home page < or see our bug tracker at case you want to use the current ... 72 68 %endif 73 69 … … 75 71 %setup -q -n lxml-%{version} 76 72 77 ## remove the C extension so that it will be rebuilt using the latest Cython 78 #rm -f src/lxml/lxml.etree.c 79 #rm -f src/lxml/lxml.etree.h 80 #rm -f src/lxml/lxml.etree_api.h 81 #rm -f src/lxml/lxml.objectify.c 82 83 chmod a-x doc/rest2html.py 84 sed -i 's/\r//' doc/s5/ui/default/print.css \ 85 doc/s5/ep2008/atom.rng \ 86 doc/s5/ui/default/iepngfix.htc 73 %build 74 CFLAGS="%{optflags}" %{__python} setup.py build 87 75 88 76 %if 0%{?with_python3} 89 rm -rf %{py3dir} 90 cp -r . %{py3dir} 91 %endif 92 93 %build 94 CFLAGS="%{optflags}" %{__python} setup.py build 95 #--with-cython 96 97 %if 0%{?with_python3} 98 cp src/lxml/lxml.etree.c %{py3dir}/src/lxml 99 cp src/lxml/lxml.etree.h %{py3dir}/src/lxml 100 cp src/lxml/lxml.etree_api.h %{py3dir}/src/lxml 101 cp src/lxml/lxml.objectify.c %{py3dir}/src/lxml 102 103 pushd %{py3dir} 104 CFLAGS="%{optflags}" %{__python3} setup.py build --with-cython 105 popd 77 %py3_build 106 78 %endif 107 79 108 80 %install 109 81 %{__python} setup.py install --skip-build --no-compile --root %{buildroot} 110 #--with-cython111 82 112 83 %if 0%{?with_python3} 113 pushd %{py3dir} 114 %{__python3} setup.py install --skip-build --no-compile --with-cython --root %{buildroot} 115 popd 84 %py3_install 116 85 %endif 117 86 118 87 %check 119 88 # @todo enable once we got python-unittest 120 #BUILD_LIB_DIR=$(find $(pwd) -name "*.pyd" | head -n 1 | xargs dirname) 121 #cp $BUILD_LIB_DIR/*.pyd src/lxml 122 #export LANG=en_US.utf8 123 #%{__python} test.py -p -v 124 #export PYTHONPATH=src 125 #%{__python} selftest.py 126 #%{__python} selftest2.py 89 #{__python2} setup.py test 127 90 128 91 %if 0%{?with_python3} 129 pushd %{py3dir} 130 131 BUILD_LIB_DIR=$(find $(pwd) -name "*.pyd" | head -n 1 | xargs dirname) 132 cp $BUILD_LIB_DIR/*.pyd src/lxml 133 export LANG=en_US.utf8 134 %{__python3} test.py -p -v 135 export PYTHONPATH=src 136 %{__python3} selftest.py 137 %{__python3} selftest2.py 138 139 popd 92 %{__python3} setup.py test 140 93 %endif 141 94 142 95 143 %files 96 %files -n python2-%{pypi_name} 144 97 %{!?_licensedir:%global license %%doc} 145 98 %license LICENSES.txt 146 %doc PKG-INFO CREDITS.txt CHANGES.txt 147 %{python_sitearch}/lxml 148 %{python_sitearch}/lxml-*.egg-info 149 150 %files docs 151 %doc doc/* 99 %license doc/licenses/ZopePublicLicense.txt LICENSES.txt 100 %doc README.rst src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt 101 %{python_sitearch}/%{pypi_name} 102 %{python_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info 152 103 153 104 %if 0%{?with_python3} 154 %files -n python3- lxml155 %license LICENSES.txt156 %doc PKG-INFO CREDITS.txt CHANGES.txt157 %{python3_sitearch}/ lxml-*.egg-info158 %{python3_sitearch}/ lxml105 %files -n python3-%{pypi_name} 106 %license doc/licenses/ZopePublicLicense.txt LICENSES.txt 107 %doc README.rst src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt 108 %{python3_sitearch}/%{pypi_name} 109 %{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info 159 110 %endif 160 111 161 112 %changelog 162 * Thu Dec 12 2015 Dmitriy Kuminov <coding@dmik.org> 3.5.0-1 113 * Wed Oct 26 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 3.6.4-1 114 - Update package to version 3.6.4. 115 116 * Sat Dec 12 2015 Dmitriy Kuminov <coding@dmik.org> 3.5.0-1 163 117 - Initial package for version 3.5.0.
Note:
See TracChangeset
for help on using the changeset viewer.