From 5d25607a3a9fb1c1e0f56b40cffc825847e1cd6d Mon Sep 17 00:00:00 2001 From: shirt-dev <2660574+shirt-dev@users.noreply.github.com> Date: Thu, 11 Feb 2021 06:46:02 -0500 Subject: [PATCH] #75 Change optional dependency from `Crypto` to `pycryptodome` (Closes #74) Authored-by: shirtjs <2660574+shirtjs@users.noreply.github.com> (shirt-dev) pycryptodome is an in-place replacement for Crypto and is more actively developed --- .github/workflows/build.yml | 4 ++-- README.md | 4 ++-- pyinst.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e215de6c..b3275a523 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,7 +84,7 @@ jobs: with: python-version: '3.8' - name: Install Requirements - run: pip install pyinstaller mutagen Crypto + run: pip install pyinstaller mutagen pycryptodome - name: Bump version id: bump_version run: python devscripts/update-version.py @@ -122,7 +122,7 @@ jobs: python-version: '3.4.4' architecture: 'x86' - name: Install Requirements for 32 Bit - run: pip install pyinstaller==3.5 mutagen Crypto + run: pip install pyinstaller==3.5 mutagen pycryptodome - name: Bump version id: bump_version run: python devscripts/update-version.py diff --git a/README.md b/README.md index 01a969e0a..0303f1d50 100644 --- a/README.md +++ b/README.md @@ -106,9 +106,9 @@ ### UPDATE ### COMPILE **For Windows**: -To build the Windows executable, you must have pyinstaller (and optionally mutagen and Crypto) +To build the Windows executable, you must have pyinstaller (and optionally mutagen and pycryptodome) - python -m pip install --upgrade pyinstaller mutagen Crypto + python -m pip install --upgrade pyinstaller mutagen pycryptodome Once you have all the necessary dependancies installed, just run `py pyinst.py`. The executable will be built for the same architecture (32/64 bit) as the python used to build it. It is strongly reccomended to use python3 although python2.6+ is supported. diff --git a/pyinst.py b/pyinst.py index b6608de22..c73a770db 100644 --- a/pyinst.py +++ b/pyinst.py @@ -72,7 +72,7 @@ '--exclude-module=test', '--exclude-module=ytdlp_plugins', '--hidden-import=mutagen', - '--hidden-import=Crypto', + '--hidden-import=pycryptodome', 'youtube_dlc/__main__.py', ]) SetVersion('dist/youtube-dlc%s.exe' % _x86, VERSION_FILE) diff --git a/requirements.txt b/requirements.txt index 1e880eb51..97a6859ef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ mutagen -Crypto +pycryptodome diff --git a/setup.py b/setup.py index 383ad370e..09e2c84c9 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ '**PS**: Many links in this document will not work since this is a copy of the README.md from Github', open("README.md", "r", encoding="utf-8").read())) -REQUIREMENTS = ['mutagen', 'Crypto'] +REQUIREMENTS = ['mutagen', 'pycryptodome'] if len(sys.argv) >= 2 and sys.argv[1] == 'py2exe':