How to create an OS X application with Python on Windows

I need to automate cross-platform build applications. The whole assembly is done on a Windows computer. Part of it is written in Python and compiled for OS X. Currently, this part of the assembly is done manually on OS X.

I tried pyinstaller, but it looks like it is only for the platform it runs on. I also tried py2app, but it did not install on Windows.

Are there any tools to compile a Python script into an OS X application on a Windows computer?

+4
source share
2 answers

Short answer:

-, , . , , , , .

: , , , .


/ :

, micheal0x2a Python, , Python. :

, , exe , .

, - , - .

- Python. , Windows:


bbfreeze: , , , .


PyInstaller: :

PyInstaller Windows, Mac OS X Linux. -: Windows PyInstaller Windows; Linux Linux .. PyInstaller AIX, Solaris FreeBSD, .

PyInstaller - ( Linux → Windows), .


cx_freeze: .

cx_Freeze Windows, Mac Linux, , . , Windows, Windows; Mac, Mac.


py2app: , py2app OSX :

: py2app OSX , Mac .

windows - -go.

, Windows. Windows, OS .

; , vm, . OSX, , , , , .


:

, , , , , , , . , , , Windows OSX, heck, Linux . , .

, - clang, , , clang -. , ; , , , , ( OSX Windows).

, .cpp/.c python. , , Nuitka Cython.

, .py exit .cpp/.c. clang . , - .

, Nuitka ,

+8

( Python, pip) Windows, Mac .

SSH Python. , , Mac SSH ( IP, ), . :

from fabric.api import env

env.host_string = '<IP of the Mac Here>'
env.user        = '<Username on the Mac>'
env.password    = '<Password of the user>'

Windows Mac ( fabric , ):

from fabric.operations import put

put(r'\path\to\local\source\files', '/path/to/where/you/want/them')

, . run sudo, , .

from fabric.operations import run, sudo

# sudo works the same as run if you need that instead
run('/path/to/build/tool arguments for build tool')

, , get.

from fabric.operations import get

get('/path/to/dist/on/mac', '\local\path\to\store\on\windows')

. . VM - , . , Mac . Mac-, , Mac Mini - $50 ebay, .

+1

Source: https://habr.com/ru/post/1624156/


All Articles