56431b6922
- updates all imports to prefix kivy_ios - adds basic `setup.py` file - adds a simple `toolchain.py` to the root folder for compat Makes it possible to install kivy-ios from PyPI: ``` pip install kivy-ios toolchain --help ``` Note the `rebuild_updated_recipes.py` is expected to fail as we moved all the recipes. This is a working, but unperfect iteration that come with limitations we would address in subsequent pull requests, such as: - the new usage is not yet documented - CI is not testing the source distribution creation and install - Continuous Delivery to PyPI is not in place - `toolchain` binary is a bit too generic name - we're still vendoring things under `tools/`
28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
from kivy_ios.toolchain import Recipe, shprint
|
|
import sh
|
|
|
|
|
|
class LibSDL2MixerRecipe(Recipe):
|
|
version = "2.0.4"
|
|
url = "http://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-{version}.tar.gz"
|
|
library = "Xcode-iOS/build/Release-{arch.sdk}/libSDL2_mixer.a"
|
|
include_dir = "SDL_mixer.h"
|
|
depends = ["sdl2"]
|
|
pbx_frameworks = ["ImageIO"]
|
|
pbx_libraries = ["libc++"]
|
|
|
|
def build_arch(self, arch):
|
|
# endian.h is in /usr/include/machine/ (Since MacOs Mojave?)
|
|
# header is needed by libvorbis, so We're adding that folder
|
|
# to HEADER_SEARCH_PATHS
|
|
shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild,
|
|
"ONLY_ACTIVE_ARCH=NO",
|
|
"ARCHS={}".format(arch.arch),
|
|
"HEADER_SEARCH_PATHS=$HEADER_SEARCH_PATHS /usr/include/machine {} ".format(" ".join(arch.include_dirs)),
|
|
"-sdk", arch.sdk,
|
|
"-project", "Xcode-iOS/SDL_mixer.xcodeproj",
|
|
"-target", "libSDL_mixer-iOS",
|
|
"-configuration", "Release")
|
|
|
|
|
|
recipe = LibSDL2MixerRecipe()
|