]> git.pld-linux.org Git - packages/python-jira.git/blame - python-jira.spec
rebuild with tests and docs
[packages/python-jira.git] / python-jira.spec
CommitLineData
2d941b5c
ER
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module jira
7%define pypi_name jira
8%define egg_name jira
9Summary: A library to ease use of the JIRA 5 REST APIs
10Name: python-%{pypi_name}
11Version: 1.0.7
ed506633 12Release: 9
2d941b5c
ER
13License: BSD
14Group: Libraries/Python
15Source0: https://files.pythonhosted.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
16# Source0-md5: cb1d3f1e1b7a388932ad5d961bf2c56d
17URL: https://pypi.io/project/jira
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.714
20BuildRequires: sed >= 4.0
21%if %{with python3}
22BuildRequires: python-devel
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
26BuildRequires: python3-devel
27BuildRequires: python3-setuptools
28%endif
5257789e 29Requires: python-ipython
2d941b5c 30Requires: python-magic
2d941b5c
ER
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35A library to ease use of the JIRA 5 REST APIs.
36
37%package -n python3-%{pypi_name}
38Summary: %{summary}
39Group: Libraries/Python
5257789e 40Requires: python3-ipython
2d941b5c 41Requires: python3-magic
2d941b5c
ER
42
43%description -n python3-%{pypi_name}
44A library to ease use of the JIRA 5 REST APIs.
45
46%prep
47%setup -q -n %{pypi_name}-%{version}
48
49sed -i 's/tools.jirashell/jira.tools.jirashell/g' setup.py
50sed -i "s/'ordereddict'//" setup.py
51
52# Remove bundled egg-info in case it exists
53rm -r %{pypi_name}.egg-info
54
55# Remove shebang in the non-executable files
56sed -i -e '/^#!\//, 1d' %{module}/{client,config,jirashell}.py
57
58%build
59%if %{with python2}
60%py_build
61%endif
62%if %{with python3}
63%py3_build
64%endif
65
66%install
67rm -rf $RPM_BUILD_ROOT
68%if %{with python2}
69%py_install
70%py_postclean
71mv $RPM_BUILD_ROOT%{_bindir}/jirashell{,-%{py_ver}}
72ln -sf jirashell-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/jirashell-2
73%endif
74
75%if %{with python3}
76%py3_install
77mv $RPM_BUILD_ROOT%{_bindir}/jirashell{,-%{py3_ver}}
78ln -s jirashell-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/jirashell-3
79%endif
80
81%if %{with python2}
82ln -sf jirashell-2 $RPM_BUILD_ROOT%{_bindir}/jirashell
83%endif
84
85%clean
86rm -rf $RPM_BUILD_ROOT
87
88%if %{with python2}
89%files
90%defattr(644,root,root,755)
91%doc PKG-INFO LICENSE
92%attr(755,root,root) %{_bindir}/jirashell
93%attr(755,root,root) %{_bindir}/jirashell-2
94%attr(755,root,root) %{_bindir}/jirashell-%{py_ver}
95%{py_sitescriptdir}/%{module}/
96%{py_sitescriptdir}/%{egg_name}-%{version}*
97%endif
98
99%if %{with python3}
100%files -n python3-%{pypi_name}
101%defattr(644,root,root,755)
102%doc PKG-INFO LICENSE
103%attr(755,root,root) %{_bindir}/jirashell-3
104%attr(755,root,root) %{_bindir}/jirashell-%{py3_ver}
105%{py3_sitescriptdir}/%{module}/
106%{py3_sitescriptdir}/%{egg_name}-%{version}*
107%endif
This page took 0.13429 seconds and 4 git commands to generate.