]> git.pld-linux.org Git - packages/python-msgpack.git/blobdiff - python-msgpack.spec
- updated dependencies, actually run tests
[packages/python-msgpack.git] / python-msgpack.spec
index 01490e66938b209d356d80239aa1ffd75eecfbe0..6f42c6b03820d53aa9d7237abe76d060eea86f9f 100644 (file)
@@ -1,35 +1,34 @@
 #
 # Conditional build:
-## %bcond_with doc             # don't build doc
-%bcond_without tests   # do not perform "make test"
+%bcond_without tests   # unit tests
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
-%define        module  msgpack
+%define                module          msgpack
+%define                pypi_name       msgpack-python
 Summary:       Binary-based efficient data interchange format
-Summary(pl.UTF-8):     Binarny efektywny format wymiany danych.
+Summary(pl.UTF-8):     Binarny, efektywny format wymiany danych
 Name:          python-%{module}
-Version:       0.4.5
-Release:       4
-License:       ASL
+Version:       1.0.0
+Release:       1
+License:       Apache v2.0
 Group:         Development/Languages/Python
-Source0:       http://pypi.python.org/packages/source/m/msgpack-python/msgpack-python-%{version}.tar.gz
-# Source0-md5: 3b82bc542d5599896695512e7c32f42d
+Source0:       https://pypi.debian.net/msgpack/%{module}-%{version}.tar.gz
+# Source0-md5: c35ee8f991dad3969884e9585e56ebba
 URL:           http://msgpack.org/
+BuildRequires: libstdc++-devel
 BuildRequires: rpm-pythonprov
-# if py_postclean is used
-BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: rpmbuild(macros) >= 1.714
 %if %{with python2}
-BuildRequires: python-devel
-BuildRequires: python-distribute
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
 %endif
 %if %{with python3}
-BuildRequires: python3-devel
-BuildRequires: python3-distribute
+BuildRequires: python3-devel >= 1:3.5
 BuildRequires: python3-modules
+BuildRequires: python3-setuptools
 %endif
-Requires:      python-modules
-
+Requires:      python-modules >= 1:2.7
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -38,15 +37,16 @@ It enables to exchange structured objects between many languages like
 JSON. But unlike JSON, it is very fast and small.
 
 %description -l pl.UTF-8
-MessagePack jest binarną, efektywną biblioteką serializacji obiektów.
-Pozwala wymieniać strukturalne obiekty pomiędzy wieloma językami
-podobnie jak JSON. W odróżnieniu jest bardzo szybka i mała.
+MessagePack to biblioteka do binarnej, efektywnej serializacji
+obiektów. Pozwala wymieniać strukturalne obiekty pomiędzy wieloma
+językami, podobnie jak JSON. W odróżnieniu od JSON-a jest bardzo
+szybka i mała.
 
 %package -n python3-%{module}
-Summary:       -
-Summary(pl.UTF-8):     -
+Summary:       Binary-based efficient data interchange format
+Summary(pl.UTF-8):     Binarny, efektywny format wymiany danych
 Group:         Libraries/Python
-Requires:      python3-modules
+Requires:      python3-modules >= 1:3.5
 
 %description -n python3-%{module}
 MessagePack is a binary-based efficient object serialization library.
@@ -54,37 +54,29 @@ It enables to exchange structured objects between many languages like
 JSON. But unlike JSON, it is very fast and small.
 
 %description -n python3-%{module} -l pl.UTF-8
-MessagePack jest binarną, efektywną biblioteką serializacji obiektów.
-Pozwala wymieniać strukturalne obiekty pomiędzy wieloma językami
-podobnie jak JSON. W odróżnieniu jest bardzo szybka i mała.
-
-%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}.
+MessagePack to biblioteka do binarnej, efektywnej serializacji
+obiektów. Pozwala wymieniać strukturalne obiekty pomiędzy wieloma
+językami, podobnie jak JSON. W odróżnieniu od JSON-a jest bardzo
+szybka i mała.
 
 %prep
-%setup -q -n msgpack-python-%{version}
+%setup -q -n %{module}-%{version}
 
 %build
 %if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+%{__python} -m pytest test
+%endif
 %endif
 
 %if %{with python3}
-%py3_build %{?with_tests:test}
-%endif
+%py3_build
 
-%if %{with doc}
-cd docs
-%{__make} -j1 html
-rm -rf _build/html/_sources
+%if %{with tests}
+%{__python3} -m pytest test
+%endif
 %endif
 
 %install
@@ -106,30 +98,19 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc COPYING README.rst
-%dir %{py_sitedir}/%{module}
-%{py_sitedir}/%{module}/*.py[co]
-%attr(755,root,root) %{py_sitedir}/%{module}/_packer.so
-%attr(755,root,root) %{py_sitedir}/%{module}/_unpacker.so
-%if "%{py_ver}" > "2.4"
-%{py_sitedir}/msgpack_python-%{version}-py*.egg-info
-%endif
+%doc COPYING README.md
+%dir %{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{module}/*.py[co]
+%{py_sitescriptdir}/msgpack-%{version}-py*.egg-info
 %endif
 
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc COPYING README.rst
+%doc COPYING README.md
 %dir %{py3_sitedir}/%{module}
-%attr(755,root,root) %{py3_sitedir}/%{module}/_packer.cpython-*.so
-%attr(755,root,root) %{py3_sitedir}/%{module}/_unpacker.cpython-*.so
+%attr(755,root,root) %{py3_sitedir}/%{module}/_cmsgpack.cpython-*.so
 %{py3_sitedir}/%{module}/*.py
 %{py3_sitedir}/%{module}/__pycache__
-%{py3_sitedir}/msgpack_python-%{version}-py*.egg-info
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc docs/_build/html/*
+%{py3_sitedir}/msgpack-%{version}-py*.egg-info
 %endif
This page took 0.06062 seconds and 4 git commands to generate.