Request for merging "python-team" branch

  • Done
  • quality assurance status badge
Details
8 participants
  • Cayetano Santos
  • Ian Eure
  • jgart
  • Kaelyn
  • Lars-Dominik Braun
  • Leo Famulari
  • Ludovic Courtès
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 6 Dec 22:34 +0100
(address . guix-patches@gnu.org)
87bjxo8phy.fsf@gmail.com
Hi Guix!

I think it's a time to review and merge python-team branch.

It will bring refactored pyproject-build-system, refreshed collection of
packages from python-build module, refreshed python-numpy (1.24),
default python-pytest (8+), fresh python-flask, some clean up from
python-nose which is deprecated for few years.

Please test and report for any issues of the package you
love/need/demand.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmdTbekACgkQdtcnv/Ys
0rX5hxAAyPY95luuIlPe3xalXn86eYyfbRrFQ6D4HkWIIXzRzvXiYzOaOnYNqJpk
ma1OjHli9tIPFzZ/tDSdyMQxYkbsLPJ+NeHaKa71NO4XaXRkkDYPHMkTc3Hg/AAC
3bi4f23YUjXtXrr2SusREHa47kxU4Xjo3+1ZFwAfpB1avBQ/nZTvJ5+KXOfeUYii
58gNcGqjXBhcu385uotSAFCvQltHvgGlpq/ADITcOPhL+1H6zRvlR2dh9RR7z5Oc
9NfaMXLp1FeIJjly3wwDekWa+CNoaPlOC5fZWOEL2lOmqXtPZJA0MO47vO48fL/m
LVNRml3ACxD5h5pdxnXICGSbvrjCQOz7t8LdaNfo7WBW7ZFhO2sfTlmPuQx7wbgE
H/lKr28y1hTtgVREpjZXf2s8Sln/ww7l4Yoml4Kq1uJtNhsp1x3SXfwxnocM1n28
0uDqkhzXG8VnjmCnN5VYuP369CBX+bdgqApgzcvxdBg5V9YpbNJg63GE7pCyDw4A
ehcDvT5Dwp5fzst7W7VA0YU9DXoyV608GuCkFzZ5y7dQhoKM48Kzj2yCnUEHa8UM
U4W6nN/aABcOg3NfL0pJpmucK1LmfCFnbwy5UVlGWTH984OOaQwFtDhz9qyuEJ0N
IF3ph6YtzkcQAcrMzU7LYOBX4izw2GCR3lZ0LhsKGixqu5Nm+jI=
=yI0Q
-----END PGP SIGNATURE-----

S
S
Sharlatan Hellseher wrote on 10 Dec 20:31 +0100
(address . 74715@debbugs.gnu.org)
87r06f72sl.fsf@gmail.com
CC Python team for wider spread.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmdYlxoACgkQdtcnv/Ys
0rVAhQ/+P4PDxszvig3BsM7lLudXV03tBA+N/f41gkEqM/Yu1BDTfnJpfWDBDs+3
OfNOp9dxCoe5I2psuOqGLOJQ3QLQYlZaB/8Un66nGg/EwbCISkM54bE2RlIqbomH
a7c8e++SO4qTJW8nscEYNBZ6q/xKqnsLzjo5b7rx/9IgpMuxsjp3jyfaYMS9CPvH
HhTdRMJDrJpQG/TZc0WNhEj1ZoGOe7iKNsilHr9Qt7bUh5jJqPbH9AdUr5MB+V3v
7KD9F64+nx5P7/YxvkvZogW5ipdljAvcdNw+JTTa8MAmxYdUq/i+6iCtD9sNvTzd
lq53ckUz8pJEuucmS/bEtw4zocBgQnCmdsw2V3eQz1EIRZgmPsRNoUNVP6QJNEfW
2nzbKjOgZJBd+NjAQYErdGH/lEcg6/lVj43ZreBCEeuVAjJFTIYpUCB0fPqyD7su
Fo0U0GiyECkEj6Tpo3TObjfcAkMz+7hoxvL8O9bO2c29wuWSF9/piP9K9eRsq3QB
9D7hypG/AiGqJgmkhY5/tXX49XQh7I1hPLqABX5DN0AwbgacJoxS32vu1gGqdgPn
uaH/XoB3mDHLxnIPL78Ts+MAVrO3YOb+vd7dY1BVXfnwcGetffBVGXYIqzyMokhN
RV5K6Wdvx6ghrJVfdrxBZGZwOgK/BOz7pdqF00JnifjfyEptXzU=
=uXn1
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 13 Dec 16:55 +0100
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
875xnn37d2.fsf_-_@gnu.org
Hey there,

https://qa.guix.gnu.org/says it’s your turn to merge! :-)

Ludo’.
J
5bd6cd85e473f53effc8a876b94b22ba86837471@dismail.de
Hi Sharlatan,

Guix cheerleader here. Go for it! Merge ahoy!
??
LGTM
Attachment: file
S
S
Sharlatan Hellseher wrote on 14 Dec 11:03 +0100
Request for merging "python-team" branch
(address . 74715-done@debbugs.gnu.org)
87frmq7fac.fsf@gmail.com
Hi,

python-team branch has been rebased, conflicts resolved (python-redis
and python-pydevd) and merged to master.

Long lists of rebuild are in CI right now:


Post merge fix-up might be required like adding missing build time
dependencies (python-setuptools, python-wheel) for
pyproject-build-system packages not refreshed for a while.

--
Thanks,
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmddV9sACgkQdtcnv/Ys
0rW2hRAAi5wmjiETINkORyBk772zliU3z7v2wLby6vfPZJu9KoqMCSYREf8eibhf
EVEt99MaGBSKUQ8XztpqFy8JXm1MlZFOiXpiPQB4HqbPKhaakQhkAvKt0GKNTJA9
w/dHYyWTbibH8LtLzJHp6uUBexAsuG7KXxD1b5hiPvtxaergajPx1+DHSs+en4i7
NEASWkH3pcOhY/BnLZ2h77AyQJmE7LONvpG5M0IL1PbBuAnjz3XFrXp4/ZAO7xgC
QNgQ6UmpXoSFPjgd87u9rBY+PiSMIkYFEpkyw+vEbQRnvaiWuVyI2f59mFMn0LoE
3SNCPMiEcByDrZ6+0bp7AOdBPmHoUJz16s0ooQiCaXV6SlJaGVJqZYhrweTxxR4X
kDyEYd0gcVHbPJR9R5Xf6G0tpTTGdFITCZWjXp533FOORAs2M0mMUz07D/BsnAUL
DGTdfGQ3F1wtFDnwX4kYz9nuhfnZgehCYt24pCUHZm+sNezAKQM4xN0lGsquB/ai
jMp/aA1gEMzKBZ9tt6u3SMZTN6vCy5/dmtzK4fdUaWu2iE2HsksBLOb7+D2fKJFZ
AjzGx6zRZBmUnRi7iEmBzcBblBnyBU1Bktu0qAwIjHMbhe0ecLfsebvxU5QKVzyz
WVRIzGgU7U/dwmwU3OwF1W7jDh6k4931pTFa5HNWjFD2tBkoGNA=
=+B9z
-----END PGP SIGNATURE-----

Closed
I
I
Ian Eure wrote on 15 Dec 02:00 +0100
382af619-0dcd-4b4e-9e26-3576766c7aca@app.fastmail.com
Hi all,

Since this merge landed, the builds for several Python packages in my personal channel broke. Any package using pyproject-build-system for a Python project using setuptools seems to be affected. This python-manhole package[1] is an example. It's about as simple as they can get, with no inputs or custom build steps. It's failing with:

------------------------------------------------------------
starting phase `build'
Using 'setuptools.build_meta' to build wheels, auto-detected '#f', override '#f'.
Prepending '[]' to sys.path, auto-detected '#f', override '#f'.
Traceback (most recent call last):
File "<string>", line 6, in <module>
File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "python" arguments: ("-c" "import sys, importlib, json\nbackend_path = json.loads (sys.argv[1]) or []\nbackend_path.extend (sys.path)\nsys.path = backend_path\nconfig_settings = json.loads (sys.argv[4])\nbuilder = importlib.import_module(sys.argv[2])\nbuilder.build_wheel(sys.argv[3], config_settings=config_settings)" "[]" "setuptools.build_meta" "dist" "{}") exit-status: 1 term-signal: #f stop-signal: #f>
phase `build' failed after 0.0 seconds
command "python" "-c" "import sys, importlib, json\nbackend_path = json.loads (sys.argv[1]) or []\nbackend_path.extend (sys.path)\nsys.path = backend_path\nconfig_settings = json.loads (sys.argv[4])\nbuilder = importlib.import_module(sys.argv[2])\nbuilder.build_wheel(sys.argv[3], config_settings=config_settings)" "[]" "setuptools.build_meta" "dist" "{}" failed with status 1
build process 10 exited with status 256
------------------------------------------------------------

Since it's complaining about setuptools, I thought I might need to add that to the native-inputs. Alas, that fails with a different error:

------------------------------------------------------------
starting phase `build'
Using 'setuptools.build_meta' to build wheels, auto-detected '#f', override '#f'.
Prepending '[]' to sys.path, auto-detected '#f', override '#f'.
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help

error: invalid command 'bdist_wheel'
------------------------------------------------------------

Is there somewhere I can find out how to fix these packages for the updated pyproject-build-system? Should they be getting switched to python-build-system?

Noting also that the PyPI module for `guix import' hardcodes the pyproject-build-system, so it will generate unbuildable definitions for any Python project which uses setuptools.

Thanks,

-- Ian


On Fri, Dec 13, 2024, at 5:00 PM, jgart wrote:
Toggle quote (7 lines)
> Hi Sharlatan,
>
> Guix cheerleader here. Go for it! Merge ahoy!
> ??
> LGTM
>
>
Attachment: file
K
K
Kaelyn wrote on 15 Dec 07:24 +0100
(name . Ian Eure)(address . ian@retrospec.tv)
0cK3cZ-V-EL1FRp9WsX7kNpVwF2jL4zrAUY7Pvn5YMa4Ps1T1udAdnhM8aYPAuwYXQdC0CQMBV61qmfzMPGvehG1ziovhuubUCERBmAzsZQ=@protonmail.com
Hi Ian,

On Saturday, December 14th, 2024 at 5:00 PM, Ian Eure <ian@retrospec.tv> wrote:

Toggle quote (41 lines)
> Hi all,
>
> Since this merge landed, the builds for several Python packages in my personal channel broke.  Any package using pyproject-build-system for a Python project using setuptools seems to be affected.  This python-manhole package[1] is an example.  It's  about as simple as they can get, with no inputs or custom build steps.  It's failing with:
>
> ------------------------------------------------------------
> starting phase `build'
> Using 'setuptools.build_meta' to build wheels, auto-detected '#f', override '#f'.
> Prepending '[]' to sys.path, auto-detected '#f', override '#f'.
> Traceback (most recent call last):
>   File "<string>", line 6, in <module>
>   File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/importlib/__init__.py", line 126, in import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
>   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
>   File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
>   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
>   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
>   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
>   File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
> ModuleNotFoundError: No module named 'setuptools'
> error: in phase 'build': uncaught exception:
> %exception #<&invoke-error program: "python" arguments: ("-c" "import sys, importlib, json\nbackend_path = json.loads (sys.argv[1]) or []\nbackend_path.extend (sys.path)\nsys.path = backend_path\nconfig_settings = json.loads (sys.argv[4])\nbuilder = importlib.import_module(sys.argv[2])\nbuilder.build_wheel(sys.argv[3], config_settings=config_settings)" "[]" "setuptools.build_meta" "dist" "{}") exit-status: 1 term-signal: #f stop-signal: #f> 
> phase `build' failed after 0.0 seconds
> command "python" "-c" "import sys, importlib, json\nbackend_path = json.loads (sys.argv[1]) or []\nbackend_path.extend (sys.path)\nsys.path = backend_path\nconfig_settings = json.loads (sys.argv[4])\nbuilder = importlib.import_module(sys.argv[2])\nbuilder.build_wheel(sys.argv[3], config_settings=config_settings)" "[]" "setuptools.build_meta" "dist" "{}" failed with status 1
> build process 10 exited with status 256
> ------------------------------------------------------------
>
> Since it's complaining about setuptools, I thought I might need to add that to the native-inputs.  Alas, that fails with a different error:
>
> ------------------------------------------------------------
> starting phase `build'
> Using 'setuptools.build_meta' to build wheels, auto-detected '#f', override '#f'.
> Prepending '[]' to sys.path, auto-detected '#f', override '#f'.
> usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
>    or: -c --help [cmd1 cmd2 ...]
>    or: -c --help-commands
>    or: -c cmd --help
>
> error: invalid command 'bdist_wheel'
> ------------------------------------------------------------

I don't have any comment about the pyproject-build-system issue in general, but I've done enough maintenance of Python packages in general to be familiar with this error. It should be as simple as adding `python-wheel` to the native-inputs--it is the module that allows setuptools to generate .whl files, and I'd be surprised if additional packages were needed (I've encountered having to add explicit setuptools and wheel dependencies to requirements.txt files for pip when changing the build environment of packages such as changing distros or Python versions). HTH!

Cheers,
Kaelyn

Toggle quote (21 lines)
> Is there somewhere I can find out how to fix these packages for the updated pyproject-build-system?  Should they be getting switched to python-build-system?
>
> Noting also that the PyPI module for `guix import' hardcodes the pyproject-build-system, so it will generate unbuildable definitions for any Python project which uses setuptools.
>
> Thanks,
>
>   -- Ian
>
> [1]: https://codeberg.org/ieure/atomized-guix/src/branch/main/atomized/packages/python-xyz.scm#L22
>
> On Fri, Dec 13, 2024, at 5:00 PM, jgart wrote:
>
> > Hi Sharlatan,
> >
> > Guix cheerleader here. Go for it! Merge ahoy!
> > ??
> > LGTM
> >
> >
>
>
L
L
Lars-Dominik Braun wrote on 15 Dec 07:28 +0100
(name . Ian Eure)(address . ian@retrospec.tv)
Z153IS4JWlm0Y_gi@noor.fritz.box
Hi Ian,

Toggle quote (2 lines)
> Since this merge landed, the builds for several Python packages in my personal channel broke. Any package using pyproject-build-system for a Python project using setuptools seems to be affected.

as Sharlatan Hellseher wrote in https://issues.guix.gnu.org/issue/74715#4,
you need to add python-setuptools and python-wheel to your
setuptools-based packages. The default python toolchain used by
pyproject-build-system (python-sans-pip-wrapper from
gnu/packages/python.scm) does not include these packages any more,
since they are technically not required and declaring them as *real*
inputs allows using different versions of these packages more easily
for packages, which require them. Plus there are quite a few packages,
which build using different build systems nowadays.

The python importer should probably be updated to read pyproject.toml
and parse the [build-system] table (there is a toml parser in Guix now,
so this should be easy).

Lars
S
S
Sharlatan Hellseher wrote on 15 Dec 11:29 +0100
(name . Lars-Dominik Braun)(address . lars@6xq.net)
CAO+9K5r+WWu13zNXgZibYwShc--9RnzCKEAzgRBN3u+oKHPAJA@mail.gmail.com
Hi,

Maybe we may put some news about changes in pyproject build system?

Thanks
Oleg
Attachment: file
I
I
Ian Eure wrote on 15 Dec 18:53 +0100
(name . Lars-Dominik Braun)(address . lars@6xq.net)
57df3ada-d4a8-472a-8ac0-fd3c30932c8f@app.fastmail.com
Hi Lars-Dominik,

On Sun, Dec 15, 2024, at 6:28 AM, Lars-Dominik Braun wrote:
Toggle quote (15 lines)
> Hi Ian,
>
>> Since this merge landed, the builds for several Python packages in my personal channel broke. Any package using pyproject-build-system for a Python project using setuptools seems to be affected.
>
> as Sharlatan Hellseher wrote in https://issues.guix.gnu.org/issue/74715#4,
> you need to add python-setuptools and python-wheel to your
> setuptools-based packages. The default python toolchain used by
> pyproject-build-system (python-sans-pip-wrapper from
> gnu/packages/python.scm) does not include these packages any more,
> since they are technically not required and declaring them as *real*
> inputs allows using different versions of these packages more easily
> for packages, which require them. Plus there are quite a few packages,
> which build using different build systems nowadays.
>

Thanks, this worked for me. I skimmed the related bug, but missed this comment. I think the docs for pyproject-build-system are likely the best place for this, as they already mention some of the setuptools/pyproject interaction. I sent a patch (#74899) with some draft language, let me know what you think.

Toggle quote (5 lines)
> The python importer should probably be updated to read pyproject.toml
> and parse the [build-system] table (there is a toml parser in Guix now,
> so this should be easy).
>

Would it be helpful to open a bug about this?

Thanks,

-- Ian
C
C
Cayetano Santos wrote on 15 Dec 19:05 +0100
(name . Ian Eure)(address . ian@retrospec.tv)
875xnkes9p.fsf@inventati.org
Toggle quote (4 lines)
>dim. 15 déc. 2024 at 17:53, "Ian Eure" <ian@retrospec.tv> wrote:

> Would it be helpful to open a bug about this?

I confirm, this line

(inputs (list python-setuptools python-wheel))

fixes the issue for me.

However, ‘guix lint’ complaints about python-setuptools not necessary.

--
Cayetano Santos
FingerPrint: CCB8 1842 F9D7 058E CD67 377A BF5C DF4D F6BF 6682
-----BEGIN PGP SIGNATURE-----

iI0EARYKADUWIQTMuBhC+dcFjs1nN3q/XN9N9r9mggUCZ18aYhccY3NhbnRvc2JA
aW52ZW50YXRpLm9yZwAKCRC/XN9N9r9mgkSSAP4xz/Rrdh3znQE6SufqOKiwafX1
eT0StcdlOpbVaiEOLQD/UVMPiCMFbvMxxYqSnElaCK/PfWXwgceSZQUApOT1ug8=
=nVyC
-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 15 Dec 19:12 +0100
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
Z18cC09MPCyu-pAt@jasmine.lan
On Sun, Dec 15, 2024 at 10:29:03AM +0000, Sharlatan Hellseher wrote:
Toggle quote (4 lines)
> Hi,
>
> Maybe we may put some news about changes in pyproject build system?

I think that's a great idea.
L
L
Lars-Dominik Braun wrote on 15 Dec 22:01 +0100
(name . Ian Eure)(address . ian@retrospec.tv)
Z19DveZnpguPM3IU@noor.fritz.box
Hi,

Toggle quote (2 lines)
> Would it be helpful to open a bug about this?

there is https://issues.guix.gnu.org/69997,which includes patches to
add initial pyproject.toml support to `guix import pypi`.

Lars
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74715@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74715
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch