diff options
author | Ken Dreyer <ktdreyer@ktdreyer.com> | 2014-11-11 13:26:58 -0700 |
---|---|---|
committer | Ken Dreyer <ktdreyer@ktdreyer.com> | 2014-11-11 13:26:58 -0700 |
commit | fe7e118f02382b5be6cb54f30ecf0759f85af7d4 (patch) | |
tree | 05f328793cf935085065a9dca69568e5392c8426 | |
parent | ee2729b010bb566113d4a81110f96e7a2e61b719 (diff) | |
download | python-jenkins-v0.4.1-ktdreyer.tar.gz python-jenkins-v0.4.1-ktdreyer.tar.xz python-jenkins-v0.4.1-ktdreyer.zip |
Update to python-jenkins 0.4.1 (RHBZ #1162743)v0.4.1-ktdreyer
-rw-r--r-- | python-jenkins.spec | 120 |
1 files changed, 103 insertions, 17 deletions
diff --git a/python-jenkins.spec b/python-jenkins.spec index 0fa3638..d409646 100644 --- a/python-jenkins.spec +++ b/python-jenkins.spec @@ -1,53 +1,139 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +%if 0%{?fedora} +%global with_python3 1 +%{!?python3_version: %global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")} +%endif + +%define srcname python-jenkins + Name: python-jenkins -Version: 0.2.1 -Release: 2%{?dist} +Version: 0.4.1 +Release: 1%{?dist} Summary: Python bindings for the remote Jenkins API Group: Development/Libraries License: BSD -URL: http://launchpad.net/python-jenkins -Source0: https://launchpad.net/%{name}/0.2/%{version}/+download/%{name}-%{version}.tar.gz +URL: http://ci.openstack.org/python-jenkins/ +Source0: http://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python2-devel +BuildRequires: python-devel >= 2.6 +BuildRequires: python-coverage >= 3.6 +BuildRequires: python-coverage BuildRequires: python-mock -BuildRequires: python-nose BuildRequires: python-sphinx -Requires: python2 +BuildRequires: python-six +# Newer PBR is not available. +#BuildRequires: python-pbr >= 0.8.2 +#BuildRequires: python-pbr < 1.0 +BuildRequires: git +%if 0%{?with_python3} +BuildRequires: python3-devel >= 3.1 +BuildRequires: python3-coverage >= 3.6 +BuildRequires: python3-coverage +BuildRequires: python3-mock +BuildRequires: python3-sphinx +BuildRequires: python3-six +# Newer PBR is not available. +#BuildRequires: python3-pbr >= 0.8.2 +#BuildRequires: python3-pbr < 1.0 +%endif # with_python3 %description Python Jenkins is a library for the remote API of the Jenkins continuous integration server. It is useful for creating and managing jobs as well as build nodes. +%if 0%{?with_python3} +%package -n python3-jenkins +Summary: Python bindings for the remote Jenkins API +Group: Development/Languages +Requires: python3 >= 3.1 + +%description -n python3-jenkins +Python Jenkins is a library for the remote API of the Jenkins continuous +integration server. It is useful for creating and managing jobs as well as +build nodes. +%endif # with_python3 + %prep -%setup -q +%setup -q -n %{srcname}-%{version} # Remove env from __init__.py sed -i '/^#!\/usr\/bin\/env python$/d' jenkins/__init__.py +# Remove pbr as a dependency +sed -i requirements.txt -e '/^pbr/d' +sed -i jenkins/version.py \ + -e '/^version_info/d' \ + -e '/pbr/d' +echo "version_info = (0, 4, 1)" >> jenkins/version.py + +# Loosen sphinx version dependency +sed -i test-requirements.txt -e 's/^sphinx>=1.1.2,<1.2/sphinx/' + +# Remove testrepository as a dependency +sed -i test-requirements.txt -e '/^testrepository/d' + +%if 0%{?with_python3} +cp -a . %{py3dir} +%endif # with_python3 + %build -%{__python2} setup.py build +%{__python} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # with_python3 + pushd doc -make html man +# The following make command fails due to a problem with PBR needing Git (and +# possibly conf.py being too old?) +make html man || : rm -f build/html/.buildinfo popd %install -%{__python2} setup.py install --skip-build --root %{buildroot} -install -D -m0644 doc/build/man/pythonjenkins.1 %{buildroot}%{_mandir}/man1/pythonjenkins.1 +%{__python} setup.py install -O1 --skip-build --root %{buildroot} + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +popd +%endif + +# The "make man" command fails, so we don't have a man page (see %%build above) +#install -D -m0644 doc/build/man/pythonjenkins.1 %{buildroot}%{_mandir}/man1/pythonjenkins.1 %check -PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests -w tests +%{__python2} setup.py test + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py test +popd +%endif # with_python3 + +#PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests -w tests %files -%doc COPYING doc/build/html -%{python2_sitelib}/jenkins -%{python2_sitelib}/python_jenkins-%{version}-py?.?.egg-info -%{_mandir}/man1/pythonjenkins.1.gz +%doc COPYING +%{python_sitelib}/* +#{_mandir}/man1/pythonjenkins.1.gz + +%if 0%{?with_python3} +%files -n python3-jenkins +%{python3_sitelib}/* +%endif # with_python3 %changelog +* Tue Nov 11 2014 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.4.1-1 +- Update to python-jenkins 0.4.1 (RHBZ #1162743) + * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild |