gvsbuild icon indicating copy to clipboard operation
gvsbuild copied to clipboard

Python install fails due to empty nuget feeds

Open new-divos opened this issue 3 years ago • 1 comments

When I tried to build gtk4 on windows 11 I got an error:

Cleaning up the build environment Checking msys tool Using C:\tools\msys64 for msys installation Checking Msvc tool

Visual Studio installation(s) found: Visual Studio Build Tools 2022 @ C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools

Using Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools Downloading packages C:\gtk-build\src\harfbuzz-5.0.1.tar.xz - Download finished Building project nuget (6.2.1) Feeds used:

Argument cannot be null or empty Имя параметра: primarySources Traceback (most recent call last): File "C:\gtk-build\github\gvsbuild.venv\lib\site-packages\gvsbuild\utils\builder.py", line 531, in build if self.__build_one(p): File "C:\gtk-build\github\gvsbuild.venv\lib\site-packages\gvsbuild\utils\builder.py", line 624, in __build_one proj.prepare_build_dir() File "C:\gtk-build\github\gvsbuild.venv\lib\site-packages\gvsbuild\utils\base_project.py", line 390, in prepare_build_dir self.unpack() File "C:\gtk-build\github\gvsbuild.venv\lib\site-packages\gvsbuild\tools.py", line 325, in unpack self.mark_deps = self.setup(True) File "C:\gtk-build\github\gvsbuild.venv\lib\site-packages\gvsbuild\tools.py", line 298, in setup subprocess.check_call(cmd, shell=True) File "C:\Users\divos.pyenv\pyenv-win\versions\3.10.5\lib\subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'C:\gtk-build\tools\nuget-6.2.1\nuget.exe install python -Version 3.10.5 -OutputDirectory C:\gtk-build\tools' returned non-zero exit status 1. Error: python build failed

new-divos avatar Jul 28 '22 14:07 new-divos

Hi @new-divos, thanks for submitting the new issue. I am trying to reproduce this, so please allow me to ask a few questions.

Do you have a NuGet.Config file at %APPDATA%\nuget? If so, can you please post the contents of that file? If you rename or delete the file, does your build now work?

Some background: We really only just download the nuget CLI tool and copy it to the tools directory. For a new installation of nuget, it should create a new valid config with a valid source listed. I am thinking somehow a previous version of nuget corrupted the config file to be a non-valid XML file. You aren't the only one to have gotten that error, so there must be a more widespread issue with nuget.

Longer term: I don't really think it is great that we launch gvsbuild with Python, and then install another version of Python. We should add some tests to gvsbuild (there aren't currently any) and support the last 3 versions of Python, which would help prevent the need for this.

danyeaw avatar Jul 29 '22 01:07 danyeaw

We have dropped using nuget to download Python, and are now using the executable that launched gvsbuild.

danyeaw avatar Nov 14 '22 01:11 danyeaw