Ignore:
Timestamp:
Oct 26, 2016, 6:16:21 PM (9 years ago)
Author:
Silvan Scherrer
Message:

spec: python-lxml: Release version 3.6.4-1.

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
    23
    3 %if 0%{?fedora} > 12
    4 %global with_python3 1
    5 %endif
     4%global pypi_name lxml
    65
    7 %if 0%{?fedora} >= 20
    8 %global with_python3_cssselect 1
    9 %endif
     6# remove the comment below, when we have python3 support
     7#global with_python3 1
     8
    109
    1110%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
    1211
    13 Name:           python-lxml
    14 Version:        3.5.0
     12Name:           python-%{pypi_name}
     13Version:        3.6.4
    1514Release:        1%{?dist}
    16 Summary:        ElementTree-like Python bindings for libxml2 and libxslt
     15Summary:        Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API
    1716
    1817Group:          Development/Libraries
    1918License:        BSD
    2019URL:            http://lxml.de
    21 Source0:        http://lxml.de/files/lxml-%{version}.tgz
    22 #Source1:        http://lxml.de/files/lxml-%{version}.tgz.asc
     20Vendor:         bww bitwise works GmbH
     21Source0:        https://files.pythonhosted.org/packages/source/l/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
    2322
     23BuildRequires:  libxml2-devel
    2424BuildRequires:  libxslt-devel
    2525
    26 BuildRequires:  python-devel
    27 #BuildRequires:  python-setuptools
    28 #BuildRequires:  python-cssselect
    29 #BuildRequires:  Cython >= 0.20
    30 
    31 #Requires:       python-cssselect
     26BuildRequires:  python2-devel
    3227
    3328%if 0%{?with_python3}
    3429BuildRequires:  python3-devel
    3530BuildRequires:  python3-setuptools
    36 %if 0%{?with_python3_cssselect}
    37 BuildRequires:  python3-cssselect
    38 %endif
    3931%endif
    4032
    4133%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.
     34lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
     35provides safe and convenient access to these libraries using the ElementTree It
     36extends the ElementTree API significantly to offer support for XPath, RelaxNG,
     37XML Schema, XSLT, C14N and much more.To contact the project, go to the project
     38home page < or see our bug tracker at case you want to use the current ...
    4839
    49 %package docs
    50 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}
     41Summary:        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
     45Provides:       python-%{pypi_name}
    5546
     47%description -n python2-%{pypi_name}
     48lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
     49provides safe and convenient access to these libraries using the ElementTree It
     50extends the ElementTree API significantly to offer support for XPath, RelaxNG,
     51XML Schema, XSLT, C14N and much more.To contact the project, go to the project
     52home page < or see our bug tracker at case you want to use the current ...
    5653
    5754%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
     56Summary:        Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API
    6257Requires:       python3-cssselect
    63 %endif
     58Requires:       python3-html5lib
     59Requires:       python3-beautifulsoup4
     60%{?python_provide:%python_provide python3-%{pypi_name}}
    6461
    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}
     63lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It
     64provides safe and convenient access to these libraries using the ElementTree It
     65extends the ElementTree API significantly to offer support for XPath, RelaxNG,
     66XML Schema, XSLT, C14N and much more.To contact the project, go to the project
     67home page < or see our bug tracker at case you want to use the current ...
    7268%endif
    7369
     
    7571%setup -q -n lxml-%{version}
    7672
    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
     74CFLAGS="%{optflags}" %{__python} setup.py build
    8775
    8876%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
    10678%endif
    10779
    10880%install
    10981%{__python} setup.py install --skip-build --no-compile --root %{buildroot}
    110 #--with-cython
    11182
    11283%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
    11685%endif
    11786
    11887%check
    11988# @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
    12790
    12891%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
    14093%endif
    14194
    14295
    143 %files
     96%files -n python2-%{pypi_name}
    14497%{!?_licensedir:%global license %%doc}
    14598%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
    152103
    153104%if 0%{?with_python3}
    154 %files -n python3-lxml
    155 %license LICENSES.txt
    156 %doc PKG-INFO CREDITS.txt CHANGES.txt
    157 %{python3_sitearch}/lxml-*.egg-info
    158 %{python3_sitearch}/lxml
     105%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
    159110%endif
    160111
    161112%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
    163117- Initial package for version 3.5.0.
Note: See TracChangeset for help on using the changeset viewer.