forked from pool/python-helpdev
- Switch to github tarball to get tests and license
- Run the tests - Format with spec cleaner - Add patch to work with python 3.8: * python38.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-helpdev?expand=0&rev=2
This commit is contained in:
committed by
Git OBS Bridge
parent
fb49a411ab
commit
9d841b1982
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9e61d24458b7506809670222ca656b139e67d46c530cd227a899780152d7b44e
|
||||
size 12864
|
||||
3
helpdev-v0.6.10.tar.gz
Normal file
3
helpdev-v0.6.10.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6f6fb296b650b935356f4fcfeb25a0428da840d3e64855601fa2f628a942e736
|
||||
size 368265
|
||||
@@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 28 08:38:12 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Switch to github tarball to get tests and license
|
||||
- Run the tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 28 08:20:21 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Format with spec cleaner
|
||||
- Add patch to work with python 3.8:
|
||||
* python38.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 25 14:53:04 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-helpdev
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -12,38 +12,40 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-helpdev
|
||||
Version: 0.6.10
|
||||
Release: 0
|
||||
License: MIT and CC-BY-4.0
|
||||
Summary: HelpDev - Extracts information about the Python environment easily
|
||||
Url: https://gitlab.com/dpizetta/helpdev
|
||||
License: MIT AND CC-BY-4.0
|
||||
Group: Development/Languages/Python
|
||||
Source: https://files.pythonhosted.org/packages/source/h/helpdev/helpdev-%{version}.tar.gz
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module devel}
|
||||
URL: https://gitlab.com/dpizetta/helpdev
|
||||
Source0: https://gitlab.com/dpizetta/helpdev/-/archive/v%{version}/helpdev-v%{version}.tar.gz
|
||||
Patch0: python38.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module importlib_metadata}
|
||||
BuildRequires: %{python_module psutil >= 5.6}
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-importlib_metadata
|
||||
Requires: python-psutil >= 5.6
|
||||
BuildArch: noarch
|
||||
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module importlib_metadata}
|
||||
BuildRequires: %{python_module psutil >= 5.6}
|
||||
BuildRequires: %{python_module pytest}
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
HelpDev - Extracts information about the Python environment easily.
|
||||
|
||||
%prep
|
||||
%setup -q -n helpdev-%{version}
|
||||
sed -i '1{\,^#!/usr/bin/env python,d}' helpdev/*.py
|
||||
%setup -q -n helpdev-v%{version}
|
||||
%patch0 -p1
|
||||
sed -i '1{\,^#!%{_bindir}/env python,d}' helpdev/*.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -52,6 +54,10 @@ sed -i '1{\,^#!/usr/bin/env python,d}' helpdev/*.py
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
#test_check_python_packages needs the binary
|
||||
%pytest -k 'not test_check_python_packages'
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%python3_only %{_bindir}/helpdev
|
||||
|
||||
17
python38.patch
Normal file
17
python38.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git a/helpdev/__init__.py b/helpdev/__init__.py
|
||||
index ca739c8ee30e8899a33ef98a60a59d458b376261..41bf220cf890fae1eb1aae557c75e8d404dd9a13 100644
|
||||
--- a/helpdev/__init__.py
|
||||
+++ b/helpdev/__init__.py
|
||||
@@ -26,7 +26,11 @@ import sys
|
||||
import time
|
||||
import warnings
|
||||
|
||||
-import importlib_metadata
|
||||
+try:
|
||||
+ import importlib.metadata as importlib_metadata
|
||||
+except ImportError:
|
||||
+ # python < 3.8
|
||||
+ import importlib_metadata
|
||||
|
||||
if sys.version_info >= (3, 4):
|
||||
import importlib.util
|
||||
Reference in New Issue
Block a user