commit 20b1c3b03aae87606fda274b05fb5bea7df1463c Author: Elan Ruusamäe <g...@delfi.ee> Date: Sun Oct 16 20:42:42 2016 +0300
new, version 0.16 created with pyp2rpm-3.1.3 python-gitlab.spec | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) --- diff --git a/python-gitlab.spec b/python-gitlab.spec new file mode 100644 index 0000000..16c063f --- /dev/null +++ b/python-gitlab.spec @@ -0,0 +1,101 @@ +# +# Conditional build: +%bcond_with doc # don't build doc +%bcond_with tests # do not perform "make test" +%bcond_without python2 # CPython 2.x module +%bcond_without python3 # CPython 3.x module + +%define module gitlab +%define egg_name python_gitlab +%define pypi_name python-gitlab +Summary: Interact with GitLab API +Name: python-gitlab +Version: 0.16 +Release: 1 +License: LGPLv3 +Group: Libraries/Python +Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +# Source0-md5: e0421d930718021e7d796d74d2ad7194 +URL: https://github.com/gpocentek/python-gitlab +BuildRequires: rpm-pythonprov +BuildRequires: rpmbuild(macros) >= 1.714 +%if %{with python2} +BuildRequires: python-devel +BuildRequires: python-setuptools +BuildRequires: sphinx-pdg +%endif +%if %{with python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +Interact with GitLab API + +%package -n python3-gitlab +Summary: Interact with GitLab API +Group: Libraries/Python + +%description -n python3-gitlab +Interact with GitLab API + +%prep +%setup -q + +# Remove bundled egg-info +%{__rm} -r %{module}.egg-info + +%build +%if %{with python2} +%py_build %{?with_tests:test} + +%if %{with doc} +sphinx-build-2 docs html +%{__rm} -r html/.{doctrees,buildinfo} +%endif +%endif + +%if %{with python3} +%py3_build %{?with_tests:test} + +%if %{with doc} +sphinx-build-3 docs html +%{__rm} -r html/.{doctrees,buildinfo} +%endif +%endif + +%install +rm -rf $RPM_BUILD_ROOT +%if %{with python2} +%py_install +%py_postclean +mv $RPM_BUILD_ROOT%{_bindir}/gitlab $RPM_BUILD_ROOT%{_bindir}/gitlab-2 +%endif + +%if %{with python3} +%py3_install +mv $RPM_BUILD_ROOT%{_bindir}/gitlab $RPM_BUILD_ROOT%{_bindir}/gitlab-3 +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + +%if %{with python2} +%files +%defattr(644,root,root,755) +%doc README.rst +%attr(755,root,root) %{_bindir}/gitlab-2 +%{py_sitescriptdir}/%{module} +%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info +%endif + +%if %{with python3} +%files -n python3-gitlab +%defattr(644,root,root,755) +%doc README.rst +%attr(755,root,root) %{_bindir}/gitlab-3 +%{py3_sitescriptdir}/%{module} +%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info +%endif ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/python-gitlab.git/commitdiff/20b1c3b03aae87606fda274b05fb5bea7df1463c _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit