Python 3.11 (#7570)

* Python 3.11 initial binary upload

* switch py_libxml2 to -py3.11

* fixup package versions

* fix py3_pillow

* build python with ensurepip

* add flit_core to pyparsing

* update some package versions

* update wheel

* update core python packages

* more updates

* update py3_libxml2.rb py3_pyelftools.rb py3_codespell.rb

* add all successful builds

* update versions in broken builds

* fix package

* adding some binaries

* add build

* add meson build

* add py3_numpy builds

* update itstool

* update xcb_proto

* add more packages

* update bind to not include py3_ply

* rebuild libcaca

* update py3_gi_docgen

* remove some conflicts_ok

* remove setuptools and pip deps

* attempt pip uninstall during install

* add preflight to pip and setuptools

* try excluding pip again

* adjust logic

* lint
This commit is contained in:
Satadru Pramanik
2022-12-02 13:27:01 -05:00
committed by GitHub
parent 16174e3407
commit 001060b261
181 changed files with 1760 additions and 1617 deletions

View File

@@ -3,24 +3,24 @@ require 'package'
class Python3 < Package
description 'Python is a programming language that lets you work quickly and integrate systems more effectively.'
homepage 'https://www.python.org/'
@_ver = '3.10.8'
@_ver = '3.11.0'
version @_ver
license 'PSF-2.0'
compatibility 'all'
source_url "https://www.python.org/ftp/python/#{@_ver}/Python-#{@_ver}.tar.xz"
source_sha256 '6a30ecde59c47048013eb5a658c9b5dec277203d2793667f578df7671f7f03f3'
source_sha256 'a57dc82d77358617ba65b9841cee1e3b441f386c3789ddc0676eca077f2951c3'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/python3/3.10.8_armv7l/python3-3.10.8-chromeos-armv7l.tar.zst',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/python3/3.10.8_armv7l/python3-3.10.8-chromeos-armv7l.tar.zst',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/python3/3.10.8_i686/python3-3.10.8-chromeos-i686.tar.zst',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/python3/3.10.8_x86_64/python3-3.10.8-chromeos-x86_64.tar.zst'
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/python3/3.11.0_armv7l/python3-3.11.0-chromeos-armv7l.tar.zst',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/python3/3.11.0_armv7l/python3-3.11.0-chromeos-armv7l.tar.zst',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/python3/3.11.0_i686/python3-3.11.0-chromeos-i686.tar.zst',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/python3/3.11.0_x86_64/python3-3.11.0-chromeos-x86_64.tar.zst'
})
binary_sha256({
aarch64: 'bf1dae49145360157092f9843c43da8223a47cd5a7ca1b87a3c01e189a4eb288',
armv7l: 'bf1dae49145360157092f9843c43da8223a47cd5a7ca1b87a3c01e189a4eb288',
i686: '41a9de83c568c1c624964fcd588971cbfa1edcbaf4055a18830ab010e450d2b6',
x86_64: '4f168cd30e620ca2bbc12493130a564d678623938694a133e9bfa9b165a211b5'
aarch64: '45af8d33fe7d419c83a1cb829e318cc97f6de6a78d522845f52829ee9642ea41',
armv7l: '45af8d33fe7d419c83a1cb829e318cc97f6de6a78d522845f52829ee9642ea41',
i686: '2d07bfb72df0a579b0854c02ba1d9a32264ad2e149e4a0f5a1b26622010cb2b7',
x86_64: '87cab9510346a3061cab055f6b071931ff79f5479c75d7875530a124e9004ede'
})
depends_on 'autoconf_archive' => :build
@@ -42,10 +42,16 @@ class Python3 < Package
# depends_on 'tcl' # Needed for tkinter support
# depends_on 'tk' # Needed for tkinter support
depends_on 'util_linux' # R
no_env_options
conflicts_ok
def self.preinstall
system 'crew remove py3_setuptools py3_pip', exception: false
end
def self.patch
system "sed -i -e 's:#{CREW_LIB_PREFIX}:\$(get_libdir):g' \
system "sed -i -e 's:#{CREW_LIB_PREFIX}:$(get_libdir):g' \
Lib/distutils/command/install.py \
Lib/distutils/sysconfig.py \
Lib/site.py \
@@ -70,12 +76,12 @@ class Python3 < Package
# test_urllib, test_urllib2, test_urllib2_localnet.
# So, modifying environment variable to make pass tests.
Dir.mkdir 'builddir'
FileUtils.mkdir_p 'builddir'
Dir.chdir 'builddir' do
system CREW_ENV_OPTIONS_HASH.transform_values { |v| "#{v} #{@cppflags}" }, "../configure #{CREW_OPTIONS} \
--with-computed-gotos \
--enable-loadable-sqlite-extensions \
--without-ensurepip \
--with-ensurepip \
--enable-optimizations \
--with-platlibdir='lib#{CREW_LIB_SUFFIX}' \
--with-system-ffi \
@@ -118,9 +124,13 @@ class Python3 < Package
end
# Remove conflicting binaries
FileUtils.rm_f "#{CREW_DEST_PREFIX}/bin/wheel"
# FileUtils.rm_f "#{CREW_DEST_PREFIX}/bin/wheel"
# Make python3 the default python
FileUtils.ln_sf 'python3', "#{CREW_DEST_PREFIX}/bin/python"
end
def self.postinstall
system 'pip3 install --upgrade pip'
end
end