diff --git a/python-jsonpath-rw.spec b/python-jsonpath-rw.spec index fd3d41d..85bdc04 100644 --- a/python-jsonpath-rw.spec +++ b/python-jsonpath-rw.spec @@ -1,32 +1,24 @@ +%global pkgname jsonpath-rw %if 0%{?fedora} > 12 %global with_python3 1 %else %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif -Name: python-jsonpath-rw +Name: python-%{pkgname} Version: 1.2.3 Release: 1%{?dist} Summary: Extended implementation of JSONPath for Python License: ASL 2.0 URL: https://github.com/kennknowles/python-jsonpath-rw -Source0: https://github.com/kennknowles/python-jsonpath-rw/archive/%version.tar.gz +Source0: https://github.com/kennknowles/python-jsonpath-rw/archive/%{version}.tar.gz BuildArch: noarch BuildRequires: python-devel, python-setuptools Requires: python-ply Requires: python-decorator Requires: python-six -Provides: python-jsonpath-rw = %{version}-%{release} - -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -Requires: python3-ply -Requires: python3-decorator -Requires: python3-six -%endif %description @@ -39,11 +31,16 @@ language implementation, meaning the JSONPath expressions are first class objects, easy to analyze, transform, parse, print, and extend. %if 0%{?with_python3} -%package -n python3-jsonpath-rw +%package -n python3-%{pkgname} Summary: Extended implementation of JSONPath for Python Group: Development/Libraries +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-ply +Requires: python3-decorator +Requires: python3-six -%description -n python3-jsonpath-rw +%description -n python3-%{pkgname} This library provides a robust and significantly extended implementation of JSONPath for Python, with a clear AST for meta-programming. It is tested with @@ -55,6 +52,13 @@ objects, easy to analyze, transform, parse, print, and extend. %endif +%package doc +Summary: Documentation for %{name} +BuildArch: noarch + +%description doc +Documentation for %{name}. + %prep %setup -q @@ -80,8 +84,6 @@ cp -a . %{py3dir} %install -rm -rf $RPM_BUILD_ROOT - %if 0%{?rhel} %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %else @@ -95,17 +97,14 @@ pushd %{py3dir} popd %endif - - %files -%doc +%doc README.rst LICENSE %{python_sitelib}/* -%if 0%{?with_python3} -%{python3_sitelib} -%endif +%files -n python3-%{pkgname} +%doc README.rst LICENSE +%{python3_sitelib}/* %changelog - -* Thu Dec 19 2013 Steve Linabery - 1.2.3-1 +* Thu Jan 02 2014 Steve Linabery - 1.2.3-1 - Initial packaging for Fedora