[packages/python-jira: 1/2] new, version 1.0.7
glen
glen at pld-linux.org
Tue Jun 20 21:51:48 CEST 2017
commit 2d941b5c5500cf3513c0ab7e639a19d6f8fc9733
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Tue Jun 20 22:49:01 2017 +0300
new, version 1.0.7
based on fedora package, 2f9cc2b
python-jira.spec | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 117 insertions(+)
---
diff --git a/python-jira.spec b/python-jira.spec
new file mode 100644
index 0000000..148af54
--- /dev/null
+++ b/python-jira.spec
@@ -0,0 +1,117 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define module jira
+%define pypi_name jira
+%define egg_name jira
+Summary: A library to ease use of the JIRA 5 REST APIs
+Name: python-%{pypi_name}
+Version: 1.0.7
+Release: 1
+License: BSD
+Group: Libraries/Python
+Source0: https://files.pythonhosted.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+# Source0-md5: cb1d3f1e1b7a388932ad5d961bf2c56d
+URL: https://pypi.io/project/jira
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: sed >= 4.0
+%if %{with python3}
+BuildRequires: python-devel
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%endif
+Requires: python-ipython-console
+Requires: python-magic
+Requires: python-six
+Requires: python2-requests
+Requires: python2-requests-oauthlib
+Requires: python2-requests-toolbelt
+Requires: python2-tlslite
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A library to ease use of the JIRA 5 REST APIs.
+
+%package -n python3-%{pypi_name}
+Summary: %{summary}
+Group: Libraries/Python
+Requires: python3-ipython-console
+Requires: python3-magic
+Requires: python3-requests
+Requires: python3-requests-oauthlib
+Requires: python3-requests-toolbelt
+Requires: python3-six
+Requires: python3-tlslite
+
+%description -n python3-%{pypi_name}
+A library to ease use of the JIRA 5 REST APIs.
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+
+sed -i 's/tools.jirashell/jira.tools.jirashell/g' setup.py
+sed -i "s/'ordereddict'//" setup.py
+
+# Remove bundled egg-info in case it exists
+rm -r %{pypi_name}.egg-info
+
+# Remove shebang in the non-executable files
+sed -i -e '/^#!\//, 1d' %{module}/{client,config,jirashell}.py
+
+%build
+%if %{with python2}
+%py_build
+%endif
+%if %{with python3}
+%py3_build
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
+%py_install
+%py_postclean
+mv $RPM_BUILD_ROOT%{_bindir}/jirashell{,-%{py_ver}}
+ln -sf jirashell-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/jirashell-2
+%endif
+
+%if %{with python3}
+%py3_install
+mv $RPM_BUILD_ROOT%{_bindir}/jirashell{,-%{py3_ver}}
+ln -s jirashell-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/jirashell-3
+%endif
+
+%if %{with python2}
+ln -sf jirashell-2 $RPM_BUILD_ROOT%{_bindir}/jirashell
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc PKG-INFO LICENSE
+%attr(755,root,root) %{_bindir}/jirashell
+%attr(755,root,root) %{_bindir}/jirashell-2
+%attr(755,root,root) %{_bindir}/jirashell-%{py_ver}
+%{py_sitescriptdir}/%{module}/
+%{py_sitescriptdir}/%{egg_name}-%{version}*
+%endif
+
+%if %{with python3}
+%files -n python3-%{pypi_name}
+%defattr(644,root,root,755)
+%doc PKG-INFO LICENSE
+%attr(755,root,root) %{_bindir}/jirashell-3
+%attr(755,root,root) %{_bindir}/jirashell-%{py3_ver}
+%{py3_sitescriptdir}/%{module}/
+%{py3_sitescriptdir}/%{egg_name}-%{version}*
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-jira.git/commitdiff/02ad57eaf2086f97830b8e849607109c2a938dad
More information about the pld-cvs-commit
mailing list