Coder Social home page Coder Social logo

Comments (3)

ndhaller avatar ndhaller commented on May 27, 2024

I ran some tests with various python installers. Only encountering problem with Python 3.11 on my system.

Base case:
On Windows 11 with Python 3.8.10 installed.
Build C:\git\edk2-edkrepo\dist\EdkRepoSetup-3.1.0.0.exe with Python 3.8.10
Install edkrepo 3.1.0 through EdkRepoSetup-3.1.0.0.exe
Uninstalled Python 3.8.10 using python-3.8.10-amd64.exe

Test 0: Fail (readme issue)
Attempt to install with no python installed.
"Error: Python version 3.8.8 or later is required to run EdkRepo. Please install it before continuing."
edk2-edkrepo readme shows "Python 3.5 or later" as Pre-Requisites, not "3.8.8".
readme needs to update python version requirement.
https://github.com/tianocore/edk2-edkrepo/blob/main/README.md

Test python 3.9.13: Pass
Install python-3.9.13-amd64.exe with default installation settings
Install edkrepo 3.1.0 through EdkRepoSetup-3.1.0.0.exe
Installation Successful
run some test commands:
edkrepo manifest
edkrepo clone
edkrepo status
edkrepo combo
edkrepo checkout
edkrepo sync -u
uninstall python-3.9.13-amd64.exe
delete any remaining content of C:\Users[username]\AppData\Local\Programs\Python

Test python 3.10.9: Pass
Install python-3.10.9-amd64.exe with default installation settings
Install edkrepo 3.1.0 through EdkRepoSetup-3.1.0.0.exe
Installation Successful
run some test commands:
edkrepo manifest
edkrepo clone
edkrepo status
edkrepo combo
edkrepo checkout
edkrepo sync -u
uninstall python-3.10.9-amd64.exe
delete any remaining content of C:\Users[username]\AppData\Local\Programs\Python

Test python 3.11.1: Fail
Install python-3.11.1-amd64.exe with default installation settings
Install edkrepo 3.1.0 through EdkRepoSetup-3.1.0.0.exe
Installation Error: Installation Failed.
"""
File "C:\Users[username]\AppData\Local\Programs\Python\Python311\Lib\site-packages\edkrepo\commands\command_factory.py", line 32, in _is_command
if func[0] == 'get_metadata' and len(inspect.getargspec(func[1])[0]) == 1:
^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
Unable to launch preferred entry point. Launching default entry point edkrepo.edkrepo_cli.py
Installation Error:
System.InvalidOperationException: generate-command-completion-script failed with status 1
at TianoCore.EdkRepoInstaller.InstallWorker.PerformInstall(Action2 ReportComplete, Action1 ReportProgress, Action1 AllowCancel, Func1 CancelPending)
at TianoCore.EdkRepoInstaller.ProgressWindow.WorkerThread()
Installation Failed.
"""

from edk2-edkrepo.

ndhaller avatar ndhaller commented on May 27, 2024

Python 3.11 deprecated inspect.getargspec()
https://docs.python.org/3.11/library/inspect.html

Python 3.8 and Python 3.9 and Python 3.10 and Python 3.11 support getfullargspec() as "usually a drop-in replacement" for getargspec().
https://docs.python.org/3.8/library/inspect.html
https://docs.python.org/3.9/library/inspect.html
https://docs.python.org/3.10/library/inspect.html
https://docs.python.org/3.11/library/inspect.html

Replacing both instances of getargspec() with getfullargspec(), and the EdkRepoSetup-3.1.0.0.exe installer can be built and run on Windows 11 with python-3.11.1-amd64.exe

With those two line changes, not seeing any other initial problems with using Python 3.11

Test python 3.11.1:
Install python-3.11.1-amd64.exe with default installation settings
py -3 -m pip install wheel
cd build-scripts
build_windows_installer.bat
cd ../dist
Install edkrepo 3.1.0 through EdkRepoSetup-3.1.0.0.exe
Installation Successful
run some test commands:
edkrepo manifest
edkrepo clone
edkrepo status
edkrepo combo
edkrepo checkout
edkrepo sync -u
python 3.11.1 basic functional tests pass

from edk2-edkrepo.

ndhaller avatar ndhaller commented on May 27, 2024

Confirmed, the Windows installer does not support Python 3.7.9. It is a hard installer failure, not optional:

Test python 3.7.9: fail
Install python-3.7.9-amd64.exe with default installation settings
Install edkrepo 3.1.0 through EdkRepoSetup-3.1.0.0.exe
Installation Failed:
"""
Found Python 3.7.9
Error: Python version 3.8.8 or later is required to run EdkRepo. Please install it before continuing.
Installation Failed.
"""

from edk2-edkrepo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.