Accepting request 611912 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/611912
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blosc?expand=0&rev=9
This commit is contained in:
Dominique Leuenberger 2018-05-29 08:43:23 +00:00 committed by Git OBS Bridge
parent f2d716f0c4
commit 9c3d0c7e95
2 changed files with 26 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 24 16:51:14 UTC 2018 - toddrme2178@gmail.com
- Python files were not getting included.
- Enable unit tests
-------------------------------------------------------------------
Sun Jan 21 05:33:31 UTC 2018 - toddrme2178@gmail.com

View File

@ -26,16 +26,21 @@ Group: Development/Languages/Python
Url: http://www.blosc.org/
Source: https://files.pythonhosted.org/packages/source/b/blosc/blosc-%{version}.tar.gz
BuildRequires: blosc-devel
BuildRequires: gcc-c++
BuildRequires: c++_compiler
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module numpy-devel}
# SECTION test requirements
BuildRequires: %{python_module nose}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module psutil}
# /SECTION
Requires: blosc-devel
Requires: python-numpy
ExclusiveArch: %ix86 x86_64
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
@ -48,14 +53,26 @@ Python.
%build
export CFLAGS="%{optflags}"
%python_exec setup.py build_ext --inplace --blosc=%{_prefix}
%python_exec setup.py build --blosc=%{_prefix}
%install
%python_exec setup.py install -O1 --skip-build --force --root=%{buildroot} --prefix=%{_prefix} --blosc=%{_prefix}
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
mkdir empty
pushd empty
%{python_expand export PYTHONDONTWRITEBYTECODE=1
export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python -c "import blosc; blosc.print_versions()"
nosetests-%{$python_bin_suffix} blosc
}
popd
%files %{python_files}
%defattr(-,root,root,-)
%doc ANNOUNCE.rst README.rst LICENSES/*.txt RELEASE_NOTES.rst
%doc ANNOUNCE.rst README.rst RELEASE_NOTES.rst
%license LICENSES/*.txt
%{python_sitearch}/blosc-%{version}-py*.egg-info
%{python_sitearch}/blosc/