1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00

multimedia/py-moviepy: Unmark DEPRECATED and remove EXPIRATION_DATE

- Change RUN_DEPENDS from py-decorator4 to py-decorator
- Remove numpy workaround
- Bump PORTREVISION for dependency change

Obtained from:	2947e4a036
This commit is contained in:
Po-Chuan Hsieh 2022-01-12 01:16:01 +08:00
parent af68bec014
commit 4c26a0aa05
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B
4 changed files with 52 additions and 14 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= moviepy
PORTVERSION= 1.0.3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= multimedia python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -11,11 +11,8 @@ COMMENT= Video editing with Python
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENCE.txt
DEPRECATED= Depends on expired devel/py-decorator4
EXPIRATION_DATE=2022-03-31
RUN_DEPENDS= ffmpeg:multimedia/ffmpeg \
${PYTHON_PKGNAMEPREFIX}decorator4>=4.0.2<5.0:devel/py-decorator4@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}decorator>=4.0.2<6.0:devel/py-decorator@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}imageio>=2.5<3.0:graphics/py-imageio@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}imageio-ffmpeg>=0.2.0:graphics/py-imageio-ffmpeg@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \

View File

@ -0,0 +1,40 @@
Obtained from: https://github.com/Zulko/moviepy/commit/2947e4a036513a264de3fc5234160e71d1b06aed
--- moviepy/decorators.py.orig 2020-05-07 15:34:11 UTC
+++ moviepy/decorators.py
@@ -3,6 +3,7 @@ all decorators used in moviepy go there
"""
import decorator
+import inspect
from moviepy.tools import cvsecs
@@ -76,12 +77,7 @@ def preprocess_args(fun,varnames):
""" Applies fun to variables in varnames before launching the function """
def wrapper(f, *a, **kw):
- if hasattr(f, "func_code"):
- func_code = f.func_code # Python 2
- else:
- func_code = f.__code__ # Python 3
-
- names = func_code.co_varnames
+ names = inspect.getfullargspec(func).args
new_a = [fun(arg) if (name in varnames) else arg
for (arg, name) in zip(a, names)]
new_kw = {k: fun(v) if k in varnames else v
@@ -120,12 +116,7 @@ def use_clip_fps_by_default(f, clip, *a, **k):
" the clip's fps with `clip.fps=24`" % f.__name__)
- if hasattr(f, "func_code"):
- func_code = f.func_code # Python 2
- else:
- func_code = f.__code__ # Python 3
-
- names = func_code.co_varnames[1:]
+ names = inspect.getfullargspec(func).args[1:]
new_a = [fun(arg) if (name=='fps') else arg
for (arg, name) in zip(a, names)]

View File

@ -1,11 +1,13 @@
--- setup.py.orig 2020-03-24 20:20:07 UTC
Obtained from: https://github.com/Zulko/moviepy/commit/2947e4a036513a264de3fc5234160e71d1b06aed
--- setup.py.orig 2020-05-07 15:34:11 UTC
+++ setup.py
@@ -67,7 +67,7 @@ requires = [
@@ -62,7 +62,7 @@ exec(open('moviepy/version.py').read()) # loads __vers
# Define the requirements for specific execution needs.
requires = [
- 'decorator>=4.0.2,<5.0',
+ 'decorator>=4.0.2,<6.0',
"imageio>=2.5,<3.0; python_version>='3.4'",
"imageio>=2.0,<2.5; python_version<'3.4'",
"imageio_ffmpeg>=0.2.0; python_version>='3.4'",
'tqdm>=4.11.2,<5.0',
- "numpy>=1.17.3; python_version!='2.7'",
+ "numpy>=0; python_version!='2.7'",
"numpy; python_version>='2.7'",
'requests>=2.8.1,<3.0',
'proglog<=1.0.0'

View File

@ -5,5 +5,4 @@ creation of custom effects.
MoviePy can read and write all the most common audio and video formats,
including GIF.
WWW: https://pypi.org/project/moviepy/
WWW: https://github.com/Zulko/moviepy