Closed mcepl closed 2 years ago
@bnavigator, @s-t-e-v-e-n-k what do you think?
I would also rather rename the commit and thus entry in the changelog to something like "avoid to install incorrect PEP610 metadata"
+1 from me for fa2fa1b0b1bb8ca58f3f80c77d6be8bd20dd2242.
See https://build.opensuse.org/project/show/home:bnavigator:python-rpm-macros for a couple of packages using %pyproject_*
.
This also coincidentally gets rid of the ugly workaround for #93
Any more review comments? I want to use the %{$python_pyproject_wheel}
in the new python-scipy PEP517 build with meson-python and would need this merged for it.
Requesting a review and getting it seconds before :lol:
This looks excellent to me, but one comment I have is the code smart enough to realize it's built a pure wheel and stops?
This code does exactly that: https://github.com/openSUSE/python-rpm-macros/blob/b5c34e43c4e3bd8073ef984099621fe4d3925e7d/flavor.in#L49-L59
In action: https://build.opensuse.org/package/show/home:bnavigator:python-rpm-macros/python-mwclient
62s] Processing /home/abuild/rpmbuild/BUILD/mwclient-0.10.1
[ 62s] Preparing metadata (pyproject.toml): started
[ 62s] Running command Preparing metadata (pyproject.toml)
[ 63s] running dist_info
[ 63s] creating /tmp/pip-modern-metadata-3aw5fmj8/mwclient.egg-info
[ 63s] writing /tmp/pip-modern-metadata-3aw5fmj8/mwclient.egg-info/PKG-INFO
[ 63s] writing dependency_links to /tmp/pip-modern-metadata-3aw5fmj8/mwclient.egg-info/dependency_links.txt
[ 63s] writing requirements to /tmp/pip-modern-metadata-3aw5fmj8/mwclient.egg-info/requires.txt
[ 63s] writing top-level names to /tmp/pip-modern-metadata-3aw5fmj8/mwclient.egg-info/top_level.txt
[ 63s] writing manifest file '/tmp/pip-modern-metadata-3aw5fmj8/mwclient.egg-info/SOURCES.txt'
[ 63s] reading manifest file '/tmp/pip-modern-metadata-3aw5fmj8/mwclient.egg-info/SOURCES.txt'
[ 63s] reading manifest template 'MANIFEST.in'
[ 63s] adding license file 'LICENSE.md'
[ 63s] writing manifest file '/tmp/pip-modern-metadata-3aw5fmj8/mwclient.egg-info/SOURCES.txt'
[ 63s] creating '/tmp/pip-modern-metadata-3aw5fmj8/mwclient-0.10.1.dist-info'
[ 63s] adding license file "LICENSE.md" (matched pattern "LICEN[CS]E*")
[ 63s] Preparing metadata (pyproject.toml): finished with status 'done'
[ 63s] Building wheels for collected packages: mwclient
[ 63s] Building wheel for mwclient (pyproject.toml): started
[ 63s] Running command Building wheel for mwclient (pyproject.toml)
[ 64s] running bdist_wheel
[ 64s] running build
[ 64s] running build_py
[ 64s] creating build/lib
[ 64s] creating build/lib/mwclient
[ 64s] copying mwclient/__init__.py -> build/lib/mwclient
[ 64s] copying mwclient/client.py -> build/lib/mwclient
[ 64s] copying mwclient/errors.py -> build/lib/mwclient
[ 64s] copying mwclient/image.py -> build/lib/mwclient
[ 64s] copying mwclient/listing.py -> build/lib/mwclient
[ 64s] copying mwclient/page.py -> build/lib/mwclient
[ 64s] copying mwclient/sleep.py -> build/lib/mwclient
[ 64s] copying mwclient/util.py -> build/lib/mwclient
[ 64s] installing to build/bdist.linux-x86_64/wheel
[ 64s] running install
[ 64s] running install_lib
[ 64s] creating build/bdist.linux-x86_64
[ 64s] creating build/bdist.linux-x86_64/wheel
[ 64s] creating build/bdist.linux-x86_64/wheel/mwclient
[ 64s] copying build/lib/mwclient/__init__.py -> build/bdist.linux-x86_64/wheel/mwclient
[ 64s] copying build/lib/mwclient/client.py -> build/bdist.linux-x86_64/wheel/mwclient
[ 64s] copying build/lib/mwclient/errors.py -> build/bdist.linux-x86_64/wheel/mwclient
[ 64s] copying build/lib/mwclient/image.py -> build/bdist.linux-x86_64/wheel/mwclient
[ 64s] copying build/lib/mwclient/listing.py -> build/bdist.linux-x86_64/wheel/mwclient
[ 64s] copying build/lib/mwclient/page.py -> build/bdist.linux-x86_64/wheel/mwclient
[ 64s] copying build/lib/mwclient/sleep.py -> build/bdist.linux-x86_64/wheel/mwclient
[ 64s] copying build/lib/mwclient/util.py -> build/bdist.linux-x86_64/wheel/mwclient
[ 64s] running install_egg_info
[ 64s] running egg_info
[ 64s] writing mwclient.egg-info/PKG-INFO
[ 64s] writing dependency_links to mwclient.egg-info/dependency_links.txt
[ 64s] writing requirements to mwclient.egg-info/requires.txt
[ 64s] writing top-level names to mwclient.egg-info/top_level.txt
[ 64s] reading manifest file 'mwclient.egg-info/SOURCES.txt'
[ 64s] reading manifest template 'MANIFEST.in'
[ 64s] adding license file 'LICENSE.md'
[ 64s] writing manifest file 'mwclient.egg-info/SOURCES.txt'
[ 64s] Copying mwclient.egg-info to build/bdist.linux-x86_64/wheel/mwclient-0.10.1-py3.8.egg-info
[ 64s] running install_scripts
[ 64s] adding license file "LICENSE.md" (matched pattern "LICEN[CS]E*")
[ 64s] creating build/bdist.linux-x86_64/wheel/mwclient-0.10.1.dist-info/WHEEL
[ 64s] creating '/tmp/pip-wheel-caiyd_vw/tmp28kpam5w/mwclient-0.10.1-py2.py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
[ 64s] adding 'mwclient/__init__.py'
[ 64s] adding 'mwclient/client.py'
[ 64s] adding 'mwclient/errors.py'
[ 64s] adding 'mwclient/image.py'
[ 64s] adding 'mwclient/listing.py'
[ 64s] adding 'mwclient/page.py'
[ 64s] adding 'mwclient/sleep.py'
[ 64s] adding 'mwclient/util.py'
[ 64s] adding 'mwclient-0.10.1.dist-info/LICENSE.md'
[ 64s] adding 'mwclient-0.10.1.dist-info/METADATA'
[ 64s] adding 'mwclient-0.10.1.dist-info/WHEEL'
[ 64s] adding 'mwclient-0.10.1.dist-info/top_level.txt'
[ 64s] adding 'mwclient-0.10.1.dist-info/zip-safe'
[ 64s] adding 'mwclient-0.10.1.dist-info/RECORD'
[ 64s] removing build/bdist.linux-x86_64/wheel
[ 65s] Building wheel for mwclient (pyproject.toml): finished with status 'done'
[ 65s] Created wheel for mwclient: filename=mwclient-0.10.1-py2.py3-none-any.whl size=27987 sha256=06e6c7c744f3517ec63faaaa96f724a8cd8a200053320caeb2d8a70134ce89ef
[ 65s] Stored in directory: /home/abuild/.cache/pip/wheels/2c/98/53/198bdecaf7b17a2520e88cfd638c7280ef2851ed8e3473c973
[ 65s] Successfully built mwclient
[ 65s] + '[' -f ./build/mwclient-0.10.1-py2.py3-none-any.whl ']'
[ 65s] + mkdir -p ./dist
[ 65s] + cp ./build/mwclient-0.10.1-py2.py3-none-any.whl ./dist/
[ 65s] ++ '[' -f _current_flavor ']'
[ 65s] ++ cat _current_flavor
[ 65s] + last_flavor=python38
[ 65s] + '[' -z python38 ']'
[ 65s] + '[' python38 '!=' python39 ']'
[ 65s] + '[' -d build ']'
[ 65s] + mv build _build.python38
[ 65s] + '[' -d _build.python39 ']'
[ 65s] + echo python39
[ 65s] + python_flavor=python39
[ 65s] + myargs=
[ 65s] + '[' -f ./dist/mwclient-0.10.1-py2.py3-none-any.whl ']'
[ 65s] + echo 'Already found a compatible wheel in ./dist'
[ 65s] Already found a compatible wheel in ./dist
[ 65s] + mkdir -p ./build
[ 65s] + cp ./dist/mwclient-0.10.1-py2.py3-none-any.whl ./build/
[ 65s] ++ '[' -f _current_flavor ']'
[ 65s] ++ cat _current_flavor
[ 65s] + last_flavor=python39
[ 65s] + '[' -z python39 ']'
[ 65s] + '[' python39 '!=' python310 ']'
[ 65s] + '[' -d build ']'
[ 65s] + mv build _build.python39
[ 65s] + '[' -d _build.python310 ']'
[ 65s] + echo python310
[ 65s] + python_flavor=python310
[ 65s] + myargs=
[ 65s] + '[' -f ./dist/mwclient-0.10.1-py2.py3-none-any.whl ']'
[ 65s] + echo 'Already found a compatible wheel in ./dist'
[ 65s] Already found a compatible wheel in ./dist
[ 65s] + mkdir -p ./build
[ 65s] + cp ./dist/mwclient-0.10.1-py2.py3-none-any.whl ./build/
[ 65s] + RPM_EC=0
[ 65s] ++ jobs -p
[ 65s] + exit 0
Fixes bsc#1198988
See https://discuss.python.org/t/pep-610-usage-guidelines-for-linux-distributions/4012