Compare commits
2 commits
rawhide
...
private-pr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8df1804932 | ||
|
|
359c9122a3 |
2 changed files with 90 additions and 12 deletions
62
pybugz-0.11-7.git3459d-python2.patch
Normal file
62
pybugz-0.11-7.git3459d-python2.patch
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
diff --git a/bin/bugz b/bin/bugz
|
||||
index c7b6c46..1e09412 100755
|
||||
--- a/bin/bugz
|
||||
+++ b/bin/bugz
|
||||
@@ -19,7 +19,7 @@ Classes
|
||||
"""
|
||||
|
||||
import argparse
|
||||
-import configparser
|
||||
+from six.moves import configparser
|
||||
import sys
|
||||
|
||||
from bugz.argparsers import make_parser
|
||||
diff --git a/bugz/cli.py b/bugz/cli.py
|
||||
index 94842f2..8f7a862 100644
|
||||
--- a/bugz/cli.py
|
||||
+++ b/bugz/cli.py
|
||||
@@ -4,7 +4,7 @@ import re
|
||||
import subprocess
|
||||
import sys
|
||||
import textwrap
|
||||
-import xmlrpc.client
|
||||
+from six.moves import xmlrpc_client
|
||||
|
||||
try:
|
||||
import readline
|
||||
diff --git a/bugz/configfile.py b/bugz/configfile.py
|
||||
index 9d54946..f5d4ea5 100644
|
||||
--- a/bugz/configfile.py
|
||||
+++ b/bugz/configfile.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-import configparser
|
||||
+from six.moves import configparser
|
||||
import glob
|
||||
import os
|
||||
import sys
|
||||
diff --git a/bugz/connection.py b/bugz/connection.py
|
||||
index bdf5734..934a523 100644
|
||||
--- a/bugz/connection.py
|
||||
+++ b/bugz/connection.py
|
||||
@@ -1,8 +1,8 @@
|
||||
import os
|
||||
import sys
|
||||
-import urllib.error
|
||||
-import urllib.parse
|
||||
-import xmlrpc.client
|
||||
+from six.moves import urllib_error
|
||||
+from six.moves import urllib_parse
|
||||
+from six.moves import xmlrpc_client
|
||||
|
||||
from bugz.configfile import get_config_option
|
||||
from bugz.errhandling import BugzError
|
||||
diff --git a/bugz/tokens.py b/bugz/tokens.py
|
||||
index b39e3b5..59d2ccd 100644
|
||||
--- a/bugz/tokens.py
|
||||
+++ b/bugz/tokens.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-import configparser
|
||||
+from six.moves import configparser
|
||||
import os
|
||||
|
||||
|
||||
40
pybugz.spec
40
pybugz.spec
|
|
@ -1,20 +1,22 @@
|
|||
%{?scl:%scl_package pybugz}
|
||||
|
||||
%global gitrev 3459d
|
||||
%global posttag git%{gitrev}
|
||||
%global snapshot %{version}-%{posttag}
|
||||
|
||||
Name: pybugz
|
||||
Name: %{?scl_prefix}pybugz
|
||||
Summary: Command line interface for Bugzilla written in Python
|
||||
Version: 0.11
|
||||
Release: 7.%{posttag}%{?dist}
|
||||
Group: Applications/Communications
|
||||
License: GPLv2
|
||||
URL: https://github.com/williamh/pybugz
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: python3
|
||||
BuildRequires: python3-devel
|
||||
Requires: python2
|
||||
Requires: python-six
|
||||
BuildRequires: python2-devel
|
||||
%{?scl:Requires:%scl_runtime}
|
||||
|
||||
Patch0: rh-default.patch
|
||||
|
||||
%if ! 0%{?rhel}
|
||||
# no bash-completion for RHEL
|
||||
|
|
@ -28,7 +30,13 @@ BuildRequires: bash-completion pkgconfig
|
|||
# There is possible to download upstream tarball generated by github, but it is
|
||||
# quite old now. For HOWTO obtain correct tarball see the "prepare-tarball.sh"
|
||||
# script (in dist-git).
|
||||
Source0: %{name}-%{snapshot}.tar.gz
|
||||
Source0: %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{snapshot}.tar.gz
|
||||
|
||||
Patch1: rh-default.patch
|
||||
Patch2: pybugz-0.11-7.git3459d-python2.patch
|
||||
|
||||
# Bug in yum, rhbz#1359084.
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Pybugz was conceived as a tool to speed up the work-flow for Gentoo Linux
|
||||
|
|
@ -38,14 +46,19 @@ quickly. Developers alike can easily extract attachments and close bugs
|
|||
comfortably from the command line.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{snapshot}
|
||||
%autosetup -p1 -n %{?scl:%pkg_name-%snapshot}%{?!scl:%name-%snapshot}
|
||||
|
||||
|
||||
%build
|
||||
%{__python3} setup.py build
|
||||
%{?scl_enable}
|
||||
%{__python2} setup.py build
|
||||
%{?scl_disable}
|
||||
|
||||
%install
|
||||
# default install process
|
||||
%{__python3} setup.py install --root=%{buildroot}
|
||||
%{?scl_enable}
|
||||
%{__python} setup.py install --root=%{buildroot} --prefix=%{_prefix}
|
||||
%{?scl_disable}
|
||||
|
||||
|
||||
%global bash_cmpl_dir %(pkg-config --variable=completionsdir bash-completion)
|
||||
%if 0%{?bash_completion}
|
||||
|
|
@ -63,17 +76,20 @@ mkdir -p %{buildroot}%{_docdir}
|
|||
|
||||
%files
|
||||
%{_bindir}/bugz
|
||||
%{python3_sitelib}/bugz
|
||||
%{python_sitelib}/bugz
|
||||
%if 0%{?bash_completion}
|
||||
%{bash_cmpl_dir}/bugz
|
||||
%endif
|
||||
%{python3_sitelib}/%{name}-*.egg-info
|
||||
%{python_sitelib}/%{?scl:%pkg_name}%{!?scl:%{name}}-*.egg-info
|
||||
%{_mandir}/man1/bugz.1.gz
|
||||
%{_datadir}/pybugz.d/
|
||||
%{_mandir}/man5/*
|
||||
%doc README LICENSE
|
||||
|
||||
%changelog
|
||||
* Wed Jul 20 2016 Pavel Raiskup <praiskup@redhat.com> - 0.11-7.git3459d
|
||||
- fun with scls
|
||||
|
||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-7.git3459d
|
||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue