Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pyinstaller from 5.0 to 6.3.0 in /tools/deps #4403

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
53cafbb
Bump pyinstaller from 5.0 to 6.3.0 in /tools/deps
dependabot[bot] Dec 14, 2023
cbe7470
Bump pyinstaller from 5.0 to 6.3.0 in /tools/deps
dependabot[bot] Jan 16, 2024
0a0663d
Merge branch 'dependabot/pip/tools/deps/pyinstaller-6.3.0' of https:/…
swetayadav1 Jan 16, 2024
2f8a65a
Bump pyinstaller-hooks-contrib from 2021.2 to 2023.12 in /tools/deps …
dependabot[bot] Jan 16, 2024
586bf48
Bump pywin32-ctypes from 0.2.0 to 0.2.2 in /tools/deps (#4162)
dependabot[bot] Jan 16, 2024
a5b624b
Bump pefile from 2021.5.24 to 2023.2.7 in /tools/deps (#4212)
dependabot[bot] Jan 16, 2024
b864816
Bump macholib from 1.14 to 1.16.3 in /tools/deps (#4184)
dependabot[bot] Jan 16, 2024
121e870
Bump altgraph from 0.17 to 0.17.4 in /tools/deps (#4179)
dependabot[bot] Jan 16, 2024
7ce1af5
Update 5.5.0.md
swetayadav1 Jan 16, 2024
b7b5896
Merge branch 'dependabot/pip/tools/deps/pyinstaller-6.3.0' of https:/…
swetayadav1 Jan 16, 2024
fd5b9a0
Added importlib-metadata, packaging and zipp
swetayadav1 Jan 16, 2024
17acf32
Added importlib-metadat in requirement.txt file
swetayadav1 Jan 16, 2024
f22b7e5
Merge branch 'dependabot/pip/tools/deps/pyinstaller-6.3.0' of https:/…
swetayadav1 Jan 17, 2024
31994ef
Replaced disutil.version with packaging.version
swetayadav1 Jan 19, 2024
a75278b
Merge branch 'master' into dependabot/pip/tools/deps/pyinstaller-6.3.0
swetayadav1 Jan 19, 2024
91c8f2c
added logs to debug release issue for Pyinstaller
swetayadav1 Jan 22, 2024
51c1162
Merge branch 'dependabot/pip/tools/deps/pyinstaller-6.3.0' of https:/…
swetayadav1 Jan 22, 2024
c6cf674
Replaced Distutils LooseVersion to Distlib LegacyVersion
swetayadav1 Jan 23, 2024
8aaaf7a
Replaced distutil Losseversion with Packaging.version.parse
swetayadav1 Jan 23, 2024
759f1da
Added Framework folder for code sign
swetayadav1 Jan 24, 2024
f61a810
Removed filter from framework folder codesign
swetayadav1 Jan 24, 2024
27eca43
removed lib folder from framework
swetayadav1 Jan 29, 2024
aa7cc15
Codesign Framework
swetayadav1 Jan 29, 2024
0485e90
Added regex to remove Particles__dot__2 folder
swetayadav1 Jan 29, 2024
5085b7a
Removed folders from resource folder that are available in framework
swetayadav1 Jan 29, 2024
258f5c3
Added more code verify checks
swetayadav1 Jan 30, 2024
6b4881e
Modified fix_app_qt_folder_name file
swetayadav1 Jan 30, 2024
6e4236d
Modified fix_app_qt_folder_name file
swetayadav1 Jan 30, 2024
3a759eb
move QT/lib folder to Resource folder
swetayadav1 Jan 30, 2024
07a0ea6
check notary logs
swetayadav1 Jan 30, 2024
740d489
Added codesign validation for pyqt5 folder in framework
swetayadav1 Jan 31, 2024
8071fc3
Merge branch 'master' into dependabot/pip/tools/deps/pyinstaller-6.3.0
mr-shekhar May 7, 2024
d295522
Update requirements.txt
mr-shekhar May 7, 2024
47b9851
Update requirements.txt
mr-shekhar May 7, 2024
efa573c
Merge branch 'master' into dependabot/pip/tools/deps/pyinstaller-6.3.0
swetayadav1 May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/changes/5.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Release date: `2024-xx-xx`
- Upgraded `actions/download-artifact` from 3 to 4
- Upgraded `actions/setup-python` from 4 to 5
- Upgraded `actions/upload-artifact` from 3 to 4
- Upgraded `altgraph` from 0.17 to 0.17.4
- Upgraded `apipkg` from 1.5 to 3.0.2
- Upgraded `attrs` from 23.1.0 to 23.2.0
- Upgraded `authlib` from 1.1.0 to 1.3.0
Expand All @@ -69,6 +70,7 @@ Release date: `2024-xx-xx`
- Upgraded `idna` from 3.4 to 3.6
- Upgraded `importlib-metadata` from 6.8.0 to 7.0.1
- Upgraded `junitparser` from 3.1.0 to 3.1.1
- Upgraded `macholib` from 1.14 to 1.16.3
- Upgraded `more-itertools` from 10.1.0 to 10.2.0
- Upgraded `packaging` from 23.1 to 24.0
- Upgraded `pathspec` from 0.11.2 to 0.12.1
Expand All @@ -78,6 +80,8 @@ Release date: `2024-xx-xx`
- Upgraded `pip-tools` from 6.5.1 to 7.4.1
- Upgraded `platformdirs` from 3.10.0 to 4.2.0
- Upgraded `pluggy` from 1.3.0 to 1.4.0
- Upgraded `pyinstaller` from 5.0 to 6.3.0
- Upgraded `pyinstaller-hooks-contrib` from 2021.2 to 2023.12
- Upgraded `pycodestyle` from 2.11.0 to 2.11.1
- Upgraded `pyfakefs` from 5.3.4 to 5.3.5
- Upgraded `pyinstaller` from 5.0 to 5.13.2
Expand Down
1 change: 1 addition & 0 deletions nxdrive/fatal_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ def check_os_version() -> bool:
"""Check that the current OS version is supported."""

if MAC:
# from distutils.version import StrictVersion
from platform import mac_ver

from packaging.version import parse
Expand Down
5 changes: 4 additions & 1 deletion tools/cleanup_application_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"PyQt*/Qt/qml/QtQuick/Controls.2/designer",
"PyQt*/Qt/qml/QtQuick/Extras/designer",
"PyQt*/Qt/qml/QtQuick/Particles.2",
"PyQt*/Qt/qml/QtQuick/Particles__dot__2",
"PyQt*/Qt/qml/QtQuick/Scene*",
"PyQt*/Qt/qml/QtRemoteObjects",
"PyQt*/Qt/qml/QtSensors",
Expand Down Expand Up @@ -123,7 +124,9 @@ def main(args: List[str]) -> int:
for folder in args:
print(f">>> [{folder}] Purging unneeded files")
for file in find_useless_files(Path(folder)):
if file.is_dir():
if file.is_symlink():
os.unlink(file)
elif file.is_dir():
shutil.rmtree(file)
else:
os.remove(file)
Expand Down
44 changes: 22 additions & 22 deletions tools/deps/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@
# Modules needed by the application.
# This file is used to build fresh binaries.
#
altgraph==0.17 \
--hash=sha256:c623e5f3408ca61d4016f23a681b9adb100802ca3e3da5e718915a9e4052cebe \
--hash=sha256:1f05a47122542f97028caf78775a095fbe6a2699b5089de8477eb583167d69aa
altgraph==0.17.4 \
--hash=sha256:1b5afbb98f6c4dcadb2e2ae6ab9fa994bbb8c1d75f4fa96d340f9437ae454406 \
--hash=sha256:642743b4750de17e655e6711601b077bc6598dbfa3ba5fa2b2a35ce12b508dff
# via pyinstaller
future==0.18.3; sys_platform == "win32" \
--hash=sha256:34a17436ed1e96697a86f9de3d15a3b0be01d8bc8de9c1dffd59fb8234ed5307
# via pefile
macholib==1.14 ; sys_platform == "darwin" \
--hash=sha256:c500f02867515e6c60a27875b408920d18332ddf96b4035ef03beddd782d4281 \
--hash=sha256:0c436bc847e7b1d9bda0560351bf76d7caf930fb585a828d13608839ef42c432
macholib==1.16.3 ; sys_platform == "darwin" \
--hash=sha256:07ae9e15e8e4cd9a788013d81f5908b3609aa76f9b1421bae9c4d7606ec86a30 \
--hash=sha256:0e315d7583d38b8c77e815b1ecbdbf504a8258d8b3e17b61165c6feb60d18f2c
# via pyinstaller
pefile==2023.2.7 ; sys_platform == "win32" \
--hash=sha256:82e6114004b3d6911c77c3953e3838654b04511b8b66e8583db70c65998017dc \
--hash=sha256:da185cd2af68c08a6cd4481f7325ed600a88f6a813bad9dea07ab3ef73d8d8d6
# via pyinstaller
pyinstaller==5.13.2 \
--hash=sha256:16cbd66b59a37f4ee59373a003608d15df180a0d9eb1a29ff3bfbfae64b23d0f \
--hash=sha256:27cd64e7cc6b74c5b1066cbf47d75f940b71356166031deb9778a2579bb874c6 \
--hash=sha256:2c2fe9c52cb4577a3ac39626b84cf16cf30c2792f785502661286184f162ae0d \
--hash=sha256:421cd24f26144f19b66d3868b49ed673176765f92fa9f7914cd2158d25b6d17e \
--hash=sha256:65133ed89467edb2862036b35d7c5ebd381670412e1e4361215e289c786dd4e6 \
--hash=sha256:7d51734423685ab2a4324ab2981d9781b203dcae42839161a9ee98bfeaabdade \
--hash=sha256:8f6dd0e797ae7efdd79226f78f35eb6a4981db16c13325e962a83395c0ec7420 \
--hash=sha256:aadafb6f213549a5906829bb252e586e2cf72a7fbdb5731810695e6516f0ab30 \
--hash=sha256:b2e1c7f5cceb5e9800927ddd51acf9cc78fbaa9e79e822c48b0ee52d9ce3c892 \
--hash=sha256:c63ef6133eefe36c4b2f4daf4cfea3d6412ece2ca218f77aaf967e52a95ac9b8 \
--hash=sha256:c8e5d3489c3a7cc5f8401c2d1f48a70e588f9967e391c3b06ddac1f685f8d5d2 \
--hash=sha256:ddcc2b36052a70052479a9e5da1af067b4496f43686ca3cdda99f8367d0627e4
pyinstaller-hooks-contrib==2023.8 \
--hash=sha256:318ccc316fb2b8c0bbdff2456b444bf1ce0e94cb3948a0f4dd48f6fc33d41c01 \
--hash=sha256:d091a52fbeed71cde0359aa9ad66288521a8441cfba163d9446606c5136c72a8
pyinstaller==6.3.0 \
--hash=sha256:0597fb04337695e5cc5250253e0655530bf14f264b7a5b7d219cc65f6889c4bd \
--hash=sha256:156b32ba943e0090bcc68e40ae1cb68fd92b7f1ab6fe0bdf8faf3d3cfc4e12dd \
--hash=sha256:1eadbd1fae84e2e6c678d8b4ed6a232ec5c8fe3a839aea5a3071c4c0282f98cc \
--hash=sha256:41c937fe8f07ae02009b3b5a96ac3eb0800a4f8a97af142d4100060fe2135bb9 \
--hash=sha256:75a6f2a6f835a2e6e0899d10e60c10caf5defd25aced38b1dd48fbbabc89de07 \
--hash=sha256:886b3b995b674905a20ad5b720b47cc395897d7b391117831027a4c8c5d67a58 \
--hash=sha256:914d4c96cc99472e37ac552fdd82fbbe09e67bb592d0717fcffaa99ea74273df \
--hash=sha256:96c37a1ee5b2fd5bb25c098ef510661d6d17b6515d0b86d8fc93727dd2475ba3 \
--hash=sha256:abe91106a3bbccc3f3a27af4325676ecdb6f46cb842ac663625002a870fc503b \
--hash=sha256:b721d793a33b6d9946c7dd95d3ea7589c0424b51cf1b9fe580f03c544f1336b2 \
--hash=sha256:de25beb176f73a944758553caacec46cc665bf3910ad8a174706d79cf6e95340 \
--hash=sha256:e436fcc0ea87c3f132baac916d508c24c84a8f6d8a06c3154fbc753f169b76c7
pyinstaller-hooks-contrib==2023.12 \
--hash=sha256:11a9d59d903723dd693e8c10b054f3ea1ecad390623c9fa527c731d715fc5b3f \
--hash=sha256:6a601a0d783fa725327fc6ac712779475dc8979f639419c7fcd460dd8d0a6d2a
# via pyinstaller
pywin32-ctypes==0.2.2 ; sys_platform == "win32" \
--hash=sha256:3426e063bdd5fd4df74a14fa3cf80a0b42845a87e1d1e81f6549f9daec593a60 \
Expand Down
3 changes: 3 additions & 0 deletions tools/deps/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ idna==3.6 \
--hash=sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca \
--hash=sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f
# via requests
importlib-metadata==7.0.1 \
--hash=sha256:4805911c3a4ec7c3966410053e9ec6a1fecd629117df5adee56dfc9432a1081e \
--hash=sha256:f238736bb06590ae52ac1fab06a3a9ef1d8dce2b7a35b5ab329371d6c8f5d2cc
jmespath==1.0.1 \
--hash=sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980 \
--hash=sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe
Expand Down
9 changes: 9 additions & 0 deletions tools/osx/deploy_ci_agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ create_package() {
# yet. But the find command will eventually reach it and sign it later.
find "${pkg_path}/Contents/MacOS" -type f -exec ${CODESIGN} "${SIGNING_ID}" --force {} \;

find "${pkg_path}/Contents/Frameworks" -type f -exec ${CODESIGN} "${SIGNING_ID}" --force {} \;

# QML libraries need to be signed too for the notarization
find "${pkg_path}/Contents/Resources" -type f -name "*.dylib" -exec ${CODESIGN} "${SIGNING_ID}" --force {} \;

Expand All @@ -129,8 +131,15 @@ create_package() {

echo ">>> [sign] Verifying code signature"
codesign --display --verbose "${pkg_path}"
echo ">>> [sign] Verifying code signature1"
codesign --verbose=4 --deep --strict "${pkg_path}/Contents/Frameworks/PyQt5"
echo ">>> [sign] Verifying framework PyQt5"
#codesign --verbose=4 --deep --strict "${pkg_path}/Contents/Frameworks/PyQt5/Qt/qml/QtQml"
#echo ">>> [sign] Verifying framework QtQml done"
codesign --verbose=4 --deep --strict "${pkg_path}"
echo ">>> [sign] Verifying code signature2"
spctl --assess --verbose "${pkg_path}"
echo ">>> [sign] Verifying code signature3"
fi

echo ">>> [package] Creating the DMG file"
Expand Down
19 changes: 18 additions & 1 deletion tools/osx/fix_app_qt_folder_names_for_codesign.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def find_problematic_folders(folder: Path) -> Generator[Path, None, None]:
if not path.is_dir() or path.is_symlink():
# Skip simlinks as they are allowed (even with a dot)
continue
if "qml" == path.name:
if "qml" == path.name: # or "lib" == path.name:
yield path
else:
yield from find_problematic_folders(path)
Expand Down Expand Up @@ -97,6 +97,22 @@ def move_contents_to_resources(folder: Path) -> Generator[Path, None, None]:
yield sibling


def remove_pyqt_folder_from_resource(folder: Path) -> None:
"""Remove PyQT5 folder."""
shutil.rmtree(folder / "Contents" / "Resources" / "PyQt5")
shutil.rmtree(folder / "Contents" / "Frameworks" / "PyQt5")
shutil.copytree(
(folder.parent / "ndrive" / "_internal" / "PyQt5"),
(folder / "Contents" / "Frameworks" / "PyQt5"),
)

# Remove unnesecceary symlinks from Resource folder
# res_folder = folder / "Contents" / "Resources"
"""for path in res_folder.iterdir():
if path.is_symlink():
os.unlink(path)"""


def main(args: List[str]) -> int:
"""
Fix the application to allow codesign (NXDRIVE-1301).
Expand All @@ -109,6 +125,7 @@ def main(args: List[str]) -> int:
"""
for app in args:
name = os.path.basename(app)
# remove_pyqt_folder_from_resource(Path(app))
print(f">>> [{name}] Fixing Qt folder names")
path = Path(app) / "Contents" / "MacOS"
for folder in find_problematic_folders(path):
Expand Down
5 changes: 4 additions & 1 deletion tools/osx/notarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ def main(file: str, uuid: str = "") -> int:

if not status or status != "Accepted":
print(" !! Notarization failed. Check the report for details.", flush=True)
notary_logs_path = fetch_notarization_logs(uuid)
if notary_logs_path:
display_notarization_logs(notary_logs_path)
return 2

notary_logs_path = fetch_notarization_logs(uuid)
Expand All @@ -177,7 +180,7 @@ def main(file: str, uuid: str = "") -> int:
return 3

# Below method will display notarization logs (Useful in case issue occurs during notarization)
# display_notarization_logs(notary_logs_path)
display_notarization_logs(notary_logs_path)

staple_the_notarization(file)
return 0
Expand Down
11 changes: 9 additions & 2 deletions tools/posix/deploy_ci_agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,17 @@ build_installer() {
local version

echo ">>> Building the release package"
${PYTHON_VENV} -m PyInstaller ndrive.spec --clean --noconfirm
${PYTHON_VENV} -m PyInstaller ndrive.spec --clean --noconfirm #--onedir #--log-level=DEBUG

# Do some clean-up
# Do some clean-up for parent directory
${PYTHON_VENV} tools/cleanup_application_tree.py dist/ndrive

# Do some clean-up for _internal directory
${PYTHON_VENV} tools/cleanup_application_tree.py dist/ndrive/_internal

# Remove compiled QML symlinks
find dist -depth -type l -name "*.qmlc" -delete

# Remove compiled QML files
find dist -depth -type f -name "*.qmlc" -delete

Expand All @@ -48,6 +54,7 @@ build_installer() {

if [ "${OSI}" = "osx" ]; then
${PYTHON_VENV} tools/cleanup_application_tree.py dist/*.app/Contents/Resources
${PYTHON_VENV} tools/cleanup_application_tree.py dist/*.app/Contents/Frameworks
${PYTHON_VENV} tools/cleanup_application_tree.py dist/*.app/Contents/MacOS

# Move problematic folders out of Contents/MacOS
Expand Down
Loading