Replies: 3 comments
-
This is spelled like this: py = import('python').find_installation()
executable(
'foo',
...,
dependencies: py.dependency(embed: true),
)
I doubt this works. To install the executables in the right path you should set the
This does not work either. You should just use the
This is already supported by meson. See above.
Why do you want to have these defines specified in in |
Beta Was this translation helpful? Give feedback.
-
Now that I done this, I realized the In other news, it seems it cannot figure out how to compile the resource scripts for the 2 exes. |
Beta Was this translation helpful? Give feedback.
-
Please read my previous comment again. The solution is spelled out clearly there.
I don't know what you mean by resources scripts, but in the case you are referring to MSVC resources, please refer to the Meson manual: https://mesonbuild.com/Windows-module.html#windows-module |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using meson.build to hopefully bundle in a wheel of my package that not only builds C extensions, but also packages in:
py.executablewas a think likepy.extension_moduleis today which automatically passes in the following for me:Also the package expects a stub exe to be built as well which does NOT need the python include folder nor the python lib folder as it is meant to be act like a "SFX EXE" like file for the embedded python to get packed down to a single file.
The resulting expected files that are to be packed in the resulting wheels (after building everything)
__init__.py__main__.pyDistBuilder.py_resourceediting.pyd(built with the limited api)memimport.py(gets copied by the code inDistBuilder.pyto a specificdist/site-packagesfolder for zipping up into asite-packages.zipfile)zipextimporter.py(gets copied by the code inDistBuilder.pyto a specificdist/site-packagesfolder for zipping up into asite-packages.zipfile)embed.exe(gets copied by the code inDistBuilder.pyto a specificdist/build_tmpfolder for zipping up into afiles.zipfile)stub.exe(gets copied by the code inDistBuilder.pyto a specificdistfolder and where then the icon, string, and zip file resources in the exe gets replaced using the_resourceeditingextension, also the icon resource in theembed.exegets replaced before it gets zipped into the zip file that is used to replace the initial empty one in the stub exe)My meson.build file currently:
Basically having support for building the embed exe itself would be great in
meson-python. Also it would have been nice if one could also configuremeson-pythonto pass in the following defines (_UNICODE,UNICODE, and_CRT_SECURE_NO_WARNINGS) as well from withinpyproject.tomlto avoid some duplication in the meson.build file.My goal with this:
I been working hard on a project with the hopes of someday pull requesting the files to the py2exe repository to bring back single file exe support using my idea of having a
SFX EXEtype thing as a stub to do such.Beta Was this translation helpful? Give feedback.
All reactions