00241aa
%global modname jira
95f829b
%global distname jira
95f829b
%global eggname jira
00241aa
Iryna Shcherbina 2f9cc2b
Name:               python-%{distname}
Iryna Shcherbina 2f9cc2b
Version:            1.0.7
717b62a
Release:            2%{?dist}
Iryna Shcherbina 2f9cc2b
Summary:            A library to ease use of the JIRA 5 REST APIs
00241aa
00241aa
Group:              Development/Libraries
00241aa
License:            BSD
f4790ed
URL:                https://pypi.io/project/%{distname}
Iryna Shcherbina 2f9cc2b
Source0:            https://files.pythonhosted.org/packages/source/j/%{distname}/%{distname}-%{version}.tar.gz
247b717
Patch0:             python-jira-no-mime-detection.patch
00241aa
00241aa
BuildArch:          noarch
00241aa
00241aa
BuildRequires:      python2-devel
Iryna Shcherbina 2f9cc2b
BuildRequires:      python2-setuptools
Iryna Shcherbina 2f9cc2b
Iryna Shcherbina 2f9cc2b
BuildRequires:      python3-devel
Iryna Shcherbina 2f9cc2b
BuildRequires:      python3-setuptools
Iryna Shcherbina 2f9cc2b
Iryna Shcherbina 2f9cc2b
%description
Iryna Shcherbina 2f9cc2b
A library to ease use of the JIRA 5 REST APIs.
Iryna Shcherbina 2f9cc2b
Iryna Shcherbina 2f9cc2b
Iryna Shcherbina 2f9cc2b
%package -n python2-%{distname}
Iryna Shcherbina 2f9cc2b
Summary:            %{summary}
Iryna Shcherbina 2f9cc2b
Requires:           python2-requests
Iryna Shcherbina 2f9cc2b
Requires:           python2-requests-oauthlib
Iryna Shcherbina 2f9cc2b
Requires:           python2-requests-toolbelt
Iryna Shcherbina 2f9cc2b
Requires:           python2-tlslite
00241aa
Requires:           python-magic
87226c9
Requires:           python-ipython-console
f4790ed
Requires:           python-six
Iryna Shcherbina 2f9cc2b
%{?python_provide:%python_provide python2-%{distname}}
00241aa
Iryna Shcherbina 2f9cc2b
%description -n python2-%{distname}
Iryna Shcherbina 2f9cc2b
A library to ease use of the JIRA 5 REST APIs.
Iryna Shcherbina 2f9cc2b
Iryna Shcherbina 2f9cc2b
Iryna Shcherbina 2f9cc2b
%package -n python3-%{distname}
Iryna Shcherbina 2f9cc2b
Summary:            %{summary}
Iryna Shcherbina 2f9cc2b
Requires:           python3-requests
Iryna Shcherbina 2f9cc2b
Requires:           python3-requests-oauthlib
Iryna Shcherbina 2f9cc2b
Requires:           python3-requests-toolbelt
Iryna Shcherbina 2f9cc2b
Requires:           python3-tlslite
Iryna Shcherbina 2f9cc2b
Requires:           python3-magic
Iryna Shcherbina 2f9cc2b
Requires:           python3-ipython-console
Iryna Shcherbina 2f9cc2b
Requires:           python3-six
Iryna Shcherbina 2f9cc2b
%{?python_provide:%python_provide python3-%{distname}}
Iryna Shcherbina 2f9cc2b
Iryna Shcherbina 2f9cc2b
%description -n python3-%{distname}
00241aa
A library to ease use of the JIRA 5 REST APIs.
00241aa
Iryna Shcherbina 2f9cc2b
00241aa
%prep
00241aa
%setup -q -n %{distname}-%{version}
247b717
%patch0 -p1
00241aa
87226c9
sed -i 's/tools.jirashell/jira.tools.jirashell/g' setup.py
f4790ed
sed -i "s/'ordereddict'//" setup.py
87226c9
00241aa
# Remove bundled egg-info in case it exists
00241aa
rm -rf %{distname}.egg-info
00241aa
Iryna Shcherbina 2f9cc2b
# Remove shebang in the non-executable files
Iryna Shcherbina 2f9cc2b
sed -i -e '/^#!\//, 1d' %{modname}/{client,config,jirashell}.py
Iryna Shcherbina 2f9cc2b
Iryna Shcherbina 2f9cc2b
00241aa
%build
Iryna Shcherbina 2f9cc2b
%py2_build
Iryna Shcherbina 2f9cc2b
%py3_build
00241aa
00241aa
Iryna Shcherbina 2f9cc2b
%install
Iryna Shcherbina 2f9cc2b
%py3_install
Iryna Shcherbina 2f9cc2b
mv %{buildroot}/%{_bindir}/jirashell %{buildroot}/%{_bindir}/jirashell-%{python3_version}
Iryna Shcherbina 2f9cc2b
ln -sf %{_bindir}/jirashell-%{python3_version} %{buildroot}/%{_bindir}/jirashell-3
00241aa
Iryna Shcherbina 2f9cc2b
%py2_install
Iryna Shcherbina 2f9cc2b
mv %{buildroot}/%{_bindir}/jirashell %{buildroot}/%{_bindir}/jirashell-%{python2_version}
Iryna Shcherbina 2f9cc2b
ln -sf %{_bindir}/jirashell-%{python2_version} %{buildroot}/%{_bindir}/jirashell-2
Iryna Shcherbina 2f9cc2b
ln -sf %{_bindir}/jirashell-2 %{buildroot}/%{_bindir}/jirashell
00241aa
00241aa
Iryna Shcherbina 2f9cc2b
%files -n python2-%{distname}
00241aa
%doc PKG-INFO
Iryna Shcherbina 2f9cc2b
%license LICENSE
Iryna Shcherbina 2f9cc2b
%{_bindir}/jirashell
Iryna Shcherbina 2f9cc2b
%{_bindir}/jirashell-2
Iryna Shcherbina 2f9cc2b
%{_bindir}/jirashell-%{python2_version}
00241aa
%{python2_sitelib}/%{modname}/
00241aa
%{python2_sitelib}/%{eggname}-%{version}*
Iryna Shcherbina 2f9cc2b
Iryna Shcherbina 2f9cc2b
Iryna Shcherbina 2f9cc2b
%files -n python3-%{distname}
Iryna Shcherbina 2f9cc2b
%doc PKG-INFO
Iryna Shcherbina 2f9cc2b
%license LICENSE
Iryna Shcherbina 2f9cc2b
%{_bindir}/jirashell-3
Iryna Shcherbina 2f9cc2b
%{_bindir}/jirashell-%{python3_version}
Iryna Shcherbina 2f9cc2b
%{python3_sitelib}/%{modname}/
Iryna Shcherbina 2f9cc2b
%{python3_sitelib}/%{eggname}-%{version}*
00241aa
00241aa
00241aa
%changelog
717b62a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.7-2
717b62a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
717b62a
Iryna Shcherbina 2f9cc2b
* Mon Nov 21 2016 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.7-1
Iryna Shcherbina 2f9cc2b
- Update to 1.0.7 version
Iryna Shcherbina 2f9cc2b
- Provide Python 3 subpackage
Iryna Shcherbina 2f9cc2b
4b6fcc7
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.50-2
4b6fcc7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
4b6fcc7
f4790ed
* Tue May 10 2016 Ralph Bean <rbean@redhat.com> - 0.50-1
f4790ed
- new version
f4790ed
4ebf613
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-8
4ebf613
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
4ebf613
95f829b
* Mon Nov 30 2015 Ralph Bean <rbean@redhat.com> - 0.13-7
95f829b
- Fix upstream url for https://bugzilla.redhat.com/1285760
95f829b
0355970
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13-6
0355970
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0355970
87226c9
* Tue Apr 21 2015 Ralph Bean <rbean@redhat.com> - 0.13-5
87226c9
- Change dep from the ipython meta package to just python-ipython-console.
87226c9
- Move the /tools/ module into the jira namespace to avoid potential conflict.
87226c9
1728780
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13-4
1728780
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
1728780
247b717
* Fri Nov 22 2013 Ralph Bean <rbean@redhat.com> - 0.13-3
247b717
- Patch out mime type detection as per review feedback.
247b717
00241aa
* Fri Nov 01 2013 Ralph Bean <rbean@redhat.com> - 0.13-2
00241aa
- Modernize python2 rpm macros.
00241aa
00241aa
* Thu Oct 31 2013 Ralph Bean <rbean@redhat.com> - 0.13-1
00241aa
- Initial package for Fedora