Accepting request 844902 from home:bfrogers:branches:devel:tools:scm

- Fix setup.py to correctly identify the project packages git_deps
  and git_deps/listener. These were not being packaged and as a
  result the git-deps command was simply failing
- Fix issue with unbuffered text I/O under python3, as identified in
6beebe034b

I couldn't make sense of the "test" which accompanies the source code. i think it's out of date, so I didn't add any tests

OBS-URL: https://build.opensuse.org/request/show/844902
OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/git-deps?expand=0&rev=4
This commit is contained in:
Matej Cepl 2020-10-30 15:40:59 +00:00 committed by Git OBS Bridge
parent cbf0e2f318
commit db56bdb965
4 changed files with 47 additions and 6 deletions

View File

@ -0,0 +1,29 @@
From 8d9a7d6dacad4a033f2a4c800ff32137e6e894da Mon Sep 17 00:00:00 2001
From: Bruce Rogers <brogers@suse.com>
Date: Wed, 28 Oct 2020 18:09:24 -0600
Subject: [PATCH] Fix issue with unbuffered text I/O under python3
This fix is in an upstream pull request, as shown here:
https://github.com/aspiers/git-deps/pull/93/commits/6beebe034b5c6fd19d73edd774dbf424ea183fee
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
git_deps/cli.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git_deps/cli.py b/git_deps/cli.py
index 9e8b0ab..7882088 100755
--- a/git_deps/cli.py
+++ b/git_deps/cli.py
@@ -135,7 +135,7 @@ def main(args):
if options.serve:
serve(options)
else:
- sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
+ sys.stdout = os.fdopen(sys.stdout.fileno(), 'w')
try:
cli(options, args)
except InvalidCommitish as e:
--
2.29.0

View File

@ -37,7 +37,7 @@
+ "Topic :: Utilities"
+ ],
+ scripts = ["bin/git-fixup"],
+ # packages = "git_deps",
+ packages = ["git_deps", "git_deps/listener"],
+ # data_files = "share/git_deps = share/gitfile-handler.desktop",
setup_requires=[
'six',

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Oct 29 15:48:48 UTC 2020 - Bruce Rogers <brogers@suse.com>
- Fix setup.py to correctly identify the project packages git_deps
and git_deps/listener. These were not being packaged and as a
result the git-deps command was simply failing
- Fix issue with unbuffered text I/O under python3, as identified in
https://github.com/aspiers/git-deps/pull/93/commits/6beebe034b5c6fd19d73edd774dbf424ea183fee
-------------------------------------------------------------------
Mon Jun 1 17:25:50 UTC 2020 - Matej Cepl <mcepl@suse.com>

View File

@ -15,6 +15,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: git-deps
@ -26,13 +27,14 @@ Group: Development/Tools/Version Control
URL: https://github.com/aspiers/git-deps
Source: %{name}-%{version}.tar.xz
Patch0: dont-use-st-markdown.patch
BuildRequires: python-rpm-macros
BuildRequires: fdupes
BuildRequires: %{python_module setuptools}
Patch1: Fix-issue-with-unbuffered-text-I-O-under-python3.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module six}
BuildRequires: %{python_module pygit2}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pygit2
# for html subpackage
Requires: python-Flask
@ -48,6 +50,7 @@ file bugs at https://github.com/aspiers/git-deps/issues
%package html
Summary: Tool to analyze git deps - HTML parts
Group: Development/Tools/Version Control
%description html
Documentation for git-deps.