diff --git a/.gitignore b/.gitignore index e69de29..8036e23 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pyLibravatar-1.5.tar.gz diff --git a/python-pylibravatar.spec b/python-pylibravatar.spec new file mode 100644 index 0000000..4c39ceb --- /dev/null +++ b/python-pylibravatar.spec @@ -0,0 +1,106 @@ +%if 0%{?fedora} +# It looks like pyLibravatar doesn't currently support python3, +# but when upstream does, we should be able to flip this bit to +# turn on packaging of python3-pylibravatar. +%global with_python3 0 +%endif + +%global eggname pyLibravatar +%global modname libravatar + +Name: python-pylibravatar +Version: 1.5 +Release: 2%{?dist} +Summary: Python module for Libravatar + +Group: Development/Libraries +# The full text of the license isn't shipped +# https://bugs.launchpad.net/pylibravatar/+bug/1173603 +License: MIT +URL: http://pypi.python.org/pypi/pyLibravatar +Source0: http://pypi.python.org/packages/source/p/%{eggname}/%{eggname}-%{version}.tar.gz + +BuildArch: noarch + + +BuildRequires: python2-devel +BuildRequires: python-pydns + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-pydns +%endif + +Requires: python-pydns + +%description +PyLibravatar is an easy way to make use of the federated Libravatar +avatar hosting service from within your Python applications. + +%if 0%{?with_python3} +%package -n python3-pylibravatar +Summary: Python module for Libravatar +Group: Development/Libraries + +Requires: python3-pydns + +%description -n python3-pylibravatar +PyLibravatar is an easy way to make use of the federated Libravatar +avatar hosting service from within your Python applications. +%endif + +%prep +%setup -q -n %{eggname}-%{version} + +# Correct wrong-file-end-of-line-encoding rpmlint issue +sed -i 's/\r//' README.txt +sed -i 's/\r//' Changelog.txt + +# Remove bundled egg-info in case it exists +rm -rf %{eggname}.egg-info +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif + +%build +%{__python} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif + +%install +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root=%{buildroot} +popd +%endif +%{__python} setup.py install -O1 --skip-build --root=%{buildroot} + +%files +# Upstream doesn't ship the license full text +# https://bugs.launchpad.net/pylibravatar/+bug/1173603 +%doc README.txt Changelog.txt +%{python_sitelib}/%{modname}.py* +%{python_sitelib}/%{eggname}-%{version}* + +%if 0%{?with_python3} +%files -n python3-pylibravatar +# Upstream doesn't ship the license full text +# https://bugs.launchpad.net/pylibravatar/+bug/1173603 +%doc README.rst LICENSE +%{python3_sitelib}/%{modname}.py +%{python3_sitelib}/__pycache__/*%{modname}* +%{python3_sitelib}/%{eggname}-%{version}-* +%endif + +%changelog +* Mon Jul 01 2013 Ralph Bean - 1.5-2 +- Correct wrong-file-end-of-line-encoding rpmlint issue. + +* Sat Apr 27 2013 Ralph Bean - 1.5-1 +- Initial packaging for Fedora. +- There is no test suite at this point. +- Upstream doesn't seem to ship the license full text at this point. diff --git a/sources b/sources index e69de29..69863b7 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +dc927e0b37eee14998b1617e90c7bd3b pyLibravatar-1.5.tar.gz