Hello community, here is the log from the commit of package python3 for openSUSE:Factory checked in at 2020-07-08 19:09:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3 (Old) and /work/SRC/openSUSE:Factory/.python3.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3" Wed Jul 8 19:09:25 2020 rev:100 rq:818938 version:3.8.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python3/python3.changes 2020-06-28 23:03:15.326246741 +0200 +++ /work/SRC/openSUSE:Factory/.python3.new.3060/python3.changes 2020-07-08 19:10:20.606537241 +0200 @@ -1,0 +2,40 @@ +Wed Jul 1 11:50:19 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Reduce some now unused conditionals + +------------------------------------------------------------------- +Wed Jul 1 11:00:40 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Redux the -base dependencies to match up pre-merge layout + +------------------------------------------------------------------- +Wed Jul 1 09:24:39 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Generate baselibs in pre-checkin too + +------------------------------------------------------------------- +Wed Jul 1 09:14:33 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Generate the importlib-failed using pre_checking again +- Add back the information about skipped tests on the pre_checkin + output + +------------------------------------------------------------------- +Tue Jun 30 07:11:19 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Use %python_pkg_name instead of hardcoding python3 where + applicable +- Sort out preamble with spec-cleaner + +------------------------------------------------------------------- +Mon Jun 29 14:36:10 UTC 2020 - Matej Cepl <mc...@suse.com> + +- Calculate required variables instead of relying on their continuous manual update + +------------------------------------------------------------------- +Thu Jun 25 10:44:08 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Fix the -base module build again to generate only the deps + we need + +------------------------------------------------------------------- @@ -4,0 +45,11 @@ + +------------------------------------------------------------------- +Thu Jun 10 14:30:15 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Use the %{python_pkg_name} on more places to allow easier + multiversioning +- Switch to _multibuild approach for easier maintenance of this + package. All is now in one spec file with 3 conditionals: + * bcond_with base + * bcond_with doc + * bcond_with general Old: ---- python3-base-rpmlintrc python3-base.changes python3-base.spec python3-doc.changes python3-doc.spec New: ---- _multibuild ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3.spec ++++++ ++++ 794 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/python3/python3.spec ++++ and /work/SRC/openSUSE:Factory/.python3.new.3060/python3.spec ++++++ PACKAGING-NOTES ++++++ --- /var/tmp/diff_new_pack.WylOki/_old 2020-07-08 19:10:25.314555142 +0200 +++ /var/tmp/diff_new_pack.WylOki/_new 2020-07-08 19:10:25.318555157 +0200 @@ -11,71 +11,7 @@ For development, use "--without profileopt" option to disable PGO. This shortens the build time to ~5 minutes including test suite. -I. python3 and python3-base naming confusion --------------------------------------------- - -1. the important stuff first - -This is package "python3". However, master spec file for this package is -"python3-base.spec". That means that all important changes should be put into -"python3-base.spec" and then submitted against "python3" in OBS. - -Changelogs of python3-base and python3 will be merged at some point. Now they -aren't, but feel free to enter changes in either or both. - -2. why is that? - -Technical reasons. python3-base was originally supposed to be a minimal package -with no external dependencies - so that it can build early in the distribution -rebuild. There were also some build loops involved. Turns out, 90% of Python's -standard library can be built without external dependencies. That's what we do - -in python3-base. python3 then only contains the remaining bits - -dependency-heavy subpackages, plus small bits depending on common packages -(OpenSSL, expat, readline) Logically, python3-base must be the master spec -because it builds the important parts. - -3. why not rename the whole package to python3-base? - -Because that would be stupid. The package is called python3. - -4. so why not make python3 the minimal package and put the rest in -python3-the-rest? - -Because other distributions use python3-base as the minimal package as well. -Also, packages that require python3 expect the whole deal, not a stripped-down -version. - -5. alright, let's build python3-base from python3.spec and python3 from -someother.spec - -Tried that, abandoned it. It is more trouble than it's worth. - - -II. pre_checkin.sh ------------------- - -Our pre_checkin.sh takes care of copying relevant portions of python3-base.spec -to python3.spec. The "relevant portions" are: -* list of patches list of macro definitions patch apply sequence in %prep -* configure call and build setup for %build - -That means that when you're adding a patch, you need only add it to -python3-base.spec and it will appear magically in python3.spec too. (as long as -you remember to run pre_checkin.sh or have automation in place to do it for you) - -If you want to replicate another section from py3-base to py3, just mark the -section with NEW-SECTION-BEGIN and NEW-SECTION-END (in both py3-base and py3) -and add NEW-SECTION to list of $sections in pre_checkin.sh -(note however that the order of sections in pre_checkin.sh must be the same as -they are found in the spec files) - -pre_checkin.sh also finds the newest python tarball in the source directory and -updates versions in all specfiles to match it. Therefore, you usually don't need -to update version numbers in specs when you update Python - -We also regenerate import_failed map and check test exclusion lists. - -III. import_failed.map +1. import_failed.map ---------------------- This is a mechanism installed as part of python3-base, that places shim modules @@ -88,6 +24,3 @@ This can sometimes cause problems on non-standard configurations, if the pth gets included too early (for instance if you are using a script to include all pths by hand in some strange order). Just something to look out for. - -All this is based on information in import_failed.map, which is generated from -spec file filelists by pre_checkin.sh ++++++ _multibuild ++++++ <multibuild> <package>base</package> <package>doc</package> </multibuild> ++++++ baselibs.conf ++++++ --- /var/tmp/diff_new_pack.WylOki/_old 2020-07-08 19:10:25.378555386 +0200 +++ /var/tmp/diff_new_pack.WylOki/_new 2020-07-08 19:10:25.378555386 +0200 @@ -1,3 +1,3 @@ -python3 python3-base +python3 libpython3_8-1_0 ++++++ import_failed.map ++++++ --- /var/tmp/diff_new_pack.WylOki/_old 2020-07-08 19:10:25.434555598 +0200 +++ /var/tmp/diff_new_pack.WylOki/_new 2020-07-08 19:10:25.434555598 +0200 @@ -1,7 +1,7 @@ -python3-tools: turtledemo -python3-testsuite: test _ctypes_test _testbuffer _testcapi _testinternalcapi _testimportmultiple _testmultiphase xxlimited -python3-tk: tkinter _tkinter python3-curses: curses _curses _curses_panel python3-dbm: dbm _dbm _gdbm -python3: sqlite3 readline _sqlite3 nis python3-idle: idlelib +python3-testsuite: test _ctypes_test _testbuffer _testcapi _testinternalcapi _testimportmultiple _testmultiphase xxlimited +python3-tk: tkinter _tkinter +python3-tools: turtledemo +python3: sqlite3 readline _sqlite3 nis ++++++ import_failed.py ++++++ --- /var/tmp/diff_new_pack.WylOki/_old 2020-07-08 19:10:25.450555659 +0200 +++ /var/tmp/diff_new_pack.WylOki/_new 2020-07-08 19:10:25.450555659 +0200 @@ -9,18 +9,14 @@ failed_name = __name__ for line in open(failed_map_path): - words = line.strip().split() - if not words or words[0][0] == '#': - continue - assert words[0][-1] == ':' - package = words[0][:-1] - - if failed_name in words[1:]: - raise ImportError("""Module '{}' is not installed. + package = line.split(':')[0] + imports = line.split(':')[1] + if failed_name in imports: + raise ImportError(f"""Module '{failed_name}' is not installed. Use: - sudo zypper install {} -to install it.""".format(failed_name, package)) + sudo zypper install {package} +to install it.""") -raise ImportError("""Module '{}' is not installed. +raise ImportError(f"""Module '{failed_name}' is not installed. It is supposed to be part of python3 distribution, but missing from failed import map. -Please file a bug on the SUSE Bugzilla.""".format(failed_name)) +Please file a bug on the SUSE Bugzilla.""") ++++++ pre_checkin.sh ++++++ --- /var/tmp/diff_new_pack.WylOki/_old 2020-07-08 19:10:25.474555750 +0200 +++ /var/tmp/diff_new_pack.WylOki/_new 2020-07-08 19:10:25.474555750 +0200 @@ -1,88 +1,23 @@ #!/bin/bash -# This script is called automatically during autobuild checkin. -# -# -# -# ...or is it? -# it really doesn't seem so, you know. go run it manually. - -master=python3-base.spec - -# calculate version number from newest tar name -VERSION=`ls *.tar.xz | grep '^Python-' | tail -n 1 | sed -r 's/^Python-([0-9]+\.[0-9]+.[0-9a-z]+)\.tar.*$/\1/'` -if echo $VERSION | grep -q Python; then - echo "Version is $VERSION and that's not right, fix the script." - exit 1 -fi -# VERSION = 3.3.0 - -Version=${VERSION/[a-z]*/} # 3.3.0 -tar_suffix=${VERSION#$Version} # b1 -a_version=(${Version//\./ }) # 3 3 0 - -python_version=${VERSION:0:3} # 3.3 -python_version_abitag=${python_version//./} # 33 -python_version_soname=${python_version//./_} # 3_3 - -if [ -n "$tar_suffix" ]; then - Version=$Version~$tar_suffix # 3.3.0~b1 - tarversion=$VERSION # 3.3.0b1 -else - tarversion="%{version}" -fi - -# set Version for every spec -sed -i -r 's/(^Version:[ \t]+).*/\1'"$Version"'/' python3*.spec -# set tarversion for every spec -sed -i -r 's/(^%define[ \t]+tarversion[ \t]+).*/\1'$tarversion'/' python3*.spec - -for varname in python_version{,_abitag,_soname}; do - eval varvalue=\$$varname - sed -i -r 's/(^%define[ \t]+'$varname'[ \t]+).*/\1'$varvalue'/' $master -done - - -# update baselibs -sed -i -r 's/^libpython.*$/libpython'$python_version_soname'-1_0/' baselibs.conf - - -# copy definition sections +export LC_ALL=C -sections="DEF PATCH PREP CONFIG" - -for slave in python3.spec python3-doc.spec; do -{ - prev=1 - for section in $sections; do - if ! grep -q "COMMON-$section" $slave; then - echo "Skipping $section for $slave" > /dev/stderr - continue - fi - begin="/COMMON-$section-BEGIN/" - end="/COMMON-$section-END/" - sed -n -e "${prev},${begin}p" $slave - sed -n -e "${begin},${end}p" $master | head -n -1 | tail -n +2 - prev=$end - done - sed -n -e "${prev},\$p" $slave -} > $slave.tmp && mv $slave.tmp $slave -done - -osc service localrun format_spec_file - +master=python*.spec # create import_failed.map from package definitions - +pkgname=$(grep python_pkg_name $master |grep define |awk -F' ' '{print $3}') MAPFILE=import_failed.map function new_map_line () { - if [ -z "$1" -o -z "$2" ]; then + package=$1 + package=$(echo $1 |sed -e "s:%{python_pkg_name}:$pkgname:") + modules=$2 + if [ -z "$package" -o -z "$modules" ]; then return fi - if [ "$1" == "python3-base" ]; then + if [ "$package" == "python3-base" ]; then return fi - echo "$1:$2" >> $MAPFILE.tmp + echo "$package:$modules" >> $MAPFILE.tmp } for spec in *.spec; do @@ -125,11 +60,19 @@ new_map_line $package "$modules" done -mv $MAPFILE.tmp $MAPFILE +cat $MAPFILE.tmp |sort -u > $MAPFILE +rm $MAPFILE.tmp # run test inclusion check +tar xJf Python-*.xz python3 skipped_tests.py -# I really don't to keep all three *.changes files separate -cp python3-base.changes python3.changes -cp python3-base.changes python3-doc.changes +# generate baselibs.conf +VERSION=$(grep ^Version $master|awk -F':' '{print $2}' |sed -e 's/ //g') +python_version=${VERSION:0:3} # 3.3 +python_version_abitag=${python_version//./} # 33 +python_version_soname=${python_version//./_} # 3_3 +echo "$pkgname-base" > baselibs.conf +echo "$pkgname" >> baselibs.conf +echo "libpython$python_version_soname-1_0" >> baselibs.conf +