0.23 & python3
This commit is contained in:
parent
bc9c7c4e90
commit
b1309d714b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
pyxdg-0.19.tar.gz
|
||||
/pyxdg-0.23.tar.gz
|
||||
|
68
pyxdg.spec
68
pyxdg.spec
@ -1,8 +1,12 @@
|
||||
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%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: pyxdg
|
||||
Version: 0.19
|
||||
Release: 5%{?dist}
|
||||
Version: 0.23
|
||||
Release: 1%{?dist}
|
||||
Summary: Python library to access freedesktop.org standards
|
||||
Group: Development/Libraries
|
||||
License: LGPLv2
|
||||
@ -10,22 +14,65 @@ URL: http://freedesktop.org/Software/pyxdg
|
||||
Source0: http://www.freedesktop.org/~lanius/%{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-nose
|
||||
BuildRequires: python2-devel
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
%endif # if with_python3
|
||||
|
||||
%description
|
||||
PyXDG is a python library to access freedesktop.org standards
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-pyxdg
|
||||
Summary: Python3 library to access freedesktop.org standards
|
||||
Group: Development/Libraries
|
||||
|
||||
%description -n python3-pyxdg
|
||||
PyXDG is a python library to access freedesktop.org standards. This
|
||||
package contains a Python 3 version of PyXDG.
|
||||
%endif # with_python3
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
||||
%endif # with_python3
|
||||
|
||||
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
|
||||
|
||||
%build
|
||||
%{__python} setup.py build
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install --skip-build --root=$RPM_BUILD_ROOT
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
%{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT
|
||||
|
||||
%check
|
||||
nosetests
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
nosetests
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
@ -35,7 +82,18 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{python_sitelib}/xdg
|
||||
%{python_sitelib}/pyxdg-*.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-pyxdg
|
||||
%doc AUTHORS COPYING ChangeLog README TODO
|
||||
%{python3_sitelib}/xdg
|
||||
%{python3_sitelib}/pyxdg-*.egg-info
|
||||
%endif #with_python3
|
||||
|
||||
%changelog
|
||||
* Mon Oct 8 2012 Tom Callaway <spot@fedoraproject.org> - 0.23-1
|
||||
- update to 0.23
|
||||
- enable python3
|
||||
|
||||
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user