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

new versions have no source distributions or arm64 wheels #601

Open
ViviMine opened this issue Jan 24, 2025 · 10 comments
Open

new versions have no source distributions or arm64 wheels #601

ViviMine opened this issue Jan 24, 2025 · 10 comments

Comments

@ViviMine
Copy link

ViviMine commented Jan 24, 2025

Hey,
I'm sorry if this is not really precise but I'm helped by someone else there
I tried to install pyxel on an arm64 but a lot of things goes wrong. First thing is that it only find the 1.8 version, I was told that I thought first it was because of missing thing like Cargo for Rust language, or VS 2022, but after everything it still doesn't work. It still saying that it can't find CMake.
I tried also to clone the git repository, but it keeps saying that I didn't installed CMake, but I did installed it and Virtual Studio 2022 with Desktop C++ tools and Windows SDK
Here is the git error I get for 1.8 which does have a source distribution:

  Using cached pyxel-1.8.5.tar.gz (1.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
info: please complete authentication in your browser...
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      💥 maturin failed
        Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
        Caused by: `cargo metadata` exited with an error:     Updating git repository `https://github.com/messense/cmake-rs.git`
      remote: Repository not found.
      fatal: repository 'https://github.com/messense/cmake-rs.git/' not found
      error: failed to load source for dependency `cmake`

      Caused by:
        Unable to update https://github.com/messense/cmake-rs.git?branch=cross-compile

      Caused by:
        failed to fetch into: C:\Users\minec\.cargo\git\db\cmake-rs-1a1c3c7fd02f9517

      Caused by:
        process didn't exit successfully: `git fetch --no-tags --force --update-head-ok https://github.com/messense/cmake-rs.git +refs/heads/cross-compile:refs/remotes/origin/cross-compile` (exit code: 128)
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', 'C:\\Users\\minec\\AppData\\Local\\Temp\\pip-modern-metadata-_r1888m7', '--interpreter', 'G:\\Programing Folder\Python\\.venv\\Scripts\\python.exe']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory C:\Users\minec\AppData\Local\Temp\pip-modern-metadata-_r1888m7 --interpreter G:\Programing Folder\Python\.venv\Scripts\python.exe`
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

And here is the msbuild error I get for 2.3 when I try to build from source:

Running `maturin pep517 build-wheel -i G:\Mon Drive\Programmation\Python\.venv\Scripts\python.exe --compatibility off --editable`
      ðŸ\x8d¹ Building a mixed python/rust project
      🔗 Found pyo3 bindings with abi3 support for Python ≥ 3.8
         Compiling pyxel-platform v2.3.0 (G:\Mon Drive\Programmation\Python\pyxel\rust\pyxel-platform)
      error: failed to run custom build command for `pyxel-platform v2.3.0 (G:\Mon Drive\Programmation\Python\pyxel\rust\pyxel-platform)`

      Caused by:
        process didn't exit successfully: `G:\Mon Drive\Programmation\Python\pyxel\rust\target\release\build\pyxel-platform-3829ce30b08c5b63\build-script-build` (exit code: 101)
        --- stdout
        CMAKE_TOOLCHAIN_FILE_aarch64-pc-windows-msvc = None
        CMAKE_TOOLCHAIN_FILE_aarch64_pc_windows_msvc = None
        HOST_CMAKE_TOOLCHAIN_FILE = None
        CMAKE_TOOLCHAIN_FILE = None
        CMAKE_GENERATOR_aarch64-pc-windows-msvc = None
        CMAKE_GENERATOR_aarch64_pc_windows_msvc = None
        HOST_CMAKE_GENERATOR = None
        CMAKE_GENERATOR = None
        CMAKE_PREFIX_PATH_aarch64-pc-windows-msvc = None
        CMAKE_PREFIX_PATH_aarch64_pc_windows_msvc = None
        HOST_CMAKE_PREFIX_PATH = None
        CMAKE_PREFIX_PATH = None
        CMAKE_aarch64-pc-windows-msvc = None
        CMAKE_aarch64_pc_windows_msvc = None
        HOST_CMAKE = None
        CMAKE = None
        running: "cmake" "G:\\Mon Drive\\Programmation\\Python\\pyxel\\rust\\target\\release\\build\\pyxel-platform-000c95749b2cecf3\\out/SDL2-2.28.4" "-G" "Visu
al Studio 17 2022" "-Thost=x64" "-AARM64" "-DSDL_SHARED=OFF" "-DSDL_STATIC=ON" "-DSDL_MAIN_HANDLED=ON" "-DCMAKE_INSTALL_PREFIX=G:\\Mon Drive\\Programmation\\Pyth
on\\pyxel\\rust\\target\\release\\build\\pyxel-platform-000c95749b2cecf3\\out" "-DCMAKE_C_FLAGS= -D__FLTUSED__ -nologo -MD -Brepro" "-DCMAKE_C_FLAGS_RELEASE= -D_
_FLTUSED__ -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_BUILD_TYPE=release"
        -- Configuring incomplete, errors occurred!

        --- stderr
        CMake Deprecation Warning at CMakeLists.txt:8 (cmake_minimum_required):
          Compatibility with CMake < 3.10 will be removed from a future version of
          CMake.

          Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
          to tell CMake that the project requires at least <min> but has been updated
          to work with policies introduced by <max> or earlier.


        CMake Error at CMakeLists.txt:9 (project):
          Failed to run MSBuild command:

            C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/arm64/MSBuild.exe

          to get the value of VCTargetsPath:

            Version MSBuild 17.12.12+1cce77968 pour .NET Framework
            Generation started at 23/01/2025 22:44:13.

            Project "G:\Mon Drive\Programmation\Python\pyxel\rust\target\release\build\pyxel-platform-000c95749b2cecf3\out\build\CMakeFiles\3.31.4\VCTargetsPath.vcxproj" on node 1 (default target).
            C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(844,5): error : The 
BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified a valid combination of Conf
iguration and Platform for this project.  Configuration='Debug'  Platform='ARM64'.  You may be seeing this message because you are trying to build a project with
out a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [G:\Mon Drive\Programmation\Python\pyxel\rust\target\release\build\pyxel-platform-000c95749b2cecf3\out\build\CMakeFiles\3.31.4\VCTargetsPath.vcxproj]
            Generation of the project "G:\Mon Drive\Programmation\Python\pyxel\rust\target\release\build\pyxel-platform-000c95749b2cecf3\out\build\CMakeFiles\3.31.4\VCTargetsPath.vcxproj" ended (default target) -- ERROR.

            ERROR of the build.

            "G:\Mon Drive\Programmation\Python\pyxel\rust\target\release\build\pyxel-platform-000c95749b2cecf3\out\build\CMakeFiles\3.31.4\VCTargetsPath.vcxproj" (default target) (1) ->
            (_CheckForInvalidConfigurationAndPlatform cible) ->
              C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\arm64\Microsoft.Common.CurrentVersion.targets(844,5): error : Th
e BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified a valid combination of Co
nfiguration and Platform for this project.  Configuration='Debug'  Platform='ARM64'.  You may be seeing this message because you are trying to build a project wi
thout a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [G:\Mon Drive\Programmation\Python\pyxel\rust\target\release\build\pyxel-platform-000c95749b2cecf3\out\build\CMakeFiles\3.31.4\VCTargetsPath.vcxproj]

                0 Warning(s)
                1 Error(s)

            Time estimated 00:00:00.86


          Exit code: 1



        thread 'main' panicked at C:\Users\minec\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.52\src\lib.rs:1115:5:

        command did not execute successfully, got: exit code: 1

        build script failed, must exit now
        note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit code: 101": `"cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "G:\\Mon Drive\\Programmation\\Python\\pyxel\\rust\\pyxel-wrapper\\Cargo.toml" "--release" "--lib"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', 'G:\\Mon Drive\\Programmation\\Python\\.venv\\Scripts\\python.exe', '--compatibility', 'off', '--editable'] returned non-zero exit status 1
@ViviMine ViviMine changed the title ARM64 incompatibility + no source distribution new versions have no source distributions or arm64 wheels Jan 24, 2025
@kitao
Copy link
Owner

kitao commented Jan 25, 2025

For Linux, Pyxel wheel includes the following targets:

  • x86_64-unknown-linux-gnu
  • i686-unknown-linux-gnu
  • aarch64-unknown-linux-gnu
  • armv7-unknown-linux-gnueabihf

Some users run Pyxel on ARM64 Chromebook by using Pyxel wheel, I think.

@ViviMine
Copy link
Author

I'm on windows :(

@kitao
Copy link
Owner

kitao commented Jan 25, 2025

In that case, just download the source code from GitHub and follow this instruction:
https://github.com/kitao/pyxel/blob/main/Makefile

@ViviMine
Copy link
Author

I can't execute the make clean install command, I guess I'm doing it wrong, everything is set up

@ViviMine
Copy link
Author

I've tried to execute the Makefile by hand and even that it keep failing saying that cmake doesn't exists. I had this error before and I fixed it by going on the cmd. But now even in the cmd it doesn't work

@kitao
Copy link
Owner

kitao commented Feb 11, 2025

Try executing Pyxel's self-build process by following the steps written in the Makefile.
Since Pyxel's Makefile simply calls a series of commands, an error like "cmake not found" indicates that the necessary commands are not properly installed in your build environment.
On Windows, the build process assumes a Git Bash environment. Is everything set up correctly on your end?

@ViviMine
Copy link
Author

ViviMine commented Feb 11, 2025

Isn't what I did when I manually done the "make clean install" command? I've done by step all things in clean and install, and it crashed the same à a certain command, I'll redo the process on another project to get the precise command that crashes
EDIT: my bad I've done "make clean build", is there any differences?

@ViviMine
Copy link
Author

Also yes I have git bash

@ViviMine
Copy link
Author

ViviMine commented Feb 11, 2025

It crashed at the maturin command in the build thing:

error: failed to run custom build command for `pyxel-platform v2.3.6 (G:\Mon Drive\Programmation\TempPython\pyxel\rust\pyxel-platform)`

Caused by:
process didn't exit successfully: `G:\Mon Drive\Programmation\TempPython\pyxel\rust\target\release\build\pyxel-platform-d2c6d62507dd53d7\build-script-build` (exit code: 101)
--- stdout
CMAKE_TOOLCHAIN_FILE_aarch64-pc-windows-msvc = None
CMAKE_TOOLCHAIN_FILE_aarch64_pc_windows_msvc = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_GENERATOR_aarch64-pc-windows-msvc = None
CMAKE_GENERATOR_aarch64_pc_windows_msvc = None
HOST_CMAKE_GENERATOR = None
CMAKE_GENERATOR = None
CMAKE_PREFIX_PATH_aarch64-pc-windows-msvc = None
CMAKE_PREFIX_PATH_aarch64_pc_windows_msvc = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_aarch64-pc-windows-msvc = None
CMAKE_aarch64_pc_windows_msvc = None
HOST_CMAKE = None
CMAKE = None
running: "cmake" "G:\\Mon Drive\\Programmation\\TempPython\\pyxel\\rust\\target\\release\\build\\pyxel-platform-bb3be4484fa70548\\out/SDL2-2.28.4" "-G" "Visual
Studio 17 2022" "-Thost=x64" "-AARM64" "-DSDL_SHARED=OFF" "-DSDL_STATIC=ON" "-DSDL_MAIN_HANDLED=ON" "-DCMAKE_INSTALL_PREFIX=G:\\Mon Drive\\Programmation\\TempPy
thon\\pyxel\\rust\\target\\release\\build\\pyxel-platform-bb3be4484fa70548\\out" "-DCMAKE_C_FLAGS= -D__FLTUSED__ -nologo -MD -Brepro" "-DCMAKE_C_FLAGS_RELEASE= -
D__FLTUSED__ -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_BUILD_TYPE=release"

--- stderr
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7172k 100 7172k 0 0 3329k 0 0:00:02 0:00:02 --:--:-- 3332k
thread 'main' panicked at C:\Users\minec\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.54\src\lib.rs:1119:5:

failed to execute command: program not found
is `cmake` not installed?

build script failed, must exit now
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
💥 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit code: 101": `"cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "G:\\Mon Drive\\Programmation\\TempPython\\pyxel\\rust\\pyxel-wrapper\\Cargo.toml" "--release" "--lib"`

with maturin build -o ../dist --release --manylinux 2014 --auditwheel skip

EDIT : I've tried with a venv made with amd64 and arm64 python, both have the same error

@agriyakhetarpal
Copy link

Hi there from the Pyodide project,

Slightly related to the conversations but not directly to the build issues noted above, we would greatly appreciate it if pyxel could provide an sdist on PyPI with its releases. We currently use the GitHub archives for packaging pyxel downstream for the Pyodide distribution, which we have noted might not contain the correct files in some cases for specific projects, as GitHub release archives usually don't include Git submodules or nested Git submodules (none for pyxel's case, fortunately, besides the examples/ submodule).

Another benefit of the presence of source distributions would be that they would allow updating pyxel in Pyodide's recipes quickly, as we access PyPI's JSON API for packages to bump their versions (along with their checksums) through the pyodide skeleton pypi --update pyxel command. There was a checksum mismatch as well in pyodide/pyodide#5427 with the GitHub release for version 1.9.10 for some reason that we haven't explored, which would not happen with immutable storage(s) such as PyPI.

Also, please feel free to join in as recipe maintainers (as I notice that there are out-of-tree WASM builds in this repository already) for pyxel's recipe in Pyodide!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants