LoginSignup
0
0

More than 1 year has passed since last update.

Wine での Python のありかのメモ(Python 使う app の cross-compile 用)

Last updated at Posted at 2021-05-12

背景

Python を使うアプリ(e.g. pybind11)を Linux で cross-compile したい

python.org にある embedded(zip)だとヘッダファイルとかが無い.

どのようにしてビルドしたかの config.h ファイルが異る(はず)であろうから. .lib/.h だけ適当にディストーションから抜き出して利用というのも問題がありそう.

wine を使って .exe(installer)の Python を使うとします.

Python 3.9 を想定します.

手順

winecfg で, 利用する Windows バージョンを指定しておきます.

3.9 からは Windows 8.1 以上でないと使えなくなったようです.

あとはインストーラー起動してファイルインストールすれば OK

デフォルトでは, Windows 10 に設定した wine では(Linux 上では)以下にインストールされました.

.wine/drive_c/users/<USERNAME>/Local Settings/Application Data/Programs/Python

CI 環境などセットアップしたい場合は,

を参考に cli オプションを指定して.

TODO

  • Wine 上で conda 環境を作り conda の Python 環境を使って cross compile する.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0