[Bug 1547757] Review Request: python-molecule - Molecule is designed to aid in the development and testing of Ansible roles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1547757

Robert-André Mauchin <zebob.m@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zebob.m@xxxxxxxxx



--- Comment #1 from Robert-André Mauchin <zebob.m@xxxxxxxxx> ---
 - Not needed:

rm -rf $RPM_BUILD_ROOT

 - You need to build the documentation with sphinx-build

%if %{with python3}
BuildRequires:  python3-sphinx
%else
BuildRequires:  python2-sphinx
%endif # with python3

   And:

# generate html docs 
PYTHONPATH=. sphinx-build doc/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

   One package is missing for it to be successful, python-tree_format:
https://pypi.python.org/pypi/tree-format

   Package it then add it to the dependencies list:

# doc
BuildRequires:  python2-sh
BuildRequires:  python2-anyconfig
BuildRequires:  python2-colorama
BuildRequires:  python2-tree_format

%if %{with python3}
BuildRequires:  python3-devel
BuildRequires:  python3-pbr
BuildRequires:  python3-setuptools

# doc
BuildRequires:  python3-sh
BuildRequires:  python3-anyconfig
BuildRequires:  python3-colorama
BuildRequires:  python3-tree_format

 - I think I already told you that, but you don't need to separate python 2 and
python 3 in separate directories:

%prep
%autosetup -n %{pkgname}-%{version}
sed -i 's/yamllint==1.8.1/yamllint==1.10.0/' requirements.txt

%build
%{setup_flags} %{py2_build}

%if %{with python3}
%{setup_flags} %{py3_build}
%endif # with python3

# generate html docs 
PYTHONPATH=. sphinx-build doc/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%install
# Must do the python3 install first because the scripts in /usr/bin are
# overwritten with every setup.py install (and we want the python2 version
# to be the default for now).
%if %{with python3}
%{setup_flags} %{py3_install}
%endif # with python3

%{setup_flags} %{py2_install}

%files -n python2-%{pkgname}
%license LICENSE
%doc html *.rst
%{python2_sitelib}/%{pkgname}
%{python2_sitelib}/%{pkgname}-%{version}-py?.?.egg-info

%if %{with python3}
%files -n python3-%{pkgname}
%license LICENSE
%doc html *.rst
%{python3_sitelib}/%{pkgname}
%{python3_sitelib}/%{pkgname}-%{version}-py?.?.egg-info
%endif # with python3
%{_bindir}/%{pkgname}


 - Why %{_bindir}/%{pkgname} included in the python3 package? This seems
curious to have a python3 package with only the binary. I would do:

%files -n python2-%{pkgname}
%license LICENSE
%doc html *.rst
%{python2_sitelib}/%{pkgname}
%{python2_sitelib}/%{pkgname}-%{version}-py?.?.egg-info
%if %{without python3}
%{_bindir}/%{pkgname}
%endif # without python3

%if %{with python3}
%files -n python3-molecule
%license LICENSE
%doc html *.rst
%{python3_sitelib}/%{pkgname}
%{python3_sitelib}/%{pkgname}-%{version}-py?.?.egg-info
%{_bindir}/%{pkgname}
%endif # with python3

 - You should also run the tests provided when you have managed to gather all
dependencies.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux