[packages/python-amqp] fix apidocs build

Jacek Konieczny jajcus at jajcus.net
Mon Nov 30 21:28:18 CET 2015


On 2015-11-30 21:13, Jakub Bogusz wrote:
> On Mon, Nov 30, 2015 at 07:17:21PM +0100, jajcus wrote:
>> commit 8df16ed9ea864060d2f64e4da41c5b7261d4f1ad
>> Author: Jacek Konieczny <jajcus at jajcus.net>
>> Date:   Mon Nov 30 19:16:45 2015 +0100
>>
>>     fix apidocs build
> 
>>  %if %{with doc}
>>  BuildRequires:	python-sphinxcontrib-issuetracker
>> -BuildRequires:	sphinx-pdg
>> +BuildRequires:	sphinx-pdg-2
>>  %endif
>>  %endif
>>  %if %{with python3}
>> @@ -40,6 +40,10 @@ BuildRequires:	python3-mock
>>  BuildRequires:	python3-nose
>>  BuildRequires:	python3-nose-cover3
>>  %endif
>> +%if %{with doc}
>> +BuildRequires:	python3-sphinxcontrib-issuetracker
>> +BuildRequires:	sphinx-pdg-3
>> +%endif
>>  %endif
> 
>> @@ -120,6 +145,12 @@ rm -rf $RPM_BUILD_ROOT
>>  %dir %{py_sitescriptdir}/%{module}/tests
>>  %{py_sitescriptdir}/%{module}/tests/*.py[co]
>>  %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
>> +
>> +%if %{with doc}
>> +%files apidocs
>> +%defattr(644,root,root,755)
>> +%doc docs/.build2/html/*
>> +%endif
>>  %endif
>>  
>>  %if %{with python3}
>> @@ -128,10 +159,10 @@ rm -rf $RPM_BUILD_ROOT
>>  %doc Changelog README.rst
>>  %{py3_sitescriptdir}/%{module}
>>  %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
>> -%endif
>>  
>>  %if %{with doc}
>> -%files apidocs
>> +%files -n python3-%{module}-apidocs
>>  %defattr(644,root,root,755)
>> -%doc docs/.build/html/*
>> +%doc docs/.build3/html/*
>> +%endif
>>  %endif
> 
> Why -apidocs for both python versions?
> Does documentation differ?

It may differ. Python 3 version may have extended API (using the new
features) or one of versions (Python 2 or Python 3) may be not
feature-complete.

Also, it was easier to handle the with_python2/with_python3 bconds.

Jacek


More information about the pld-devel-en mailing list