Fix FTBFS (#1605627)
- modernize/simplify a bit - sphinx by python3 - run tests again, but using the stuff we put into buildroot - disable float tests on ppc64le (#1552724) - BR gcc for build and gcc-c++ for tests - be more explicit in %files - enable Python dependency generator
This commit is contained in:
parent
43342dbda7
commit
dabc32b2d6
100
python-cffi.spec
100
python-cffi.spec
@ -1,33 +1,18 @@
|
|||||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
|
||||||
%global with_python3 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: python-cffi
|
Name: python-cffi
|
||||||
Version: 1.11.5
|
Version: 1.11.5
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Foreign Function Interface for Python to call C code
|
Summary: Foreign Function Interface for Python to call C code
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://cffi.readthedocs.org/
|
URL: http://cffi.readthedocs.org/
|
||||||
Source0: https://pypi.io/packages/source/c/cffi/cffi-%{version}.tar.gz
|
Source0: %pypi_source cffi
|
||||||
|
|
||||||
BuildRequires: libffi-devel python2-sphinx
|
BuildRequires: libffi-devel
|
||||||
#BuildRequires: python2-pytest python3-pytest
|
BuildRequires: gcc
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python2-setuptools
|
|
||||||
BuildRequires: python2-Cython
|
|
||||||
BuildRequires: python2-pycparser
|
|
||||||
BuildRequires: python2-pytest
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: python3-setuptools
|
|
||||||
BuildRequires: python3-Cython
|
|
||||||
BuildRequires: python3-pycparser
|
|
||||||
BuildRequires: python3-pytest
|
|
||||||
%endif # if with_python3
|
|
||||||
|
|
||||||
# Do not check .so files in the python_sitelib directory
|
# For tests:
|
||||||
# or any files in the application's directory for provides
|
BuildRequires: gcc-c++
|
||||||
%global __provides_exclude_from ^(%{python_sitearch}|%{python3_sitearch})/.*\\.so$
|
|
||||||
|
%?python_enable_dependency_generator
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Foreign Function Interface for Python, providing a convenient and
|
Foreign Function Interface for Python, providing a convenient and
|
||||||
@ -36,8 +21,12 @@ based on LuaJIT’s FFI.
|
|||||||
|
|
||||||
%package -n python2-cffi
|
%package -n python2-cffi
|
||||||
Summary: Foreign Function Interface for Python 3 to call C code
|
Summary: Foreign Function Interface for Python 3 to call C code
|
||||||
Requires: python2-pycparser
|
BuildRequires: python2-pytest
|
||||||
Obsoletes: python-cffi <= 1.4.2-1
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
|
BuildRequires: python2-Cython
|
||||||
|
BuildRequires: python2-pycparser
|
||||||
|
BuildRequires: python2-pytest
|
||||||
%{?python_provide:%python_provide python2-cffi}
|
%{?python_provide:%python_provide python2-cffi}
|
||||||
|
|
||||||
%description -n python2-cffi
|
%description -n python2-cffi
|
||||||
@ -45,71 +34,76 @@ Foreign Function Interface for Python, providing a convenient and
|
|||||||
reliable way of calling existing C code from Python. The interface is
|
reliable way of calling existing C code from Python. The interface is
|
||||||
based on LuaJIT’s FFI.
|
based on LuaJIT’s FFI.
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%package -n python3-cffi
|
%package -n python3-cffi
|
||||||
Summary: Foreign Function Interface for Python 3 to call C code
|
Summary: Foreign Function Interface for Python 3 to call C code
|
||||||
Requires: python3-pycparser
|
BuildRequires: python3-sphinx
|
||||||
|
BuildRequires: python3-pytest
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-Cython
|
||||||
|
BuildRequires: python3-pycparser
|
||||||
|
BuildRequires: python3-pytest
|
||||||
%{?python_provide:%python_provide python3-cffi}
|
%{?python_provide:%python_provide python3-cffi}
|
||||||
|
|
||||||
%description -n python3-cffi
|
%description -n python3-cffi
|
||||||
Foreign Function Interface for Python, providing a convenient and
|
Foreign Function Interface for Python, providing a convenient and
|
||||||
reliable way of calling existing C code from Python. The interface is
|
reliable way of calling existing C code from Python. The interface is
|
||||||
based on LuaJIT’s FFI.
|
based on LuaJIT’s FFI.
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for CFFI
|
Summary: Documentation for CFFI
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Requires: python2-cffi = %{version}-%{release}
|
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
Documentation for CFFI, the Foreign Function Interface for Python.
|
Documentation for CFFI, the Foreign Function Interface for Python.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n cffi-%{version}
|
%autosetup -n cffi-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_build
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%py2_build
|
%py2_build
|
||||||
|
%py3_build
|
||||||
|
|
||||||
cd doc
|
cd doc
|
||||||
make html
|
make SPHINXBUILD=sphinx-build-3 html
|
||||||
rm build/html/.buildinfo
|
rm build/html/.buildinfo
|
||||||
|
|
||||||
#Tests fail but only in mock.
|
|
||||||
#%check
|
|
||||||
#%{__python3} setup_base.py build_ext -f -i
|
|
||||||
#PYTHONPATH=build/lib.linux-* py.test-3 c/ testing/
|
|
||||||
|
|
||||||
#%{__python2} setup_base.py build_ext -f -i
|
|
||||||
#PYTHONPATH=build/lib.linux-* py.test c/ testing/
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if 0%{?with_python3}
|
%py2_install
|
||||||
%py3_install \
|
%py3_install
|
||||||
--record %{buildroot}%{python3_sitearch}/cffi-%{version}-py%{python3_version}.egg-info/installed-files.txt
|
|
||||||
%endif # with_python3
|
%check
|
||||||
%py2_install \
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1552724
|
||||||
--record %{buildroot}%{python2_sitearch}/cffi-%{version}-py%{python2_version}.egg-info/installed-files.txt
|
%ifarch ppc64le
|
||||||
|
k="not test_float and not test_complex_types"
|
||||||
|
%else
|
||||||
|
k=""
|
||||||
|
%endif
|
||||||
|
|
||||||
|
PYTHONPATH=%{buildroot}%{python2_sitearch} %{__python2} -m pytest -k "$k" c/ testing/
|
||||||
|
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest -k "$k" c/ testing/
|
||||||
|
|
||||||
%files -n python2-cffi
|
%files -n python2-cffi
|
||||||
%doc PKG-INFO
|
%doc PKG-INFO
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python2_sitearch}/*
|
%{python2_sitearch}/cffi/
|
||||||
|
%{python2_sitearch}/_cffi_backend.so
|
||||||
|
%{python2_sitearch}/cffi-%{version}-py%{python2_version}.egg-info/
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%files -n python3-cffi
|
%files -n python3-cffi
|
||||||
%doc PKG-INFO
|
%doc PKG-INFO
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python3_sitearch}/*
|
%{python3_sitearch}/cffi/
|
||||||
%endif # with_python3
|
%{python3_sitearch}/_cffi_backend.*.so
|
||||||
|
%{python3_sitearch}/cffi-%{version}-py%{python3_version}.egg-info/
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%doc doc/build/html
|
%doc doc/build/html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 22 2018 Miro Hrončok <mhroncok@redhat.com> - 1.11.5-6
|
||||||
|
- Fix FTBFS (#1605627)
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.5-5
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.5-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user