forked from pool/python-livereload
Accepting request 1071791 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1071791 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-livereload?expand=0&rev=5
This commit is contained in:
85
python-livereload-no-python2.patch
Normal file
85
python-livereload-no-python2.patch
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
Index: python-livereload-2.6.3/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- python-livereload-2.6.3.orig/Makefile
|
||||||
|
+++ python-livereload-2.6.3/Makefile
|
||||||
|
@@ -15,7 +15,7 @@ clean-pyc:
|
||||||
|
find . -name '*~' -exec rm -f {} +
|
||||||
|
|
||||||
|
install:
|
||||||
|
- python setup.py install
|
||||||
|
+ python3 setup.py install
|
||||||
|
|
||||||
|
docs:
|
||||||
|
$(MAKE) -C docs html
|
||||||
|
Index: python-livereload-2.6.3/livereload/server.py
|
||||||
|
===================================================================
|
||||||
|
--- python-livereload-2.6.3.orig/livereload/server.py
|
||||||
|
+++ python-livereload-2.6.3/livereload/server.py
|
||||||
|
@@ -27,11 +27,10 @@ from tornado.log import LogFormatter
|
||||||
|
from .handlers import LiveReloadHandler, LiveReloadJSHandler
|
||||||
|
from .handlers import ForceReloadHandler, StaticFileHandler
|
||||||
|
from .watcher import get_watcher_class
|
||||||
|
-from six import string_types, PY3
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
-if sys.version_info >= (3, 7) or sys.version_info.major == 2:
|
||||||
|
+if sys.version_info >= (3, 7):
|
||||||
|
import errno
|
||||||
|
else:
|
||||||
|
from os import errno
|
||||||
|
Index: python-livereload-2.6.3/livereload/watcher.py
|
||||||
|
===================================================================
|
||||||
|
--- python-livereload-2.6.3.orig/livereload/watcher.py
|
||||||
|
+++ python-livereload-2.6.3/livereload/watcher.py
|
||||||
|
@@ -13,12 +13,7 @@ import glob
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
-import sys
|
||||||
|
-
|
||||||
|
-if sys.version_info.major < 3:
|
||||||
|
- import inspect
|
||||||
|
-else:
|
||||||
|
- from inspect import signature
|
||||||
|
+from inspect import signature
|
||||||
|
|
||||||
|
try:
|
||||||
|
import pyinotify
|
||||||
|
@@ -109,11 +104,7 @@ class Watcher(object):
|
||||||
|
name = getattr(func, '__name__', 'anonymous')
|
||||||
|
logger.info(
|
||||||
|
"Running task: {} (delay: {})".format(name, delay))
|
||||||
|
- if sys.version_info.major < 3:
|
||||||
|
- sig_len = len(inspect.getargspec(func)[0])
|
||||||
|
- else:
|
||||||
|
- sig_len = len(signature(func).parameters)
|
||||||
|
- if sig_len > 0 and isinstance(changed, list):
|
||||||
|
+ if len(signature(func).parameters) > 0 and isinstance(changed, list):
|
||||||
|
func(changed)
|
||||||
|
else:
|
||||||
|
func()
|
||||||
|
@@ -206,10 +197,7 @@ class Watcher(object):
|
||||||
|
|
||||||
|
def get_changed_glob_files(self, path, ignore=None):
|
||||||
|
"""Check if glob path has any changed filepaths."""
|
||||||
|
- if sys.version_info[0] >=3 and sys.version_info[1] >=5:
|
||||||
|
- files = glob.glob(path, recursive=True)
|
||||||
|
- else:
|
||||||
|
- files = glob.glob(path)
|
||||||
|
+ files = glob.glob(path, recursive=True)
|
||||||
|
changed_files = [f for f in files if self.is_file_changed(f, ignore)]
|
||||||
|
return changed_files
|
||||||
|
|
||||||
|
Index: python-livereload-2.6.3/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- python-livereload-2.6.3.orig/setup.py
|
||||||
|
+++ python-livereload-2.6.3/setup.py
|
||||||
|
@@ -35,7 +35,6 @@ setup(
|
||||||
|
install_requires=[
|
||||||
|
'tornado;python_version>"2.7"',
|
||||||
|
'tornado<6;python_version=="2.7"',
|
||||||
|
- 'six',
|
||||||
|
],
|
||||||
|
license='BSD',
|
||||||
|
include_package_data=True,
|
||||||
@@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 13 12:30:12 UTC 2023 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- do not require python-six
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/lepture/python-livereload/commit/5165fedf96b161bf146fa31893c2e99b78570977
|
||||||
|
+ python-livereload-no-python2.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 27 10:45:13 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
Mon Feb 27 10:45:13 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ License: BSD-2-Clause
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://livereload.readthedocs.io/en/latest/
|
URL: https://livereload.readthedocs.io/en/latest/
|
||||||
Source: https://github.com/lepture/python-livereload/archive/%{version}.tar.gz
|
Source: https://github.com/lepture/python-livereload/archive/%{version}.tar.gz
|
||||||
|
# https://github.com/lepture/python-livereload/commit/5165fedf96b161bf146fa31893c2e99b78570977
|
||||||
|
Patch0: python-livereload-no-python2.patch
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
|
|||||||
Reference in New Issue
Block a user