unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Request for merging "python-team" branch
@ 2024-12-10 19:31 ` Sharlatan Hellseher
  2024-12-13 15:55   ` bug#74715: " Ludovic Courtès
  0 siblings, 1 reply; 11+ messages in thread
From: Sharlatan Hellseher @ 2024-12-10 19:31 UTC (permalink / raw)
  To: 74715; +Cc: lars, marius, me, sharlatanus, tanguy, jgart, guix-devel

[-- Attachment #1: Type: text/plain, Size: 34 bytes --]


CC Python team for wider spread.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#74715: Request for merging "python-team" branch
  2024-12-10 19:31 ` Request for merging "python-team" branch Sharlatan Hellseher
@ 2024-12-13 15:55   ` Ludovic Courtès
  2024-12-13 17:00     ` jgart
  0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2024-12-13 15:55 UTC (permalink / raw)
  To: Sharlatan Hellseher; +Cc: 74715, me, lars, jgart, marius, guix-devel, tanguy

Hey there,

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

Ludo’.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#74715: Request for merging "python-team" branch
  2024-12-13 15:55   ` bug#74715: " Ludovic Courtès
@ 2024-12-13 17:00     ` jgart
  2024-12-15  1:00       ` Ian Eure
  0 siblings, 1 reply; 11+ messages in thread
From: jgart @ 2024-12-13 17:00 UTC (permalink / raw)
  To: Ludovic Courtès, Sharlatan Hellseher
  Cc: 74715, me, lars, marius, guix-devel, tanguy

[-- Attachment #1: Type: text/plain, Size: 79 bytes --]

Hi Sharlatan,

Guix cheerleader here. Go for it! Merge ahoy!
🦜🦆
 LGTM

[-- Attachment #2: Type: text/html, Size: 297 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#74715: Request for merging "python-team" branch
  2024-12-13 17:00     ` jgart
@ 2024-12-15  1:00       ` Ian Eure
  2024-12-15  6:24         ` Kaelyn via Development of GNU Guix and the GNU System distribution.
  2024-12-15  6:28         ` Lars-Dominik Braun
  0 siblings, 2 replies; 11+ messages in thread
From: Ian Eure @ 2024-12-15  1:00 UTC (permalink / raw)
  To: jgart, Ludovic Courtès, Sharlatan Hellseher
  Cc: 74715, me, lars, marius, guix-devel, tanguy

[-- Attachment #1: Type: text/plain, Size: 3679 bytes --]

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

[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
> 
> 

[-- Attachment #2: Type: text/html, Size: 5834 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#74715: Request for merging "python-team" branch
  2024-12-15  1:00       ` Ian Eure
@ 2024-12-15  6:24         ` Kaelyn via Development of GNU Guix and the GNU System distribution.
  2024-12-15  6:28         ` Lars-Dominik Braun
  1 sibling, 0 replies; 11+ messages in thread
From: Kaelyn via Development of GNU Guix and the GNU System distribution. @ 2024-12-15  6:24 UTC (permalink / raw)
  To: Ian Eure
  Cc: jgart, Ludovic Courtès, Sharlatan Hellseher, 74715, me, lars,
	marius, guix-devel, tanguy

Hi Ian,

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

> 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

> 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
> > 
> > 
> 
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#74715: Request for merging "python-team" branch
  2024-12-15  1:00       ` Ian Eure
  2024-12-15  6:24         ` Kaelyn via Development of GNU Guix and the GNU System distribution.
@ 2024-12-15  6:28         ` Lars-Dominik Braun
  2024-12-15 10:29           ` Sharlatan Hellseher
  2024-12-15 17:53           ` Ian Eure
  1 sibling, 2 replies; 11+ messages in thread
From: Lars-Dominik Braun @ 2024-12-15  6:28 UTC (permalink / raw)
  To: Ian Eure
  Cc: jgart, Ludovic Courtès, Sharlatan Hellseher, 74715, me,
	marius, guix-devel, tanguy

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.

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



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#74715: Request for merging "python-team" branch
  2024-12-15  6:28         ` Lars-Dominik Braun
@ 2024-12-15 10:29           ` Sharlatan Hellseher
  2024-12-15 18:12             ` Leo Famulari
  2024-12-15 17:53           ` Ian Eure
  1 sibling, 1 reply; 11+ messages in thread
From: Sharlatan Hellseher @ 2024-12-15 10:29 UTC (permalink / raw)
  To: Lars-Dominik Braun
  Cc: Ian Eure, jgart, Ludovic Courtès, 74715, Munyoki Kilyungi,
	Marius Bakke, guix-devel, Tanguy Le Carrour

[-- Attachment #1: Type: text/plain, Size: 86 bytes --]

Hi,

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

Thanks
Oleg

[-- Attachment #2: Type: text/html, Size: 224 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#74715: Request for merging "python-team" branch
  2024-12-15  6:28         ` Lars-Dominik Braun
  2024-12-15 10:29           ` Sharlatan Hellseher
@ 2024-12-15 17:53           ` Ian Eure
  2024-12-15 18:05             ` Cayetano Santos
  2024-12-15 21:01             ` Lars-Dominik Braun
  1 sibling, 2 replies; 11+ messages in thread
From: Ian Eure @ 2024-12-15 17:53 UTC (permalink / raw)
  To: Lars-Dominik Braun
  Cc: jgart, Ludovic Courtès, Sharlatan Hellseher, 74715, me,
	marius, guix-devel, tanguy

Hi Lars-Dominik,

On Sun, Dec 15, 2024, at 6:28 AM, Lars-Dominik Braun wrote:
> 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.

> 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#74715: Request for merging "python-team" branch
  2024-12-15 17:53           ` Ian Eure
@ 2024-12-15 18:05             ` Cayetano Santos
  2024-12-15 21:01             ` Lars-Dominik Braun
  1 sibling, 0 replies; 11+ messages in thread
From: Cayetano Santos @ 2024-12-15 18:05 UTC (permalink / raw)
  To: Ian Eure
  Cc: Lars-Dominik Braun, jgart, Ludovic Courtès,
	Sharlatan Hellseher, 74715, me, marius, guix-devel, tanguy

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]


>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
GnuPG Key:   https://meta.sr.ht/~csantosb.pgp
FingerPrint: CCB8 1842 F9D7 058E CD67 377A BF5C DF4D F6BF 6682

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#74715: Request for merging "python-team" branch
  2024-12-15 10:29           ` Sharlatan Hellseher
@ 2024-12-15 18:12             ` Leo Famulari
  0 siblings, 0 replies; 11+ messages in thread
From: Leo Famulari @ 2024-12-15 18:12 UTC (permalink / raw)
  To: Sharlatan Hellseher
  Cc: Lars-Dominik Braun, Ian Eure, jgart, Ludovic Courtès, 74715,
	Munyoki Kilyungi, Marius Bakke, guix-devel, Tanguy Le Carrour

On Sun, Dec 15, 2024 at 10:29:03AM +0000, Sharlatan Hellseher wrote:
> Hi,
> 
> Maybe we may put some news about changes in pyproject build system?

I think that's a great idea.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#74715: Request for merging "python-team" branch
  2024-12-15 17:53           ` Ian Eure
  2024-12-15 18:05             ` Cayetano Santos
@ 2024-12-15 21:01             ` Lars-Dominik Braun
  1 sibling, 0 replies; 11+ messages in thread
From: Lars-Dominik Braun @ 2024-12-15 21:01 UTC (permalink / raw)
  To: Ian Eure
  Cc: jgart, Ludovic Courtès, Sharlatan Hellseher, 74715, me,
	marius, guix-devel, tanguy

Hi,

> 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



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-12-15 21:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87bjxo8phy.fsf@gmail.com>
2024-12-10 19:31 ` Request for merging "python-team" branch Sharlatan Hellseher
2024-12-13 15:55   ` bug#74715: " Ludovic Courtès
2024-12-13 17:00     ` jgart
2024-12-15  1:00       ` Ian Eure
2024-12-15  6:24         ` Kaelyn via Development of GNU Guix and the GNU System distribution.
2024-12-15  6:28         ` Lars-Dominik Braun
2024-12-15 10:29           ` Sharlatan Hellseher
2024-12-15 18:12             ` Leo Famulari
2024-12-15 17:53           ` Ian Eure
2024-12-15 18:05             ` Cayetano Santos
2024-12-15 21:01             ` Lars-Dominik Braun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).