Skip to content

Commit

Permalink
[tools/mec] Fix the NOX to use the latest package (Samsung#14367)
Browse files Browse the repository at this point in the history
If there're multiple versions of package in the dist directory,
the NOX used the oldest version. So, it fixes the NOX script to
find the latest version even if there're multiple packages.

ONE-DCO-1.0-Signed-off-by: Jonghwa Lee <[email protected]>
  • Loading branch information
batcheu authored Nov 26, 2024
1 parent ee810f9 commit fe7b781
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/model_explorer_circle/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ def tests(session):
build_and_check_dists(session)

generated_files = os.listdir("dist/")
generated_sdist = os.path.join("dist/", generated_files[1])
# Sort files in descending order according to the version
generated_files.sort(
key=lambda x: [int(i, 10) for i in x.split('-')[1].split('.')[:3]], reverse=True)
# The sdist file 'model_explorer_circle.x.x.x.tar.gz' would be used
generated_sdist = os.path.join("dist/", generated_files[0])

session.install(generated_sdist)

Expand Down

0 comments on commit fe7b781

Please sign in to comment.