Compare commits

...

2 commits

Author SHA1 Message Date
Akinwale Ariwodola
166ae895a0 finish recipes for sdk 2020-09-28 22:29:32 +01:00
Akinwale Ariwodola
4d0020cc0d move recipes around 2020-09-25 00:06:37 +01:00
91 changed files with 1368 additions and 2393 deletions

339
kivy_ios.egg-info/PKG-INFO Normal file
View file

@ -0,0 +1,339 @@
Metadata-Version: 2.1
Name: kivy-ios
Version: 1.1.2.dev0
Summary: Kivy for iOS
Home-page: https://github.com/kivy/kivy-ios
Author: The Kivy team
Author-email: kivy-dev@googlegroups.com
License: UNKNOWN
Description: # Kivy for iOS
[![kivy-ios](https://github.com/kivy/kivy-ios/workflows/kivy-ios/badge.svg)](https://github.com/kivy/kivy-ios/actions?query=workflow%3Akivy-ios)
[![PyPI version](https://badge.fury.io/py/kivy-ios.svg)](https://badge.fury.io/py/kivy-ios)
[![Backers on Open Collective](https://opencollective.com/kivy/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/kivy/sponsors/badge.svg)](#sponsors)
This toolchain is designed to compile the necessary libraries for iOS to run
your application and manage the creation of the Xcode project.
We do not provide any binary distributions of this toolchain.
You do need to compile it at least once before creating your Xcode project.
The toolchain supports:
- iPhone Simulator (x86_64)
- iPhone / iOS (armv7 and arm64)
These recipes are not ported to the new toolchain yet:
- lxml
## Installation & requirements
Before we start, we strongly advise to use a Python virtual environment to install Python packages.
python3 -m venv venv
. venv/bin/activate
Install [Kivy for iOS from PyPI](https://pypi.org/project/kivy-ios) with pip like any Python package.
pip3 install kivy-ios
Additionally you would need few system dependencies and configuration.
- Xcode 10 or above, with an iOS SDK and command line tools installed:
xcode-select --install
- Using brew, you can install the following dependencies:
brew install autoconf automake libtool pkg-config
brew link libtool
## Using the toolchain
Any Python extensions or C/C++ library must be compiled: you need to have what
we call a `recipe` to compile it. For example, Python, libffi, SDL2, SDL_image,
freetype... all the dependencies, compilation and packaging instructions are
contained in a `recipe`.
You can list the available recipes and their versions with:
$ toolchain recipes
audiostream master
click 7.1.2
cymunk master
ffmpeg 2.6.3
ffpyplayer v3.2
flask 1.1.2
freetype 2.5.5
hostlibffi 3.2.1
hostpython3 3.7.1
ios master
itsdangerous 1.1.0
jinja2 2.11.2
kivy 1.10.1
libffi 3.2.1
libjpeg v9a
libpng 1.6.26
markupsafe 1.1.1
moodstocks 4.1.5
numpy 1.16.4
openssl 1.0.2k
photolibrary master
pillow 6.1.0
plyer master
pycrypto 2.6.1
pykka 1.2.1
pyobjus master
python3 3.7.1
pyyaml 3.11
sdl2 2.0.8
sdl2_image 2.0.0
sdl2_mixer 2.0.0
sdl2_ttf 2.0.12
werkzeug 1.0.1
Then, start the compilation with:
$ toolchain build python3 kivy
You can build recipes at the same time by adding them as parameters:
$ toolchain build python3 openssl kivy
Recipe builds can be removed via the clean command e.g.:
$ toolchain clean openssl
You can install package that don't require compilation with pip::
$ toolchain pip install plyer
The Kivy recipe depends on several others, like the sdl\* and python recipes.
These may in turn depend on others e.g. sdl2_ttf depends on freetype, etc.
You can think of it as follows: the kivy recipe will compile everything
necessary for a minimal working version of Kivy.
Don't grab a coffee, just do diner. Compiling all the libraries for the first
time, 3x over (remember, 3 archs, x86_64, armv7, arm64) will take time.
For a complete list of available commands, type:
$ toolchain
## Create the Xcode project
The `toolchain.py` can create the initial Xcode project for you::
$ toolchain create <title> <app_directory>
$ toolchain create Touchtracer ~/code/kivy/examples/demo/touchtracer
Your app directory must contain a main.py. A directory named `<title>-ios`
will be created, with an Xcode project in it.
You can open the Xcode project using::
$ open touchtracer-ios/touchtracer.xcodeproj
Then click on `Play`, and enjoy.
> *Did you know ?*
>
> Everytime you press `Play`, your application directory will be synced to
> the `<title>-ios/YourApp` directory. Don't make changes in the -ios
> directory directly.
## Configuring your App
You can configure and customize your app in various ways:
- Set the icon and launch images in XCode. Note that XCode requires that you
specify these assests per device or/and iOS version.
- When you first build your XCode project, a 'main.m' file is created in your
XCode project folder. This file configures your environment variables and
controls your application startup. You can edit this file to customize your
launch environment.
- Kivy uses SDL, and as soon as the application starts the SDL main, the launch
image will disappear. To prevent that, you need to have 2 files named
`Default.png` and `Default-Landscape.png`, and put them
in the `Resources` folder in Xcode (not in your application folder)
> *Did you know ?*
>
> If you wish to restrict your apps orientation, you should do this via
> the 'export_orientation' function in 'main.m'. The XCode orientation
> settings should be set to support all.
## Using recipes
Recipes are used to install and compile any libraries you may need to use. These
recipes follow the same format as those used by the
[Python-for-Android](https://github.com/kivy/python-for-android) sister project.
Please refer to the
[recipe documentation](https://python-for-android.readthedocs.io/en/latest/recipes/)
there for more detail.
## Reducing the application size
If you would like to reduce the size of your distributed app, there are a few
things you can do to achieve this:
- Minimize the `build/pythonX/lib/pythonXX.zip`: this contains all the python
modules. You can edit the zip file and remove all the files you'll not use
(reduce encodings, remove xml, email...)
- Go to the settings `panel` > `build`, search for `"strip"` options, and
triple-check that they are all set to `NO`. Stripping does not work with
Python dynamic modules and will remove needed symbols.
- By default, the iOS package compiles binaries for all processor
architectures, namely x86_64, armv7 and arm64 as per the guidelines from
Apple. You can reduce the size of your ipa significantly by removing the
x86_64 architecture as they are used only for the emulator.
The procedure is to first compile/build all the host recipes as is:
toolchain build hostpython3
Then build all the rest of the recipes using --arch=armv7 --arch=arm64
arguments as follows:
toolchain build python3 kivy --arch=armv7 --arch=arm64
Note that these packages will not run in the iOS emulators, so use them
only for deployment.
## Usage
```
toolchain <command> [<args>]
Available commands:
build Build a recipe (compile a library for the required target
architecture)
clean Clean the build of the specified recipe
distclean Clean the build and the result
recipes List all the available recipes
status List all the recipes and their build status
Xcode:
create Create a new xcode project
update Update an existing xcode project (frameworks, libraries..)
launchimage Create Launch images for your xcode project
icon Create Icons for your xcode project
pip Install a pip dependency into the distribution
pip3 Install a pip dependency into the python 3 distribution
```
## Development
Alternatively, it's also possible to clone the repository and use all the
described commands in the above sections.
Clone and install it to your local virtual environment:
git clone https://github.com/kivy/kivy-ios.git
cd kivy-ios/
python3 -m venv venv
. venv/bin/activate
pip install -e .
Then use the `toolchain.py` script:
python toolchain.py --help
## FAQ
### Fatal error: "stdio.h" file not found
You need to install the Command line tools: `xcode-select --install`
### You must build with bitcode disabled (Xcode setting ENABLE_BITCODE should be No).
We don't support bitcode. You need to go to the project setting, and disable bitcode.
### You don't have permissions to run
It is due to invalid archs, search for them and check it. Maybe you
targetted a simulator but have only armv7/arm64. Maybe you want to target
your iPad but it as only x86_64.
### Why does the python multiprocess/subprocess module not work?
The iOS application model does not currently support multi-processing in a
cross-platform compatible way. The application design focuses on minimizing
processor usage (to minimize power consumption) and promotes an
[alternative concurrency model](https://developer.apple.com/library/archive/documentation/General/Conceptual/ConcurrencyProgrammingGuide/Introduction/Introduction.html).
If you need to make use of multiple processes, you should consider using
[PyObjus](https://github.com/kivy/pyobjus) to leverage native iOS
functionals for this.
## Support
If you need assistance, you can ask for help on our mailing list:
* User Group : https://groups.google.com/group/kivy-users
* Email : kivy-users@googlegroups.com
We also have a Discord channel:
* Server : https://chat.kivy.org
* Channel : #support
## Contributing
We love pull requests and discussing novel ideas. Check out our
[contribution guide](http://kivy.org/docs/contribute.html) and
feel free to improve Kivy for iOS.
The following mailing list and IRC channel are used exclusively for
discussions about developing the Kivy framework and its sister projects:
* Dev Group : https://groups.google.com/group/kivy-dev
* Email : kivy-dev@googlegroups.com
Discord channel:
* Server : https://chat.kivy.org
* Channel : #dev
## License
Kivy for iOS is released under the terms of the MIT License. Please refer to the
LICENSE file.
## Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/kivy#backer)]
<a href="https://opencollective.com/kivy#backers" target="_blank"><img src="https://opencollective.com/kivy/backers.svg?width=890"></a>
## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/kivy#sponsor)]
<a href="https://opencollective.com/kivy/sponsor/0/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/1/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/2/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/3/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/4/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/5/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/6/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/7/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/8/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/kivy/sponsor/9/website" target="_blank"><img src="https://opencollective.com/kivy/sponsor/9/avatar.svg"></a>
Platform: UNKNOWN
Requires-Python: >=3.6.0
Description-Content-Type: text/markdown

View file

@ -0,0 +1,256 @@
README.md
setup.py
kivy_ios/__init__.py
kivy_ios/context_managers.py
kivy_ios/toolchain.py
kivy_ios.egg-info/PKG-INFO
kivy_ios.egg-info/SOURCES.txt
kivy_ios.egg-info/dependency_links.txt
kivy_ios.egg-info/entry_points.txt
kivy_ios.egg-info/requires.txt
kivy_ios.egg-info/top_level.txt
kivy_ios/__pycache__/__init__.cpython-37.pyc
kivy_ios/__pycache__/__init__.cpython-38.pyc
kivy_ios/__pycache__/context_managers.cpython-37.pyc
kivy_ios/__pycache__/context_managers.cpython-38.pyc
kivy_ios/__pycache__/toolchain.cpython-37.pyc
kivy_ios/__pycache__/toolchain.cpython-38.pyc
kivy_ios/recipes/__init__.py
kivy_ios/recipes/hostpython.py
kivy_ios/recipes/python.py
kivy_ios/recipes/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/__pycache__/python.cpython-37.pyc
kivy_ios/recipes/__pycache__/python.cpython-38.pyc
kivy_ios/recipes/aiohttp/__init__.py
kivy_ios/recipes/aioupnp/__init__.py
kivy_ios/recipes/appdirs/__init__.py
kivy_ios/recipes/appdirs/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/asn1crypto/__init__.py
kivy_ios/recipes/asn1crypto/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/async-timeout/__init__.py
kivy_ios/recipes/attrs/__init__.py
kivy_ios/recipes/attrs/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/audiostream/__init__.py
kivy_ios/recipes/audiostream/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/base58/__init__.py
kivy_ios/recipes/base58/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/cffi/__init__.py
kivy_ios/recipes/cffi/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/chardet/__init__.py
kivy_ios/recipes/click/__init__.py
kivy_ios/recipes/click/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/coincurve/__init__.py
kivy_ios/recipes/coincurve/cross_compile.patch
kivy_ios/recipes/coincurve/drop_setup_requires.patch
kivy_ios/recipes/coincurve/find_lib.patch
kivy_ios/recipes/coincurve/no-download.patch
kivy_ios/recipes/coincurve/setup.py.patch
kivy_ios/recipes/colorama/__init__.py
kivy_ios/recipes/colorama/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/cryptography/__init__.py
kivy_ios/recipes/cryptography/getentropy.patch
kivy_ios/recipes/cryptography/osrandom.patch
kivy_ios/recipes/cryptography/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/curly/__init__.py
kivy_ios/recipes/curly/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/cymunk/__init__.py
kivy_ios/recipes/cymunk/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/defusedxml/__init__.py
kivy_ios/recipes/docopt/__init__.py
kivy_ios/recipes/docopt/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/ecdsa/__init__.py
kivy_ios/recipes/ecdsa/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/ffmpeg/__init__.py
kivy_ios/recipes/ffmpeg/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/ffpyplayer/__init__.py
kivy_ios/recipes/ffpyplayer/misc-visibility.patch
kivy_ios/recipes/ffpyplayer/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/flask/__init__.py
kivy_ios/recipes/flask/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/freetype/__init__.py
kivy_ios/recipes/freetype/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/freetype/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/hachoir/__init__.py
kivy_ios/recipes/host_cffi/__init__.py
kivy_ios/recipes/host_setuptools/__init__.py
kivy_ios/recipes/host_setuptools/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/host_setuptools/setuptools/README.rst
kivy_ios/recipes/host_setuptools3/__init__.py
kivy_ios/recipes/host_setuptools3/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/host_setuptools3/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/host_setuptools3/setuptools/README.rst
kivy_ios/recipes/hostlibffi/__init__.py
kivy_ios/recipes/hostlibffi/ffi-3.0.13-sysv.S.patch
kivy_ios/recipes/hostlibffi/fix-win32-unreferenced-symbol.patch
kivy_ios/recipes/hostlibffi/generate-darwin-source-and-headers-python3-items.patch
kivy_ios/recipes/hostlibffi/libffi-xcode10.patch
kivy_ios/recipes/hostlibffi/public_include.patch
kivy_ios/recipes/hostlibffi/staticlib.patch
kivy_ios/recipes/hostlibffi/staticlib2.patch
kivy_ios/recipes/hostlibffi/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/hostlibffi/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/hostopenssl/__init__.py
kivy_ios/recipes/hostopenssl/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/hostopenssl/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/hostpython3/ModulesSetup
kivy_ios/recipes/hostpython3/__init__.py
kivy_ios/recipes/hostpython3/pyconfig_detection.patch
kivy_ios/recipes/hostpython3/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/hostpython3/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/idna/__init__.py
kivy_ios/recipes/idna/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/ios/__init__.py
kivy_ios/recipes/ios/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/ios/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/ios/src/ios.pyx
kivy_ios/recipes/ios/src/ios_browser.m
kivy_ios/recipes/ios/src/ios_filechooser.m
kivy_ios/recipes/ios/src/ios_mail.m
kivy_ios/recipes/ios/src/ios_utils.m
kivy_ios/recipes/ios/src/ios_wrapper.h
kivy_ios/recipes/ios/src/setup.py
kivy_ios/recipes/ipaddress/__init__.py
kivy_ios/recipes/ipaddress/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/itsdangerous/__init__.py
kivy_ios/recipes/itsdangerous/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/jinja2/__init__.py
kivy_ios/recipes/jinja2/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/jsonschema/__init__.py
kivy_ios/recipes/jsonschema/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/keyring/__init__.py
kivy_ios/recipes/keyring/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/kivent_core/__init__.py
kivy_ios/recipes/kivent_core/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/kivy/__init__.py
kivy_ios/recipes/kivy/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/kivy/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/lbry/__init__.py
kivy_ios/recipes/lbry/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/libcurl/__init__.py
kivy_ios/recipes/libcurl/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/libffi/__init__.py
kivy_ios/recipes/libffi/ffi-3.0.13-sysv.S.patch
kivy_ios/recipes/libffi/fix-win32-unreferenced-symbol.patch
kivy_ios/recipes/libffi/generate-darwin-source-and-headers-python3-items.patch
kivy_ios/recipes/libffi/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/libffi/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/libjpeg/__init__.py
kivy_ios/recipes/libjpeg/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/libpng/__init__.py
kivy_ios/recipes/libpng/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/libsecp256k1/__init__.py
kivy_ios/recipes/libzbar/__init__.py
kivy_ios/recipes/libzbar/werror.patch
kivy_ios/recipes/libzbar/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/markupsafe/__init__.py
kivy_ios/recipes/markupsafe/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/mock/__init__.py
kivy_ios/recipes/msgpack/__init__.py
kivy_ios/recipes/multidict/__init__.py
kivy_ios/recipes/netifaces/__init__.py
kivy_ios/recipes/netifaces/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/numpy/__init__.py
kivy_ios/recipes/numpy/numpy-1.16.4.patch
kivy_ios/recipes/numpy/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/openssl/__init__.py
kivy_ios/recipes/openssl/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/openssl/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/pbkdf2/__init__.py
kivy_ios/recipes/pbkdf2/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/photolibrary/__init__.py
kivy_ios/recipes/photolibrary/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/pillow/__init__.py
kivy_ios/recipes/pillow/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/plyer/__init__.py
kivy_ios/recipes/plyer/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/prometheus_client/__init__.py
kivy_ios/recipes/protobuf/__init__.py
kivy_ios/recipes/protobuf/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/pyasn1/__init__.py
kivy_ios/recipes/pyasn1-modules/__init__.py
kivy_ios/recipes/pyasn1-modules/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/pyasn1/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/pycparser/__init__.py
kivy_ios/recipes/pycrypto/__init__.py
kivy_ios/recipes/pycrypto/hash_SHA2_template.c.patch
kivy_ios/recipes/pycrypto/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/pykka/__init__.py
kivy_ios/recipes/pykka/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/pylru/__init__.py
kivy_ios/recipes/pyobjus/__init__.py
kivy_ios/recipes/pyobjus/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/pyobjus/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/python3/ModulesSetup
kivy_ios/recipes/python3/ModulesSetup.mobile
kivy_ios/recipes/python3/__init__.py
kivy_ios/recipes/python3/config.sub.patch
kivy_ios/recipes/python3/configure.patch
kivy_ios/recipes/python3/ctypes_duplicate.patch
kivy_ios/recipes/python3/disable_explicit_blake2.patch
kivy_ios/recipes/python3/dynload_shlib.patch
kivy_ios/recipes/python3/posixmodule.patch
kivy_ios/recipes/python3/pyconfig_detection.patch
kivy_ios/recipes/python3/random.patch
kivy_ios/recipes/python3/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/python3/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/python3/mock_modules/_sqlite3/__init__.py
kivy_ios/recipes/python3/mock_modules/_sqlite3/_sqlite3.cpython-38-darwin.so
kivy_ios/recipes/pyyaml/__init__.py
kivy_ios/recipes/pyyaml/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/sdl2/__init__.py
kivy_ios/recipes/sdl2/uikit-transparent.patch
kivy_ios/recipes/sdl2/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/sdl2/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/sdl2_image/__init__.py
kivy_ios/recipes/sdl2_image/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/sdl2_image/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/sdl2_mixer/__init__.py
kivy_ios/recipes/sdl2_mixer/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/sdl2_mixer/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/sdl2_ttf/__init__.py
kivy_ios/recipes/sdl2_ttf/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/sdl2_ttf/__pycache__/__init__.cpython-38.pyc
kivy_ios/recipes/setuptools/__init__.py
kivy_ios/recipes/setuptools/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/six/__init__.py
kivy_ios/recipes/six/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/werkzeug/__init__.py
kivy_ios/recipes/werkzeug/__pycache__/__init__.cpython-37.pyc
kivy_ios/recipes/yarl/__init__.py
kivy_ios/recipes/zbarlight/__init__.py
kivy_ios/recipes/zbarlight/zbarlight_1_2.patch
kivy_ios/recipes/zbarlight/__pycache__/__init__.cpython-37.pyc
kivy_ios/tools/__init__.py
kivy_ios/tools/biglink
kivy_ios/tools/cythonize.py
kivy_ios/tools/liblink
kivy_ios/tools/external/__init__.py
kivy_ios/tools/external/xcassets.py
kivy_ios/tools/templates/cookiecutter.json
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/bridge.h
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/bridge.m
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/icon.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/main.m
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}-Info.plist
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-568h@2x.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-667h@2x.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-763h@3x.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-Landscape.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-Landscape@2x.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-Portrait.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-Portrait@2x~ipad.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default-Portrait@3x~ipad.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default@2x.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/LaunchImages/Default@3x.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/README.txt
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/android.txt
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/pictures.kv
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/shadow32.png
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/images/5509213687_ffd18df0b9_b.jpg
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/images/5552597274_de8b3fb5d2_b.jpg
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/YourApp/images/faust_github.jpg
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.pbxproj
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}.xcodeproj/project.xcworkspace/contents.xcworkspacedata
kivy_ios/tools/templates/{{ cookiecutter.project_name }}-ios/{{ cookiecutter.project_name }}/Images.xcassets/AppIcon.appiconset/Contents.json

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,3 @@
[console_scripts]
toolchain = kivy_ios.toolchain:main

View file

@ -0,0 +1,5 @@
cookiecutter
pbxproj
Pillow
requests
sh

View file

@ -0,0 +1 @@
kivy_ios

View file

@ -0,0 +1,23 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import CythonRecipe, shprint
from os.path import join
class AioHttpRecipe(CythonRecipe):
version = "3.5.4"
url = "https://pypi.python.org/packages/source/a/aiohttp/aiohttp-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = AioHttpRecipe()

View file

@ -0,0 +1,29 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import CythonRecipe, shprint
from os.path import join
class AioupnpRecipe(CythonRecipe):
version = "0.0.17"
url = "https://pypi.python.org/packages/source/a/aioupnp/aioupnp-{version}.tar.gz"
depends = ["python", "defusedxml"]
def prebuild_arch(self, arch):
if self.has_marker("patched"):
return
self.apply_patch("exclude_netifaces.patch")
self.apply_patch("none_netifaces.patch")
self.set_marker("patched")
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = AioupnpRecipe()

View file

@ -0,0 +1,10 @@
--- a/setup.py 2020-09-28 10:20:48.000000000 +0100
+++ b/setup.py 2020-09-28 10:21:12.000000000 +0100
@@ -36,7 +36,6 @@
packages=find_packages(exclude=('tests',)),
entry_points={'console_scripts': console_scripts},
install_requires=[
- 'netifaces',
'defusedxml'
]
)

View file

@ -0,0 +1,16 @@
--- a/aioupnp/interfaces.py 2020-09-28 10:23:40.000000000 +0100
+++ b/aioupnp/interfaces.py 2020-09-28 10:23:56.000000000 +0100
@@ -1,12 +1,11 @@
import socket
from collections import OrderedDict
import typing
-import netifaces
from aioupnp.fault import UPnPError
def get_netifaces():
- return netifaces
+ return None
def ifaddresses(iface: str) -> typing.Dict[int, typing.List[typing.Dict[str, str]]]:

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class AppdirsRecipe(PythonRecipe):
version = "1.4.3"
url = "https://pypi.python.org/packages/source/a/appdirs/appdirs-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,8 +13,8 @@ class AppdirsRecipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = AppdirsRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class ArgparseRecipe(PythonRecipe):
version = "1.2.1"
url = "https://pypi.python.org/packages/source/a/argparse/argparse-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = ArgparseRecipe()

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class Asn1CryptoRecipe(PythonRecipe):
version = "0.24.0"
url = "https://pypi.python.org/packages/source/a/asn1crypto/asn1crypto-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,8 +13,8 @@ class Asn1CryptoRecipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = Asn1CryptoRecipe()

View file

@ -0,0 +1,22 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class AsyncTimeoutRecipe(PythonRecipe):
version = "3.0.1"
url = "https://pypi.python.org/packages/source/a/async-timeout/async-timeout-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = AsyncTimeoutRecipe()

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class AttrsRecipe(PythonRecipe):
version = "18.1.0"
url = "https://pypi.python.org/packages/source/a/attrs/attrs-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,8 +13,8 @@ class AttrsRecipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = AttrsRecipe()

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class Base58Recipe(PythonRecipe):
version = "0.2.2"
version = "1.0.0"
url = "https://pypi.python.org/packages/source/b/base58/base58-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,8 +13,8 @@ class Base58Recipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = Base58Recipe()

View file

@ -1,4 +1,4 @@
from toolchain import CythonRecipe, shprint
from kivy_ios.toolchain import CythonRecipe, shprint
from os.path import join
import os
import sh
@ -6,10 +6,10 @@ import sh
class CffiRecipe(CythonRecipe):
name = "cffi"
version = "1.11.5"
version = "1.14.3"
url = "https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz"
library = "libcffi.a"
depends = ["host_cffi", "libffi", "setuptools", "pycparser"]
depends = ["host_cffi", "libffi", "pycparser"]
cythonize = False
def get_recipe_env(self, arch):
@ -26,23 +26,26 @@ class CffiRecipe(CythonRecipe):
os.chdir(build_dir)
# manually create expected directory in build directory
scripts_dir = join("build", "scripts-2.7")
scripts_dir = join("build", "scripts-3.8")
if not os.path.exists(scripts_dir):
os.makedirs(scripts_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "build_ext", _env=build_env)
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
# hack: copy _cffi_backend.so from hostpython
so_file = "_cffi_backend.so"
egg_name = "cffi-1.11.5-py2.7-macosx-10.4-x86_64.egg" # harded - needs to change
dest_dir = join(self.ctx.dist_dir, "root", "python", "lib", "python2.7", "site-packages", egg_name)
src_dir = join(self.ctx.dist_dir, "hostpython", "lib", "python2.7", "site-packages", egg_name)
so_file = "_cffi_backend.cpython-38-darwin.so"
egg_name = "cffi-1.14.3-py3.8-macosx-10.15-x86_64.egg" # harded - needs to change
dest_dir = join(self.ctx.dist_dir, "root", "python3", "lib", "python3.8", "site-packages", egg_name)
dest_dir_main = join(self.ctx.dist_dir, "root", "python3", "lib", "python3.8", "site-packages")
src_dir = join(self.ctx.dist_dir, "hostpython3", "lib", "python3.8", "site-packages", egg_name)
sh.cp(join(src_dir, so_file), join(dest_dir, so_file))
sh.cp(join(src_dir, so_file), join(dest_dir_main, so_file))
recipe = CffiRecipe()

View file

@ -0,0 +1,23 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class ChardetRecipe(PythonRecipe):
version = "3.0.4"
url = "https://pypi.python.org/packages/source/c/chardet/chardet-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = ChardetRecipe()

View file

@ -0,0 +1,76 @@
import sh
import os
from os.path import join
from kivy_ios.toolchain import CythonRecipe, Recipe, shprint
from kivy_ios.context_managers import cd
class CoincurveRecipe(CythonRecipe):
version = "7.1.0"
url = "https://github.com/ofek/coincurve/archive/{version}.tar.gz"
depends = ["python3", "libffi", "cffi", "pycparser", "libsecp256k1"]
library = 'libcoincurve.a'
pre_build_ext = True
include_per_arch = True
def dest_dir(self):
return join(self.ctx.dist_dir, "root", "python3")
def prebuild_arch(self, arch):
# common to all archs
if self.has_marker("patched"):
return
self.apply_patch("cross_compile.patch")
self.apply_patch("drop_setup_requires.patch")
self.apply_patch("find_lib.patch")
self.apply_patch("no-download.patch")
self.apply_patch("setup.py.patch")
self.set_marker("patched")
def get_recipe_env(self, arch):
env = arch.get_env()
# sets linker to use the correct gcc (cross compiler)
env['TOOLCHAIN_PREFIX'] = arch.triple
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl'
libsecp256k1 = self.get_recipe('libsecp256k1', self.ctx)
libsecp256k1_dir = libsecp256k1.get_build_dir(arch.arch)
env['LDFLAGS'] += ' -L{}'.format(os.path.join(libsecp256k1_dir, '.libs'))
env['CFLAGS'] += ' -I' + os.path.join(libsecp256k1_dir, 'include')
target_python = Recipe.get_recipe('python3', self.ctx).get_build_dir(arch.arch)
env['LDFLAGS'] += ' -L' + target_python
print(env['LDFLAGS'])
python_version = '3.8'
env["PYTHONPATH"] = join(self.dest_dir(), "lib", "python3.8", "site-packages")
env['PYTHON_ROOT'] = join(self.ctx.dist_dir, "root", "python3")
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python{}'.format(python_version)
env['LDFLAGS'] += " -lpython{}".format(python_version)
env['LDFLAGS'] += " -lsecp256k1 -lssl -lcrypto -lffi -lz"
return env
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
def postbuild_arch(self, arch):
py_arch = arch.arch
if py_arch == "arm64":
py_arch = "x86_64"
build_dir = self.get_build_dir(arch.arch)
build_env = self.get_recipe_env(arch)
tmp_folder = 'build/temp.macosx-10.15-{}-3.8/build/temp.macosx-10.15-{}-3.8'.format(py_arch, py_arch)
shprint(sh.Command(build_env['AR']),
"-q",
"{}/{}".format(self.build_dir, self.library),
"{}/{}/_libsecp256k1.o".format(self.build_dir, tmp_folder))
recipe = CoincurveRecipe()

View file

@ -0,0 +1,12 @@
diff --git a/setup.py b/setup.py
index c224fb2..bf925bd 100644
--- a/setup.py
+++ b/setup.py
@@ -182,6 +182,7 @@ class build_clib(_build_clib):
'--disable-dependency-tracking',
'--with-pic',
'--enable-module-recovery',
+ "--host=%s" % os.environ['TOOLCHAIN_PREFIX'],
'--disable-jni',
'--prefix',
os.path.abspath(self.build_clib),

View file

@ -0,0 +1,12 @@
diff --git a/setup.py b/setup.py
index c224fb2..466e789 100644
--- a/setup.py
+++ b/setup.py
@@ -250,7 +250,6 @@ else:
def has_c_libraries(self):
return not has_system_lib()
setup_kwargs = dict(
- setup_requires=['cffi>=1.3.0', 'pytest-runner>=2.6.2'],
ext_package='coincurve',
cffi_modules=['_cffi_build/build.py:ffi'],
cmdclass={

View file

@ -0,0 +1,13 @@
diff --git a/setup_support.py b/setup_support.py
index e7a4f2e..72f0c4d 100644
--- a/setup_support.py
+++ b/setup_support.py
@@ -68,6 +69,8 @@ def build_flags(library, type_, path):
def _find_lib():
+ # we're picking up the recipe one
+ return True
from cffi import FFI
ffi = FFI()
try:

View file

@ -0,0 +1,13 @@
diff --git a/setup.py b/setup.py
index c224fb2..d5f6d1a 100644
--- a/setup.py
+++ b/setup.py
@@ -51,6 +51,8 @@ if [int(i) for i in setuptools_version.split('.', 2)[:2]] < [3, 3]:
def download_library(command):
+ # we will use the custom libsecp256k1 recipe
+ return
if command.dry_run:
return
libdir = absolute('libsecp256k1')

View file

@ -0,0 +1,22 @@
From bf3a0684e9b0af29d9777f61d6e7e1d3cc0f2803 Mon Sep 17 00:00:00 2001
From: Kieran Prasch <kieranprasch@gmail.com>
Date: Thu, 19 Jul 2018 14:11:48 -0700
Subject: [PATCH] Exclude tests in setup.py
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 0b579f1..0a793ed 100644
--- a/setup.py
+++ b/setup.py
@@ -277,7 +277,7 @@ def has_c_libraries(self):
install_requires=['asn1crypto', 'cffi>=1.3.0'],
tests_require=['pytest>=2.8.7'],
- packages=find_packages(exclude=('_cffi_build', '_cffi_build.*', 'libsecp256k1')),
+ packages=find_packages(exclude=('_cffi_build', '_cffi_build.*', 'libsecp256k1', 'tests')),
distclass=Distribution,
zip_safe=False,

View file

@ -1,4 +1,4 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
@ -6,15 +6,15 @@ class ColoramaRecipe(PythonRecipe):
version = "0.3.7"
url = "https://pypi.python.org/packages/source/c/colorama/colorama-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = ColoramaRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class ConstantlyRecipe(PythonRecipe):
version = "15.1.0"
url = "https://pypi.python.org/packages/source/c/constantly/constantly-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = ConstantlyRecipe()

View file

@ -1,60 +1,54 @@
from os.path import join
from toolchain import CythonRecipe, PythonRecipe, Recipe
from toolchain import shprint
from kivy_ios.toolchain import CythonRecipe, Recipe, shprint
from kivy_ios.context_managers import cd
import os
import sh
class CryptographyRecipe(CythonRecipe):
name = "cryptography"
version = "2.2.2"
version = "3.1.1"
url = "https://pypi.python.org/packages/source/c/cryptography/cryptography-{version}.tar.gz"
library = "libcryptography.a"
depends = ["host_setuptools", "host_cffi", "setuptools", "asn1crypto",
"cffi", "enum34", "idna", "ipaddress", "six"]
cythonize = False
def prebuild_arch(self, arch):
if self.has_marker("patched"):
return
self.apply_patch("getentropy.patch")
self.apply_patch("osrandom.patch")
self.set_marker("patched")
depends = ["host_setuptools3", "host_cffi", "cffi", "asn1crypto", "idna", "six"]
python_depends = ["setuptools"]
cythonize = True
pre_build_ext = True
def dest_dir(self):
return join(self.ctx.dist_dir, "root", "python3")
def get_recipe_env(self, arch):
env = super(CryptographyRecipe, self).get_recipe_env(arch)
r = self.get_recipe('openssl', self.ctx)
openssl_dir = r.get_build_dir(arch.arch)
target_python = Recipe.get_recipe('python', self.ctx).get_build_dir(arch.arch)
target_python = Recipe.get_recipe('python3', self.ctx).get_build_dir(arch.arch)
env['LDFLAGS'] += ' -L' + target_python
env['PYTHON_ROOT'] = join(self.ctx.dist_dir, "root", "python")
env['PYTHON_ROOT'] = join(self.ctx.dist_dir, "root", "python3")
env["CC"] = "clang -Qunused-arguments -fcolor-diagnostics"
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python2.7' + \
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python3.8' + \
' -I' + join(openssl_dir, 'include') + \
' -I' + join(self.ctx.dist_dir, "include", arch.arch, "libffi")
env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \
' -L' + openssl_dir + \
' -lpython2.7' + \
' -lssl' + r.version + \
' -lcrypto' + r.version
' -lpython3.8' + \
' -lssl' + \
' -lcrypto' + \
' -lffi' + \
' -lcffi'
return env
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
# manually create expected directory in build directory
scripts_dir = join("build", "scripts-2.7")
if not os.path.exists(scripts_dir):
os.makedirs(scripts_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
pythonpath = join(dest_dir, 'lib', 'python2.7', 'site-packages')
build_env['PYTHONPATH'] = pythonpath
args = [hostpython, "setup.py", "install", "--prefix", dest_dir]
shprint(*args, _env=build_env)
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
with cd(build_dir):
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = CryptographyRecipe()

View file

@ -1,6 +1,6 @@
--- cryptography-2.2.2/src/_cffi_src/openssl/src/osrandom_engine.c 2018-03-27 15:12:05.000000000 +0100
+++ cryptography-2.2.2-patch/src/_cffi_src/openssl/src/osrandom_engine.c 2018-06-02 05:21:49.000000000 +0100
@@ -205,14 +205,10 @@
--- a/src/_cffi_src/openssl/src/osrandom_engine.c 2019-01-22 17:41:49.000000000 +0100
+++ b/src/_cffi_src/openssl/src/osrandom_engine.c 2019-08-12 11:47:03.000000000 +0100
@@ -243,14 +243,10 @@
#if !defined(__APPLE__)
getentropy_works = CRYPTOGRAPHY_OSRANDOM_GETENTROPY_WORKS;
#else
@ -19,14 +19,14 @@
}
#endif
return 1;
@@ -228,22 +224,7 @@
@@ -266,22 +262,7 @@
return dev_urandom_read(buffer, size);
#endif
case CRYPTOGRAPHY_OSRANDOM_GETENTROPY_WORKS:
- while (size > 0) {
- /* OpenBSD and macOS restrict maximum buffer size to 256. */
- len = size > 256 ? 256 : (size_t)size;
- res = getentropy(buffer, len);
- len = size > 256 ? 256 : size;
- res = getentropy(buffer, (size_t)len);
- if (res < 0) {
- ERR_Cryptography_OSRandom_error(
- CRYPTOGRAPHY_OSRANDOM_F_RAND_BYTES,

View file

@ -0,0 +1,23 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class DefusedXmlRecipe(PythonRecipe):
version = "0.6.0"
url = "https://pypi.python.org/packages/source/d/defusedxml/defusedxml-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = DefusedXmlRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class DnsPythonRecipe(PythonRecipe):
version = "1.12.0"
url = "http://www.dnspython.org/kits/{version}/dnspython-{version}.zip"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = DnsPythonRecipe()

View file

@ -1,20 +1,20 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class DocoptRecipe(PythonRecipe):
version = "0.6.2"
url = "https://pypi.python.org/packages/source/d/docopt/docopt-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = DocoptRecipe()

View file

@ -1,20 +1,20 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class EcdsaRecipe(PythonRecipe):
version = "0.13"
url = "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = EcdsaRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class Enum34Recipe(PythonRecipe):
version = "1.1.6"
url = "https://pypi.python.org/packages/source/e/enum34/enum34-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = Enum34Recipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class EnvparseRecipe(PythonRecipe):
version = "0.2.0"
url = "https://pypi.python.org/packages/source/e/envparse/envparse-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = EnvparseRecipe()

View file

@ -16,7 +16,7 @@ class FlaskRecipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class Functools32Recipe(PythonRecipe):
version = "3.2.3-2"
url = "https://pypi.python.org/packages/source/f/functools32/functools32-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = Functools32Recipe()

View file

@ -0,0 +1,23 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class HachoirRecipe(PythonRecipe):
version = "3.1.1"
url = "https://pypi.python.org/packages/source/h/hachoir/hachoir-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = HachoirRecipe()

View file

@ -1,6 +1,5 @@
from os.path import join
from toolchain import Recipe
from toolchain import shprint
from kivy_ios.toolchain import Recipe, shprint
import os
import sh
@ -19,10 +18,10 @@ Cflags: -I${includedir}
class HostCffiRecipe(Recipe):
name = "host_cffi"
version = "1.11.5"
version = "1.14.3"
archs = ["x86_64"]
url = "https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz"
depends = ["libffi", "host_setuptools", "pycparser"]
depends = ["hostlibffi", "pycparser"]
def get_recipe_env(self, arch):
sdk_path = sh.xcrun("--sdk", "macosx", "--show-sdk-path").strip()

View file

@ -18,13 +18,13 @@ class HostSetuptools(Recipe):
# python package installations using setuptools will raise exceptions.
# Setuptools version 28.3.0
site_packages_path = join(
self.ctx.dist_dir, 'hostpython',
'lib', 'python3.7', 'site-packages')
self.ctx.dist_dir, 'hostpython3',
'lib', 'python3.8', 'site-packages')
os.chdir(site_packages_path)
with open('setuptools.pth', 'r') as f:
setuptools_egg_path = f.read().strip('./').strip('\n')
unzip = sh.Command('unzip')
shprint(unzip, setuptools_egg_path)
shprint(unzip, '-o', setuptools_egg_path)
os.remove(setuptools_egg_path)
os.remove('setuptools.pth')
os.remove('easy-install.pth')

View file

@ -1,73 +1,39 @@
from toolchain import Recipe, shprint
from os.path import join, exists, basename, dirname
from os import makedirs
from kivy_ios.toolchain import Recipe, shprint
from os.path import join
import sh
import shutil
import logging
def ensure_dir(filename):
if not exists(filename):
makedirs(filename)
logger = logging.getLogger(__name__)
class HostOpenSSLRecipe(Recipe):
version = "1.0.2l"
class HostOpensslRecipe(Recipe):
version = "1.1.1f"
url = "http://www.openssl.org/source/openssl-{version}.tar.gz"
archs = ["x86_64"]
libraries = ["libssl.a", "libcrypto.a"]
include_dir = "include"
def get_build_env(self):
build_env = self.ctx.env.copy()
self.build_env_x86_84 = build_env
return build_env
def build_x86_64(self):
arch = self.archs[0]
sdk_path = sh.xcrun("--sdk", "macosx", "--show-sdk-path").strip()
dist_dir = join(self.ctx.dist_dir,"hostopenssl")
print("OpenSSL for host to be installed at: {}").format(dist_dir)
sh.perl(join(self.build_dir, "Configure"), "darwin64-x86_64-cc",
"--openssldir={}".format(dist_dir),
"--prefix={}".format(dist_dir))
build_env = self.get_build_env()
configure = sh.Command(join(self.build_dir, "Configure"))
shprint(configure,
"darwin64-x86_64-cc",
_env=build_env)
shprint(sh.make, "clean")
shprint(sh.make, "-j4", "build_libs")
shprint(sh.make, self.ctx.concurrent_make, "build_libs")
def install_include(self):
arch = self.archs[0]
print("Custom include file install...")
print("Dist dir = {}".format(self.ctx.dist_dir))
dest_dir = join(self.ctx.dist_dir,"hostopenssl","include")
if exists(dest_dir):
shutil.rmtree(dest_dir)
src_dir = join(self.ctx.build_dir,"hostopenssl",arch,"openssl-{}".format(self.version),"include")
shutil.copytree(src_dir,dest_dir)
def install(self):
sh.mkdir('-p', join(self.ctx.dist_dir, 'hostopenssl'))
sh.cp('-r', join(self.get_build_dir('x86_64'), 'include'),
join(self.ctx.dist_dir, 'hostopenssl', 'include'))
sh.mkdir('-p', join(self.ctx.dist_dir, 'hostopenssl', 'lib'))
sh.cp(join(self.get_build_dir('x86_64'), 'libssl.a'),
join(self.ctx.dist_dir, 'hostopenssl', 'lib'))
sh.cp(join(self.get_build_dir('x86_64'), 'libcrypto.a'),
join(self.ctx.dist_dir, 'hostopenssl', 'lib'))
def build_all(self):
filtered_archs = self.filtered_archs
print("Build {} for {} (filtered)".format(
self.name,
", ".join([x.arch for x in filtered_archs])))
for arch in self.filtered_archs:
self.build(arch)
name = self.name
if self.library:
print("Create lipo library for {}".format(name))
if not name.startswith("lib"):
name = "lib{}".format(name)
static_fn = join(self.ctx.dist_dir, "hostopenssl", "lib", "{}.a".format(name))
ensure_dir(dirname(static_fn))
print("Lipo {} to {}".format(self.name, static_fn))
self.make_lipo(static_fn)
if self.libraries:
print("Create multiple lipo for {}".format(name))
for library in self.libraries:
static_fn = join(self.ctx.dist_dir, "hostopenssl", "lib", basename(library))
ensure_dir(dirname(static_fn))
print(" - Lipo-ize {}".format(library))
self.make_lipo(static_fn, library)
print("Install include files for {}".format(self.name))
self.install_include()
print("Install frameworks for {}".format(self.name))
self.install_frameworks()
print("Install sources for {}".format(self.name))
self.install_sources()
print("Install {}".format(self.name))
self.install()
recipe = HostOpenSSLRecipe()
recipe = HostOpensslRecipe()

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class IdnaRecipe(PythonRecipe):
version = "2.6"
url = "https://pypi.python.org/packages/source/i/idna/idna-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,8 +13,8 @@ class IdnaRecipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = IdnaRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class IncrementalRecipe(PythonRecipe):
version = "17.5.0"
url = "https://pypi.python.org/packages/source/i/incremental/incremental-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = IncrementalRecipe()

View file

@ -8,20 +8,6 @@ class IosRecipe(CythonRecipe):
depends = ["python"]
pbx_frameworks = ["MessageUI", "CoreMotion", "UIKit", "WebKit", "Photos"]
def prebuild_arch(self, arch):
from os.path import join
destdir = self.get_build_dir(arch.arch)
local_arch = arch.arch
if arch.arch == "arm64" :
local_arch = "aarch64"
if arch.arch == "armv7" :
local_arch = "arm"
build_dir = join(destdir, "../../../python", arch.arch, "Python-2.7.13", "build", "lib.darwin-{}-2.7".format(local_arch))
print("build_dir = "+build_dir)
copyfile = join(build_dir,"_sysconfigdata.py")
# Copy _sysconfigdata.py for this architecture across
self.copy_file(copyfile, destdir)
def install(self):
self.install_python_package(
name=self.so_filename("ios"), is_dir=False)

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class IpaddressRecipe(PythonRecipe):
version = "1.0.22"
url = "https://pypi.python.org/packages/source/i/ipaddress/ipaddress-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,8 +13,8 @@ class IpaddressRecipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = IpaddressRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class JsonrpcRecipe(PythonRecipe):
version = "1.2"
url = "https://pypi.python.org/packages/source/j/jsonrpc/jsonrpc-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = JsonrpcRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class JsonrpclibRecipe(PythonRecipe):
version = "0.1.7"
url = "https://pypi.python.org/packages/source/j/jsonrpclib/jsonrpclib-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = JsonrpclibRecipe()

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class JsonschemaRecipe(PythonRecipe):
version = "2.6.0"
url = "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-{version}.tar.gz"
depends = ["python", "setuptools", "functools32"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,8 +13,8 @@ class JsonschemaRecipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = JsonschemaRecipe()

View file

@ -1,20 +1,20 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class KeyringRecipe(PythonRecipe):
version = "10.4.0"
url = "https://pypi.python.org/packages/source/k/keyring/keyring-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = KeyringRecipe()

View file

@ -77,7 +77,7 @@ class KiventCoreRecipe(CythonRecipe):
# build_env = arch.get_env()
build_env = self.get_recipe_env(arch)
dest_dir = join(self.ctx.dist_dir, "root", "python")
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.7', 'site-packages')
# Add Architecture specific kivy path for 'import kivy' to PYTHONPATH

View file

@ -31,20 +31,6 @@ class KivyRecipe(CythonRecipe):
join(self.ctx.dist_dir, "include", "common", "sdl2_mixer")])
return env
def prebuild_arch(self, arch):
from os.path import join
destdir = self.get_build_dir(arch.arch)
local_arch = arch.arch
if arch.arch == "arm64" :
local_arch = "aarch64"
if arch.arch == "armv7" :
local_arch = "arm"
build_dir = join(destdir, "../../../python", arch.arch, "Python-2.7.13", "build", "lib.darwin-{}-2.7".format(local_arch))
print("build_dir = "+build_dir)
copyfile = join(build_dir,"_sysconfigdata.py")
# Copy _sysconfigdata.py for this architecture across
self.copy_file(copyfile, destdir)
def build_arch(self, arch):
self._patch_setup()
super().build_arch(arch)

View file

@ -1,51 +1,55 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class LbryRecipe(PythonRecipe):
version = "v0.20.0rc10"
version = "f7eed62"
url = "https://github.com/lbryio/lbry/archive/{version}.tar.gz"
depends = [
"python",
"setuptools",
"twisted",
"cryptography",
"ios",
"pyobjus",
"kivy",
# install_requires dependencies
"aiohttp",
"aioupnp",
"appdirs",
"argparse",
"docopt",
"async-timeout",
"base58",
"chardet",
"coincurve",
"colorama",
"dnspython",
"cryptography",
"defusedxml",
"docopt",
"ecdsa",
"envparse",
"jsonrpc",
"jsonrpclib",
"hachoir",
"keyring",
"lbryschema",
"lbryum",
"miniupnpc",
"mock",
"msgpack",
"pbkdf2",
"prometheus_client",
"protobuf",
"pylru",
"pyyaml",
"pygithub",
"qrcode",
"requests",
"service_identity",
"six",
"slowaes",
"txjson-rpc",
"wsgiref",
"zope_interface",
"treq"
"six"
]
def prebuild_arch(self, arch):
if self.has_marker("patched"):
return
self.apply_patch("setup_override.patch")
self.set_marker("patched")
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = LbryRecipe()

View file

@ -0,0 +1,33 @@
--- a/setup.py 2020-09-28 10:43:56.000000000 +0100
+++ b/setup.py 2020-09-28 10:44:34.000000000 +0100
@@ -32,29 +32,7 @@
'orchstr8=lbry.wallet.orchstr8.cli:main',
],
},
- install_requires=[
- 'aiohttp==3.5.4',
- 'aioupnp==0.0.17',
- 'appdirs==1.4.3',
- 'certifi>=2018.11.29',
- 'colorama==0.3.7',
- 'distro==1.4.0',
- 'base58==1.0.0',
- 'cffi==1.13.2',
- 'cryptography==2.5',
- 'protobuf==3.6.1',
- 'msgpack==0.6.1',
- 'prometheus_client==0.7.1',
- 'ecdsa==0.13.3',
- 'pyyaml==5.3.1',
- 'docopt==0.6.2',
- 'hachoir',
- 'multidict==4.6.1',
- 'coincurve==11.0.0',
- 'pbkdf2==1.3',
- 'attrs==18.2.0',
- 'pylru==1.1.0'
- ] + PLYVEL,
+ install_requires=[],
classifiers=[
'Framework :: AsyncIO',
'Intended Audience :: Developers',

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class LbrySchemaRecipe(PythonRecipe):
version = "v0.0.16rc2"
url = "https://github.com/lbryio/lbryschema/archive/{version}.tar.gz"
depends = ["python", "setuptools", "ecdsa", "jsonschema", "protobuf"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = LbrySchemaRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class LbryumRecipe(PythonRecipe):
version = "v3.2.2rc1"
url = "https://github.com/lbryio/lbryum/archive/{version}.tar.gz"
depends = ["python", "setuptools", "appdirs", "ecdsa", "jsonrpclib", "keyring", "lbryschema"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = LbryumRecipe()

View file

@ -0,0 +1,29 @@
from kivy_ios.toolchain import Recipe, shprint
from os.path import join, exists
from multiprocessing import cpu_count
import sh
class LibSecp256k1Recipe(Recipe):
version = 'b0452e6'
url = 'https://github.com/bitcoin-core/secp256k1/archive/{version}.zip'
library = '.libs/libsecp256k1.a'
include_per_arch = True
def build_arch(self, arch):
super(LibSecp256k1Recipe, self).build_arch(arch)
env = self.get_recipe_env(arch)
if not exists(join(self.build_dir, "configure")):
shprint(sh.Command('./autogen.sh'))
shprint(
sh.Command('./configure'),
'--host=' + arch.triple,
'--prefix=/',
'--enable-module-recovery',
'--enable-experimental',
'--enable-module-ecdh',
'--disable-shared',
_env=env)
shprint(sh.make, '-j' + str(cpu_count()), _env=env)
recipe = LibSecp256k1Recipe()

View file

@ -1,26 +0,0 @@
from toolchain import CythonRecipe, shprint
from os.path import join
import os
import sh
class MiniupnpcRecipe(CythonRecipe):
name = "miniupnpc"
version = "1.9"
url = "https://pypi.python.org/packages/source/m/miniupnpc/miniupnpc-{version}.tar.gz"
library = "libminiupnpc.a"
depends = ["python", "setuptools"]
cythonize = False
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = MiniupnpcRecipe()

View file

@ -0,0 +1,23 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class MockRecipe(PythonRecipe):
version = "4.0.2"
url = "https://pypi.python.org/packages/source/m/mock/mock-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = MockRecipe()

View file

@ -0,0 +1,23 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class MsgpackRecipe(PythonRecipe):
version = "0.6.1"
url = "https://pypi.python.org/packages/source/m/msgpack/msgpack-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = MsgpackRecipe()

View file

@ -0,0 +1,22 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class MultidictRecipe(PythonRecipe):
version = "4.5.2"
url = "https://pypi.python.org/packages/source/m/multidict/multidict-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = MultidictRecipe()

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class Pbkdf2Recipe(PythonRecipe):
version = "1.3"
url = "https://pypi.python.org/packages/source/p/pbkdf2/pbkdf2-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,8 +13,8 @@ class Pbkdf2Recipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = Pbkdf2Recipe()

View file

@ -0,0 +1,23 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class PrometheusClientRecipe(PythonRecipe):
version = "0.8.0"
url = "https://pypi.python.org/packages/source/p/prometheus_client/prometheus_client-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = PrometheusClientRecipe()

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class ProtobufRecipe(PythonRecipe):
version = "3.2.0"
version = "3.6.1"
url = "https://pypi.python.org/packages/source/p/protobuf/protobuf-{version}.tar.gz"
depends = ["python", "setuptools", "six"]
depends = ["python", "six"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,9 +13,8 @@ class ProtobufRecipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PATH'] = ''
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = ProtobufRecipe()

View file

@ -1,20 +1,20 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class Pyasn1ModulesRecipe(PythonRecipe):
version = "0.2.1"
url = "https://pypi.python.org/packages/source/p/pyasn1-modules/pyasn1-modules-{version}.tar.gz"
depends = ["python", "setuptools", "pyasn1"]
depends = ["python", "pyasn1"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = Pyasn1ModulesRecipe()

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class Pyasn1Recipe(PythonRecipe):
version = "0.4.3"
url = "https://pypi.python.org/packages/source/p/pyasn1/pyasn1-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,8 +13,9 @@ class Pyasn1Recipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = Pyasn1Recipe()

View file

@ -1,12 +1,11 @@
from os.path import join
from toolchain import PythonRecipe
from toolchain import shprint
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class PycparserRecipe(PythonRecipe):
version = "2.18"
version = "2.20"
url = "https://pypi.python.org/packages/source/p/pycparser/pycparser-{version}.tar.gz"
depends = ["python"]
@ -14,19 +13,11 @@ class PycparserRecipe(PythonRecipe):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
# manually create expected directory in build directory
scripts_dir = join("build", "scripts-2.7")
if not os.path.exists(scripts_dir):
os.makedirs(scripts_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
pythonpath = join(dest_dir, 'lib', 'python2.7', 'site-packages')
build_env['PYTHONPATH'] = pythonpath
build_env['PYTHONHOME'] = '/usr'
args = [hostpython, "setup.py", "install", "--prefix", dest_dir]
shprint(*args, _env=build_env)
#args = [hostpython, "setup.py", "install"]
#shprint(*args, _env=build_env)
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = PycparserRecipe()

View file

@ -33,7 +33,7 @@ class PycryptoRecipe(CythonRecipe):
build_dir = self.get_build_dir(arch.arch)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.7', 'site-packages')
with cd(build_dir):
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class PyGithubRecipe(PythonRecipe):
version = "1.34"
url = "https://pypi.python.org/packages/source/p/pygithub/PyGithub-{version}.tar.gz"
depends = ["python", "setuptools", "pyjwt"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = PyGithubRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class PyJWTRecipe(PythonRecipe):
version = "1.6.4"
url = "https://pypi.python.org/packages/source/p/pyjwt/PyJWT-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = PyJWTRecipe()

View file

@ -0,0 +1,23 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class PylruRecipe(PythonRecipe):
version = "1.2.0"
url = "https://pypi.python.org/packages/source/p/pylru/pylru-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = PylruRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class PyOpenSSLRecipe(PythonRecipe):
version = "17.4.0"
url = "https://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-{version}.tar.gz"
depends = ["python", "setuptools", "cryptography", "six"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = PyOpenSSLRecipe()

View file

@ -28,7 +28,7 @@ _lsprof _lsprof.o rotatingtree.c
# _lzma _lzmamodule.c -I$(srcdir)/../xz/include -L$(srcdir)/../Support/XZ -llzma
_md5 md5module.c
_multibytecodec cjkcodecs/multibytecodec.c
# _multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
#multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
_opcode _opcode.c
_queue _queuemodule.c
_pickle _pickle.c
@ -48,7 +48,7 @@ cmath cmathmodule.c _math.c
fcntl fcntlmodule.c
grp grpmodule.c
math mathmodule.c
# mmap mmapmodule.c
mmap mmapmodule.c -I/usr/include
parser parsermodule.c
pyexpat expat/xmlparse.c \
expat/xmlrole.c \

View file

@ -33,6 +33,7 @@ class Python3Recipe(Recipe):
self.apply_patch("posixmodule.patch")
self.apply_patch("dynload_shlib.patch")
self.apply_patch("disable_explicit_blake2.patch")
self.apply_patch("disable_mremap.patch")
self.apply_patch("pyconfig_detection.patch")
self.copy_file("ModulesSetup", "Modules/Setup.local")
self.append_file("ModulesSetup.mobile", "Modules/Setup.local")
@ -172,7 +173,7 @@ class Python3Recipe(Recipe):
# cleanup python libraries
with cd(join(
self.ctx.dist_dir, "root", "python3", "lib", "python3.8")):
sh.rm("-rf", "wsgiref", "curses", "idlelib", "lib2to3",
sh.rm("-rf", "curses", "idlelib", "lib2to3",
"ensurepip", "turtledemo", "lib-dynload", "venv",
"pydoc_data")
sh.find(".", "-path", "*/test*/*", "-delete")

View file

@ -0,0 +1,34 @@
--- a/Modules/mmapmodule.c 2020-09-28 21:41:42.000000000 +0100
+++ b/Modules/mmapmodule.c 2020-09-28 21:42:35.000000000 +0100
@@ -527,11 +527,11 @@
#endif /* MS_WINDOWS */
#ifdef UNIX
-#ifndef HAVE_MREMAP
+//#ifndef HAVE_MREMAP
PyErr_SetString(PyExc_SystemError,
"mmap: resizing not available--no mremap()");
return NULL;
-#else
+/*#else
void *newmap;
if (self->fd != -1 && ftruncate(self->fd, self->offset + new_size) == -1) {
@@ -546,7 +546,7 @@
newmap = mremap(self->data, self->size, self->data, new_size, 0);
#else
newmap = mremap(self->data, self->size, new_size, 0);
-#endif /* __NetBSD__ */
+#endif
#endif
if (newmap == (void *)-1)
{
@@ -556,7 +556,7 @@
self->data = newmap;
self->size = new_size;
Py_RETURN_NONE;
-#endif /* HAVE_MREMAP */
+#endif */
#endif /* UNIX */
}
}

View file

@ -5,7 +5,7 @@ from kivy_ios.toolchain import PythonRecipe, shprint
class PyYamlRecipe(PythonRecipe):
version = "3.12"
version = "5.3.1"
url = "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-{version}.tar.gz"
depends = ["python"]
@ -15,8 +15,8 @@ class PyYamlRecipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.7', 'site-packages')
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class QrcodeRecipe(PythonRecipe):
version = "5.2.2"
url = "https://pypi.python.org/packages/source/q/qrcode/qrcode-{version}.tar.gz"
depends = ["python", "setuptools", "colorama", "six"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = QrcodeRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class RequestsRecipe(PythonRecipe):
version = "2.9.1"
url = "https://pypi.python.org/packages/source/r/requests/requests-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = RequestsRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class ServiceIdentityRecipe(PythonRecipe):
version = "16.0.0"
url = "https://pypi.python.org/packages/source/s/service_identity/service_identity-{version}.tar.gz"
depends = ["python", "setuptools", "attrs", "pyasn1", "pyasn1-modules", "pyopenssl"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = ServiceIdentityRecipe()

View file

@ -1,31 +1,23 @@
from toolchain import CythonRecipe
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class SetuptoolsRecipe(CythonRecipe):
name = "setuptools"
version = "18.5"
url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-{version}.tar.gz"
depends = ["python", "host_setuptools"]
cythonize = False
def get_recipe_env(self, arch):
env = super(SetuptoolsRecipe, self).get_recipe_env(arch)
env["PYTHONPATH"] = self.get_build_dir(arch.arch) + "/iosbuild/lib/python2.7/site-packages"
return env
class SetuptoolsRecipe(PythonRecipe):
version = "41.0.0"
url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-{version}.zip"
depends = ["python"]
def install(self):
import sh
from toolchain import shprint
from os import chdir
arch = self.filtered_archs[0]
build_env = arch.get_env()
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
chdir(build_dir)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
shprint(hostpython, "setup.py", "install", "--prefix", self.ctx.install_dir, "--old-and-unmanageable")
# "--single-version-externally-managed", "--root", "/", "-O2")
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = SetuptoolsRecipe()
recipe = ChardetRecipe()

View file

@ -1,11 +1,11 @@
from toolchain import PythonRecipe, shprint
from kivy_ios.toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class SixRecipe(PythonRecipe):
version = "1.11.0"
url = "https://pypi.python.org/packages/source/s/six/six-{version}.tar.gz"
depends = ["python", "setuptools"]
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
@ -13,8 +13,8 @@ class SixRecipe(PythonRecipe):
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = SixRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class SlowaesRecipe(PythonRecipe):
version = "0.1a1"
url = "https://pypi.python.org/packages/source/s/slowaes/slowaes-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = SlowaesRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class TreqRecipe(PythonRecipe):
version = "17.8.0"
url = "https://pypi.python.org/packages/source/t/treq/treq-{version}.tar.gz"
depends = ["python", "setuptools", "six", "twisted"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = TreqRecipe()

View file

@ -1,34 +0,0 @@
from toolchain import CythonRecipe, shprint
from os.path import join
import os
import sh
class TwistedRecipe(CythonRecipe):
name = "twisted"
version = "16.6.0"
url = "https://github.com/twisted/twisted/archive/twisted-{version}.tar.gz"
library = "libtwisted.a"
depends = ["python", "setuptools", "constantly", "incremental", "zope_interface"]
optional_depends = ["pyopenssl"]
cythonize = False
def prebuild_arch(self, arch):
if self.has_marker("patched"):
return
self.apply_patch("remove_portmap_extension.patch")
self.set_marker("patched")
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = TwistedRecipe()

View file

@ -1,14 +0,0 @@
--- twisted-twisted-16.6.0/src/twisted/python/_setup.py 2016-11-17 09:10:00.000000000 +0100
+++ twisted-twisted-16.6.0-patch/src/twisted/python/_setup.py 2018-06-02 08:05:51.000000000 +0100
@@ -187,11 +187,6 @@
sources=["src/twisted/python/_sendmsg.c"],
condition=lambda _: not _PY3 and sys.platform != "win32"),
- ConditionalExtension(
- "twisted.runner.portmap",
- sources=["src/twisted/runner/portmap.c"],
- condition=lambda builder: not _PY3 and
- builder._check_header("rpc/rpc.h")),
]

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class TxJsonRpcRecipe(PythonRecipe):
version = "0.5"
url = "https://pypi.python.org/packages/source/t/txJSON-RPC/txJSON-RPC-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = TxJsonRpcRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class TxRequestsRecipe(PythonRecipe):
version = "0.9.5"
url = "https://pypi.python.org/packages/source/t/txrequests/txrequests-{version}.tar.gz"
depends = ["python", "setuptools", "requests", "twisted"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = TxRequestsRecipe()

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class WsgiRefRecipe(PythonRecipe):
version = "0.1.2"
url = "https://pypi.python.org/packages/source/w/wsgiref/wsgiref-{version}.zip"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = WsgiRefRecipe()

View file

@ -0,0 +1,22 @@
# pure-python package, this can be removed when we'll support any python package
import os
import sh
from kivy_ios.toolchain import PythonRecipe, shprint
class YarlRecipe(PythonRecipe):
version = "1.3.0"
url = "https://pypi.python.org/packages/source/y/yarl/yarl-{version}.tar.gz"
depends = ["python"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = YarlRecipe()

View file

@ -16,7 +16,7 @@ class ZbarLightRecipe(Recipe):
def get_zbar_env(self, arch):
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
dest_dir = join(self.ctx.dist_dir, "root", "python3")
build_env["IOSROOT"] = self.ctx.root_dir
build_env["IOSSDKROOT"] = arch.sysroot
build_env["LDSHARED"] = join(self.ctx.root_dir, "tools", "liblink")

View file

@ -1,20 +0,0 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
class ZopeInterfaceRecipe(PythonRecipe):
version = "4.5.0"
url = "https://pypi.python.org/packages/source/z/zope.interface/zope.interface-{version}.tar.gz"
depends = ["python", "setuptools"]
def install(self):
arch = list(self.filtered_archs)[0]
build_dir = self.get_build_dir(arch.arch)
os.chdir(build_dir)
hostpython = sh.Command(self.ctx.hostpython)
build_env = arch.get_env()
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
recipe = ZopeInterfaceRecipe()

1
pybuilddir.txt Normal file
View file

@ -0,0 +1 @@
build/lib.ios-x86_64-3.7

File diff suppressed because it is too large Load diff