writing "PBR_VERSION=X.Y.Z" to fix build error:
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository.
It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to
pbr.version.VersionInfo. Project name jenkinsapi was given, but was not able to be found
Change-Id: Ifbabf252febcdabd1d35f384da528730399ae45f
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
Url: https://github.com/salimfadhley/jenkinsapi
Source: https://pypi.python.org/packages/source/j/jenkinsapi/jenkinsapi-%{version}.tar.gz
Url: https://github.com/salimfadhley/jenkinsapi
Source: https://pypi.python.org/packages/source/j/jenkinsapi/jenkinsapi-%{version}.tar.gz
-BuildRequires: python-setuptools
+BuildRequires: python3-setuptools
+BuildRequires: python3-pytz
+BuildRequires: python3-pbr
%if 0%{?suse_version} || 0%{?fedora}
%if 0%{?suse_version} || 0%{?fedora}
-BuildRequires: python-requests
-Requires: python-requests
+BuildRequires: python3-requests
+Requires: python3-requests
%endif
%if 0%{?fedora} || 0%{?centos_ver}
Requires: pytz
%else
%endif
%if 0%{?fedora} || 0%{?centos_ver}
Requires: pytz
%else
+PBR_VERSION=X.Y.Z python3 setup.py build
%if 0%{?fedora} == 23
cp -f find-debuginfo.sh /usr/lib/rpm/find-debuginfo.sh
%endif
%install
%if 0%{?fedora} == 23
cp -f find-debuginfo.sh /usr/lib/rpm/find-debuginfo.sh
%endif
%install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+PBR_VERSION=X.Y.Z python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
%files
%defattr(-,root,root,-)
%doc README.rst
%{_bindir}/*
%files
%defattr(-,root,root,-)
%doc README.rst
%{_bindir}/*
- setup_requires=['pbr'],
+ setup_requires=['pbr>=2.0.0'],