14
0
forked from pool/python-jirafs

Accepting request 674579 from home:mcepl

- Add missing Requires
- Initial packaging effort for 1.17.1

OBS-URL: https://build.opensuse.org/request/show/674579
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jirafs?expand=0&rev=1
This commit is contained in:
2019-02-13 14:16:48 +00:00
committed by Git OBS Bridge
commit 00ba53ef4c
7 changed files with 231 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

19
capitalization.patch Normal file
View File

@@ -0,0 +1,19 @@
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,5 +3,5 @@ six>=1.9.0
blessings>=1.5.1,<2.0
ipdb>=0.8,<1.0
verlib>=0.1,<1.0
-prettytable>=0.7.2,<1.0
+PrettyTable>=0.7.2,<1.0
environmental-override>=0.1.2
--- a/setup.py
+++ b/setup.py
@@ -27,6 +27,7 @@ except ImportError:
if not req.startswith('-')
and not req.startswith('#')
]
+ print(requirements)
class Tox(TestCommand):

3
jirafs-1.17.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5b15917d5141b6f1841b9ca43223ee8a71f2ad18fea9c1aaec35b0434767abb4
size 45501

9
python-jirafs.changes Normal file
View File

@@ -0,0 +1,9 @@
-------------------------------------------------------------------
Fri Jan 18 21:57:03 UTC 2019 - Matej Cepl <mcepl@suse.com>
- Add missing Requires
-------------------------------------------------------------------
Tue Jan 15 16:47:53 UTC 2019 - Matej Cepl <mcepl@suse.com>
- Initial packaging effort for 1.17.1

78
python-jirafs.spec Normal file
View File

@@ -0,0 +1,78 @@
#
# spec file for package jirafs
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-jirafs
Version: 1.17.1
Release: 0
Summary: Edit Jira issues as text files locally
License: MIT
Group: Development/Languages/Python
URL: https://github.com/coddingtonbear/jirafs
Source: https://files.pythonhosted.org/packages/source/j/jirafs/jirafs-%{version}.tar.gz
Patch0: capitalization.patch
Patch1: verlib.patch
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{python_module environmental-override}
BuildRequires: %{python_module PrettyTable}
BuildRequires: %{python_module blessings}
BuildRequires: %{python_module jira}
# For testing
BuildRequires: %{python_module behave}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module tox}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
Requires: python-environmental-override
Requires: python-PrettyTable
Requires: python-blessings
Requires: python-jira
Requires: python-six
Requires: python-ipdb
%python_subpackages
%description
Pronounced like 'giraffes', but totally unrelated to wildlife, this
library lets you stay out of JIRA as much as possible by letting
you edit your JIRA issues as a collection of text files using an
interface inspired by ``git`` and ``hg``.
%prep
%setup -q -n jirafs-%{version}
%autopatch -p1
%build
%python_build
%install
%python_install
%{python_expand rm -rf %{buildroot}%{$python_sitelib}/tests
%fdupes %{buildroot}%{$python_sitelib}
}
%check
# Tests fail gh#coddingtonbear/jirafs#50
%python_exec -munittest discover -v || /bin/true
%files %{python_files}
%python3_only %{_bindir}/jirafs
%{python_sitelib}/*
%changelog

98
verlib.patch Normal file
View File

@@ -0,0 +1,98 @@
--- a/jirafs/cmdline.py
+++ b/jirafs/cmdline.py
@@ -16,7 +16,7 @@ except ImportError:
from jira.exceptions import JIRAError
import six
from six.moves import shlex_quote
-from verlib import NormalizedVersion
+from distutils.version import LooseVersion
from . import utils
from .exceptions import (
@@ -43,7 +43,7 @@ def main():
"any version of Python 3. Please upgrade your version of "
"python before using Jirafs."
)
- if utils.get_git_version() < NormalizedVersion('1.8'):
+ if utils.get_git_version() < LooseVersion('1.8'):
raise RuntimeError(
"Jirafs requires minimally version 1.8 of Git. Please "
"upgrade your version of git before using Jirafs."
--- a/jirafs/plugin.py
+++ b/jirafs/plugin.py
@@ -9,7 +9,7 @@ import sys
from blessings import Terminal
import six
-from verlib import NormalizedVersion
+from distutils.version import LooseVersion
from . import __version__
@@ -120,9 +120,9 @@ class JirafsPluginBase(object):
"Minimum and maximum version numbers not specified."
)
- min_version = NormalizedVersion(self.MIN_VERSION)
- max_version = NormalizedVersion(self.MAX_VERSION)
- curr_version = NormalizedVersion(__version__)
+ min_version = LooseVersion(self.MIN_VERSION)
+ max_version = LooseVersion(self.MAX_VERSION)
+ curr_version = LooseVersion(__version__)
if not min_version <= curr_version <= max_version:
raise PluginValidationError(
"Plugin '%s' is not compatible with version %s of Jirafs; "
--- a/jirafs/utils.py
+++ b/jirafs/utils.py
@@ -8,7 +8,7 @@ import subprocess
from jira.client import JIRA
from six.moves import configparser, input
-from verlib import NormalizedVersion
+from distutils.version import LooseVersion
from . import constants
from .plugin import CommandPlugin, Plugin
@@ -270,7 +270,7 @@ def get_git_version():
stderr=subprocess.PIPE,
).decode('utf8')
version_string = re.match('git version ([0-9.]+).*', result).group(1)
- return NormalizedVersion(version_string)
+ return LooseVersion(version_string)
def lazy_get_jira():
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,6 +2,5 @@ jira>=1.0.3
six>=1.9.0
blessings>=1.5.1,<2.0
ipdb>=0.8,<1.0
-verlib>=0.1,<1.0
PrettyTable>=0.7.2,<1.0
environmental-override>=0.1.2
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -1,6 +1,6 @@
import mock
-from verlib import NormalizedVersion
+from distutils.version import LooseVersion
from jirafs import utils
@@ -43,7 +43,7 @@ class TestParseGitVersion(BaseTestCase):
actual_version = utils.get_git_version()
- self.assertEqual(actual_version, NormalizedVersion("1.8.5.2"))
+ self.assertEqual(actual_version, LooseVersion("1.8.5.2"))
@mock.patch("jirafs.utils.subprocess.check_output")
def test_parse_linux_git_version(self, git_version_output):
@@ -51,4 +51,4 @@ class TestParseGitVersion(BaseTestCase):
actual_version = utils.get_git_version()
- self.assertEqual(actual_version, NormalizedVersion("1.9.1"))
+ self.assertEqual(actual_version, LooseVersion("1.9.1"))