Python Wheels in fedora
Starting with Fedora 22, Python packages will install itself into buildroot via Python wheels[1]. Wheels are the new binary distribution format for python modules, note that as such they are not suitable for use as Source archive. The text below describes the minimal specfile changes needed.
( also mention the rewheel patch )
BuildRequires
Packages should now Buildrequire python-pip and python-wheel:
BuildRequires: python-pip BuildRequires: python-wheel
Build section
Packages should now use the bdist_wheel command, instead of install, a minimal build section thus becomes:
%{__python2} setup.py bdist_wheel %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py bdist_wheel popd %endif
Install section
Packages should now use pip to install themselves, a minimal install section thus becomes:
( mention strip-file-prefix )
%if 0%{?with_python3} pushd %{py3dir} pip3 install -I dist/%{python3_wheelname} --root %{buildroot} --strip-file-prefix popd %endif pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefix
Files section
You may need to add the following entries to the files section:
%{python2_sitelib}/%{name}-%{version}.dist-info/ %{python3_sitelib}/%{name}-%{version}.dist-info/