Skip to content

Commit

Permalink
Don't execute 'version.py' file in installation script
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed Apr 15, 2021
1 parent 2f7e434 commit 6bf52e0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
"""MoviePy setup script."""

import os
import sys
from codecs import open

Expand Down Expand Up @@ -65,8 +66,10 @@ def run_tests(self):

cmdclass["build_docs"] = BuildDoc

__version__ = None # Explicitly set version to quieten static code checkers.
exec(open("moviepy/version.py").read()) # loads __version__
__version__ = None
with open(os.path.join("moviepy", "version.py"), "r", "utf-8") as f:
__version__ = f.read().split(" ")[2].strip("\n").strip('"')


# Define the requirements for specific execution needs.
requires = [
Expand Down

0 comments on commit 6bf52e0

Please sign in to comment.