Skip to content

Video editing with Python

Fix importing version break install

osaajanifeda255c62e0
diff --git a/setup.py b/setup.py
index 7f1cae42..222f285d 100644
--- a/setup.py
+++ b/setup.py
@@ -3,8 +3,7 @@
import sys
from pathlib import Path
-from moviepy.version import __version__
-
+import runpy
try:
from setuptools import find_packages, setup
from setuptools.command.test import test as TestCommand
@@ -22,6 +21,8 @@ except ImportError:
)
+__version__=runpy.run_path('moviepy/version.py').get('__version__')
+
class PyTest(TestCommand):
"""Handle test execution from setup."""