Overview

Request 843481 superseded

- Update to version 20201022.7f87908:
* Add python36 and python38 flavours.
- Update to version 20201021.adb6953:
* Prepare for multiple python3 flavors
- Remove multiple_flavors.patch as it is included in the upstream
tarball.
- Update to version 20201016.5d22545:
* fix whitespace after escape in compileall macro
- Update to version 20201016.db09189:
* Delete pycache files before compilealll
* Update macros/010-common-defs
* Reword compileall
* mention pyproject.toml and link to PEP517 and PEP518
* add description for pyunittest macro
* add description for python_compileall macro
* add description for pyproject macros
* add python_compileall macro and use it in pyproject_install
* disable pip version check: no connection to pypi.org
- Update multiple_flavors.patch to generate correct names of the
python binary.
- %__#FLAVOR# should be defined as
/usr/bin/python%{#FLAVOR#_version} not just /usr/bin/#FLAVOR#
- Add patch multiple_flavors.patch which makes compile_macros.sh
generate alternative flavours as well.


Benjamin Greiner's avatar

Note that in contrast to sr#842974 you do not activate the python36 and python38 flavors anymore. Probably better to do so in a later step.


Benjamin Greiner's avatar

Meh:

https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:N/python-Cython/standard/x86_64

[   45s] error: lua script failed: [string "<lua>"]:9: invalid use of '%' in replacement string

Benjamin Greiner's avatar

It's because the prjconf enables python36 but python-rpm-macros does not.


Benjamin Greiner's avatar
abuild@greinerT450s:~> rpmbuild -vv -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' /home/abuild/rpmbuild/SOURCES/python-Cython.spec
ufdio:       1 reads,    19451 total bytes in 0.000017 secs
ufdio:       1 reads,     2823 total bytes in 0.000005 secs
sh: /usr/bin/python2: No such file or directory
ufdio:       1 reads,       13 total bytes in 0.000002 secs
ufdio:       1 reads,       13 total bytes in 0.000004 secs
error: lua script failed: [string "<lua>"]:9: invalid use of '%' in replacement string
D:   1<   D: echo python36 > _current_flavor D: 
D:   0< D: 
python_flavor=`[ -f _current_flavor ] && cat _current_flavor || true` 
if [ -z "$python_flavor" ]; then python_flavor="tmp"; fi 
if [ "$python_flavor" != "python36" ]; then 
    if [ -d build ]; then mv build _build.$python_flavor; fi 
    if [ -d _build.python36 ]; then mv _build.python36 build; fi 
fi 
echo python36 > _current_flavor D: 
ufdio:       1 reads,    19451 total bytes in 0.000004 secs
ufdio:       1 reads,     2823 total bytes in 0.000001 secs

expanding %python_expand fails, because there is no %__python36

        cmd = cmd:gsub("$python%f[%s]", rpm.expand("%__" .. python))\
        -- when used as flavor expansion for a custom macro\
        cmd = cmd:gsub("$python", python)\
        print(rpm.expand(cmd .. "\\n"))\

Request History
Matej Cepl's avatar

mcepl created request

- Update to version 20201022.7f87908:
* Add python36 and python38 flavours.
- Update to version 20201021.adb6953:
* Prepare for multiple python3 flavors
- Remove multiple_flavors.patch as it is included in the upstream
tarball.
- Update to version 20201016.5d22545:
* fix whitespace after escape in compileall macro
- Update to version 20201016.db09189:
* Delete pycache files before compilealll
* Update macros/010-common-defs
* Reword compileall
* mention pyproject.toml and link to PEP517 and PEP518
* add description for pyunittest macro
* add description for python_compileall macro
* add description for pyproject macros
* add python_compileall macro and use it in pyproject_install
* disable pip version check: no connection to pypi.org
- Update multiple_flavors.patch to generate correct names of the
python binary.
- %__#FLAVOR# should be defined as
/usr/bin/python%{#FLAVOR#_version} not just /usr/bin/#FLAVOR#
- Add patch multiple_flavors.patch which makes compile_macros.sh
generate alternative flavours as well.


Factory Auto's avatar

factory-auto added opensuse-review-team as a reviewer

Please review sources


Factory Auto's avatar

factory-auto accepted review

Check script succeeded


Saul Goodman's avatar

licensedigger accepted review

ok


Dominique Leuenberger's avatar

dimstar_suse set openSUSE:Factory:Staging:N as a staging project

Being evaluated by staging project "openSUSE:Factory:Staging:N"


Dominique Leuenberger's avatar

dimstar_suse accepted review

Picked "openSUSE:Factory:Staging:N"


Dominique Leuenberger's avatar

dimstar accepted review


Matej Cepl's avatar

mcepl superseded request

- Update to version 20201102.31ccfc2:
* fix python_clone shebang replacement
* one less expansion for python_exec
* expand default %python_ macros earlier
* update README for multiple flavors
* more command delimiters for %python_expand

- Update to version 20201022.7f87908:
* Add python36 and python38 flavours.

- Update to version 20201021.adb6953:
* Prepare for multiple python3 flavors
- Remove multiple_flavors.patch as it is included in the upstream
tarball.

- Update to version 20201016.5d22545:
* fix whitespace after escape in compileall macro

- Update to version 20201016.db09189:
* Delete pycache files before compilealll
* Update macros/010-common-defs
* Reword compileall
* mention pyproject.toml and link to PEP517 and PEP518
* add description for pyunittest macro
* add description for python_compileall macro
* add description for pyproject macros
* add python_compileall macro and use it in pyproject_install
* disable pip version check: no connection to pypi.org

- Update multiple_flavors.patch to generate correct names of the

openSUSE Build Service is sponsored by