mirror of https://github.com/kivy/kivy.git
Enable X11 as a window provider
This commit is contained in:
parent
eb3300f6de
commit
878e23b17f
|
@ -10,6 +10,7 @@ RUN [ "cross-build-start" ]
|
|||
RUN /bin/bash -c 'source .ci/ubuntu_ci.sh && \
|
||||
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple" && \
|
||||
install_kivy_test_run_apt_deps && \
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install xorg && \
|
||||
install_python && \
|
||||
install_kivy_test_run_pip_deps'
|
||||
|
||||
|
@ -23,6 +24,6 @@ RUN if [ "$KIVY_CROSS_PLATFORM" = "rpi" ]; then \
|
|||
fi
|
||||
|
||||
# Build the wheel.
|
||||
RUN KIVY_SPLIT_EXAMPLES=1 KIVY_CROSS_PLATFORM="$KIVY_CROSS_PLATFORM" KIVY_CROSS_SYSROOT="$KIVY_CROSS_SYSROOT" python3 -m pip -v wheel --extra-index-url https://www.piwheels.org/simple . -w /kivy-wheel
|
||||
RUN KIVY_SPLIT_EXAMPLES=1 KIVY_CROSS_PLATFORM="$KIVY_CROSS_PLATFORM" KIVY_CROSS_SYSROOT="$KIVY_CROSS_SYSROOT" USE_X11=1 python3 -m pip -v wheel --extra-index-url https://www.piwheels.org/simple . -w /kivy-wheel
|
||||
|
||||
RUN [ "cross-build-end" ]
|
||||
|
|
|
@ -508,8 +508,7 @@ class reify(object):
|
|||
|
||||
|
||||
def _get_pi_version():
|
||||
"""Detect the version of the Raspberry Pi by reading the revision field
|
||||
value from '/proc/cpuinfo'.
|
||||
"""Detect the version of the Raspberry Pi by reading the revision field value from '/proc/cpuinfo'
|
||||
See: https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
|
||||
Based on: https://github.com/adafruit/Adafruit_Python_GPIO/blob/master/Adafruit_GPIO/Platform.py
|
||||
""" # noqa
|
||||
|
@ -529,35 +528,13 @@ def _get_pi_version():
|
|||
|
||||
# Determine the Pi version using the processor bits using the new-style
|
||||
# revision format
|
||||
revision = revision.group(1)
|
||||
if int(revision, base=16) & 0x800000:
|
||||
version = ((int(revision, base=16) & 0xF000) >> 12) + 1
|
||||
print('Raspberry Pi revision: {}'.format(version))
|
||||
return version
|
||||
revision = int(revision.group(1), base=16)
|
||||
if revision & 0x800000:
|
||||
return ((revision & 0xF000) >> 12) + 1
|
||||
|
||||
# Only look a the last five characters, as the first one changes if the
|
||||
# warranty bit is set
|
||||
revision = revision[-5:]
|
||||
if revision in {'0002', '0003', '0004', '0005', '0006', '0007', '0008',
|
||||
'0009', '000d', '000e', '000f', '0010', '0012', '0013',
|
||||
'0015', ' 900032'}:
|
||||
print('Raspberry Pi 1')
|
||||
return 1
|
||||
elif revision in {'01041', '21041', '22042'}:
|
||||
print('Raspberry Pi 2')
|
||||
return 2
|
||||
elif revision in {'02082', '22082', '32082', '220a0', '02082', '020a0'}:
|
||||
print('Raspberry Pi 3, CM3')
|
||||
return 3
|
||||
elif revision in {'02100'}:
|
||||
print('Raspberry CM3+')
|
||||
return 3
|
||||
elif revision in {'03111'}:
|
||||
print('Raspberry Pi 4')
|
||||
return 4
|
||||
else:
|
||||
print('Not a Raspberry Pi: {}'.format(revision))
|
||||
return None
|
||||
# If it is not using the new style revision format,
|
||||
# then it must be a Raspberry Pi 1
|
||||
return 1
|
||||
|
||||
|
||||
pi_version = _get_pi_version()
|
||||
|
|
Loading…
Reference in New Issue