This patch fixes a problem with the following symptom:
$ sudo yum update python
Loaded plugins: langpacks, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package python.x86_64 0:2.7.5-9.fc20 will be updated
---> Package python.x86_64 0:2.7.5-11.fc20 will be an update
--> Processing Dependency: python-libs(x86-64) = 2.7.5-11.fc20 for package: python-2.7.5-11.fc20.x86_64
--> Running transaction check
---> Package python-libs.x86_64 0:2.7.5-9.fc20 will be updated
---> Package python-libs.x86_64 0:2.7.5-11.fc20 will be an update
--> Processing Dependency: /bin/python for package: bmap-tools-3.2-1.15.1.noarch
--> Finished Dependency Resolution
Error: Package: bmap-tools-3.2-1.15.1.noarch (@tools)
Requires: /bin/python
Removing: python-2.7.5-9.fc20.x86_64 (@fedora)
Not found
Updated By: python-2.7.5-11.fc20.x86_64 (updates)
Not found
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
This happened on a Fedora system, which had the bmap-tools package installed,
and where I tried to update the python package.
The RPM build logs had this:
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /bin/python python(abi) = 2.7
So there was a "/bin/python" requirement.
The theory is that "python.x86_64 0:2.7.5-9.fc20" had "Provides: /bin/python",
but this line was removed in "python.x86_64 0:2.7.5-11.fc20". But I did not
check this theory.
And the other theory is that rpm build picks "/bin/python" instead of
"/usr/bin/python" simply because "/bin" goes first in the PATH environment
variable in the build root environment.
Fedora says that the right way to call 'setpu.py' is
%{__python} setup.py
see https://fedoraproject.org/wiki/Packaging:Python,
and this is what this patch does.
Change-Id: I58460f724c16ea99bad70f572698a540fc400942
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
%install
rm -rf %{buildroot}
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}/%{_mandir}/man1
install -m644 docs/man1/bmaptool.1 %{buildroot}/%{_mandir}/man1