15
0

Accepting request 1170660 from home:pgajdos:python

- update to 0.13.2
  * remove Python2 crumbs by @a-detiste in #29
  * remove more Python2 compat code by @a-detiste in #30
- removed patches
  - python-easydev-no-mock.patch (upstreamed)

OBS-URL: https://build.opensuse.org/request/show/1170660
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-easydev?expand=0&rev=16
This commit is contained in:
2024-04-29 13:24:08 +00:00
committed by Git OBS Bridge
parent 5198c10ea2
commit 7f0d28cb02
5 changed files with 26 additions and 57 deletions

View File

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

3
easydev-0.13.2.tar.gz Normal file
View File

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

View File

@@ -1,34 +0,0 @@
Index: easydev-0.12.0/test/test_appdirs.py
===================================================================
--- easydev-0.12.0.orig/test/test_appdirs.py 2020-06-03 19:27:51.000000000 +0200
+++ easydev-0.12.0/test/test_appdirs.py 2022-03-16 14:45:51.220342072 +0100
@@ -1,4 +1,7 @@
-import mock
+try:
+ from unittest.mock import patch
+except:
+ from mock import patch
def test_app():
@@ -10,17 +13,17 @@ def test_app():
app.user_cache_dir
app.user_log_dir
- with mock.patch("sys.platform", "darwin"):
+ with patch("sys.platform", "darwin"):
from easydev import appdirs
app = appdirs.AppDirs("test")
getter(app)
- with mock.patch("sys.platform", "win32"):
+ with patch("sys.platform", "win32"):
from easydev import appdirs
app = appdirs.AppDirs("test")
getter(app)
- with mock.patch("sys.platform", "linux"):
+ with patch("sys.platform", "linux"):
from easydev import appdirs
app = appdirs.AppDirs("test")
getter(app)

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Apr 29 06:11:17 UTC 2024 - pgajdos@suse.com
- update to 0.13.2
* remove Python2 crumbs by @a-detiste in #29
* remove more Python2 compat code by @a-detiste in #30
- removed patches
- python-easydev-no-mock.patch (upstreamed)
-------------------------------------------------------------------
Tue Mar 28 06:38:58 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-easydev
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,29 +17,31 @@
Name: python-easydev
Version: 0.12.1
Version: 0.13.2
Release: 0
Summary: Common utilities to ease the development of Python packages
License: BSD-3-Clause
URL: https://github.com/cokelaer/easydev
Source: https://files.pythonhosted.org/packages/source/e/easydev/easydev-%{version}.tar.gz
# https://github.com/cokelaer/easydev/issues/20
Patch0: python-easydev-no-mock.patch
BuildRequires: %{python_module setuptools}
Source: https://github.com/cokelaer/easydev/archive/refs/tags/v%{version}.tar.gz#/easydev-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-colorama
Requires: python-colorlog
Requires: python-line_profiler
Requires: python-pexpect
Requires: python-setuptools
Requires: python-platformdirs
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
Recommends: python-line_profiler
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module colorama}
BuildRequires: %{python_module colorlog}
BuildRequires: %{python_module line_profiler}
BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module platformdirs}
BuildRequires: %{python_module poetry}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
@@ -54,30 +56,22 @@ also as an incubator for other packages and is stable.
%prep
%autosetup -p1 -n easydev-%{version}
sed -i -e '/^#!\//, 1d' easydev/appdirs.py
%build
%python_build
%pyproject_wheel
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/browse
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# Requires network access
%pytest -k 'not test_isurl'
%post
%python_install_alternative browse
%postun
%python_uninstall_alternative browse
%files %{python_files}
%doc README.rst
%license COPYING
%python_alternative %{_bindir}/browse
%{python_sitelib}/*
%{python_sitelib}/easydev
%{python_sitelib}/easydev*-info
%changelog