Re: python packaging assistance sought for xgboost

2023-12-18 Thread Miro Hrončok

On 12. 12. 23 7:56, Nathan Scott wrote:

Thanks Miro - that size pointer was helpful.  Indeed, the only thing in the 
wheel are 3 metadata files.

Things seem to be OK up to this point in the upstream hatchling build:
https://github.com/dmlc/xgboost/blob/43897b829680d241491abe1ecd46b2ba9d338967/python-package/packager/pep517.py#L86

... that temporary directory is populated with all the python files in what 
looks like a good format, but the generated wheel is essentially empty.  Is 
there any way to see what's happening inside that hatchling.build.build_wheel 
call I wonder?


I don't know.

Try adding:

  [tool.hatch.build.targets.wheel]
  packages = ["xgboost"]

to pyproject.toml. Does it help?

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
--
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: python packaging assistance sought for xgboost

2023-12-11 Thread Nathan Scott
Thanks Miro - that size pointer was helpful.  Indeed, the only thing in the 
wheel are 3 metadata files.

Things seem to be OK up to this point in the upstream hatchling build:
https://github.com/dmlc/xgboost/blob/43897b829680d241491abe1ecd46b2ba9d338967/python-package/packager/pep517.py#L86

... that temporary directory is populated with all the python files in what 
looks like a good format, but the generated wheel is essentially empty.  Is 
there any way to see what's happening inside that hatchling.build.build_wheel 
call I wonder?

In related news, a setup.py based build works correctly.  Perhaps it would be 
simpler to just give up on the upstream python build bits?  (already having to 
patch them a fair bit since they don't supported versioned soname on 
libxgboost).

Thanks for all the insights.

cheers.

--
Nathan
--
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: python packaging assistance sought for xgboost

2023-12-11 Thread Miro Hrončok

On 10. 12. 23 23:05, Nathan Scott wrote:

Thanks for the assistance Miro.

I've uploaded a local build log here:  
https://nathans.fedorapeople.org/xgboost/build.log

AFAICS the python parts of the %install step seemed to have worked, but based 
on Sandro's pointer I can see many files are missing.


Building wheels for collected packages: xgboost
  Building wheel for xgboost (pyproject.toml): started
  Running command Building wheel for xgboost (pyproject.toml)
  Building wheel for xgboost (pyproject.toml): finished with status 'done'
  Created wheel for xgboost: filename=xgboost-2.0.2-py3-none-linux_aarch64.whl 
size=1413 sha256=e77e7765ce58907708363f8e60bf96ba11abd5f66bb78c1804f59bccdd4df36d


There's not much information here, but size 1413 indicates the built wheel does 
not really have any Python modules in it.



--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
--
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: python packaging assistance sought for xgboost

2023-12-10 Thread Nathan Scott
Thanks for the assistance Miro.

I've uploaded a local build log here:  
https://nathans.fedorapeople.org/xgboost/build.log

AFAICS the python parts of the %install step seemed to have worked, but based 
on Sandro's pointer I can see many files are missing.

cheers.

--
Nathan
--
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: python packaging assistance sought for xgboost

2023-12-10 Thread Nathan Scott
Thanks for the assistance Sandro!

What I see is ...

BUILDROOT/xgboost-2.0.2-1.fc39.aarch64/usr/[...] <- all manner of files from 
the C++ build/install, then ...
BUILDROOT/xgboost-2.0.2-1.fc39.aarch64/usr/lib
BUILDROOT/xgboost-2.0.2-1.fc39.aarch64/usr/lib/python3.12
BUILDROOT/xgboost-2.0.2-1.fc39.aarch64/usr/lib/python3.12/site-packages
BUILDROOT/xgboost-2.0.2-1.fc39.aarch64/usr/lib/python3.12/site-packages/xgboost-2.0.2.dist-info
BUILDROOT/xgboost-2.0.2-1.fc39.aarch64/usr/lib/python3.12/site-packages/xgboost-2.0.2.dist-info/METADATA
BUILDROOT/xgboost-2.0.2-1.fc39.aarch64/usr/lib/python3.12/site-packages/xgboost-2.0.2.dist-info/WHEEL
BUILDROOT/xgboost-2.0.2-1.fc39.aarch64/usr/lib/python3.12/site-packages/xgboost-2.0.2.dist-info/INSTALLER

But nothing that looks like actual python code has been installed.  I'll 
followup with the build log shortly.

cheers.

--
Nathan
--
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: python packaging assistance sought for xgboost

2023-12-10 Thread Miro Hrončok

On 08. 12. 23 7:22, Nathan Scott wrote:

Hi all,

I've recently been packaging xgboost for Fedora.  It's a C++ project using 
cmake, with a python module on the side (all in one source tarball): 
https://nathans.fedorapeople.org/xgboost/
The dependent dmlc-core package is here: 
https://nathans.fedorapeople.org/dmlc-core/

Everything is prepared and working from the C++ and shared library 
perspectives, but I'm struggling with getting the python module to install 
using latest Fedora python spec guidelines.  Can anyone point out where I've 
gone wrong?  (looks like its during the final python step in the spec %install)

https://nathans.fedorapeople.org/xgboost/xgboost.spec+python shows my additions to add 
the python sub-package and this is the error I now see (this is from the 
"%pyproject_save_files xgboost" line right at the end of %install):

Traceback (most recent call last):
   File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 775, in 
 main(cli_args)
   File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 730, in main
 file_section, module_names = pyproject_save_files_and_modules(
  ^
   File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 720, in 
pyproject_save_files_and_modules
 generate_file_list(paths_dict, globs, include_auto)
   File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 534, in 
generate_file_list
 raise ValueError(f"Globs did not match any module: {missed_text}")
ValueError: Globs did not match any module: xgboost
error: Bad exit status from /var/tmp/rpm-tmp.y91d9b (%install)

RPM build errors:
 Bad exit status from /var/tmp/rpm-tmp.y91d9b (%install)


Hello. As was already said, the error is that:

  %pyproject_save_files xgboost

Finds no such Python modules.

If you could provide a full build log, it might indicate what Python modules 
(if any) are actually installed.


Examining the wheels from https://pypi.org/project/xgboost/#files

  xgboost-2.0.2-py3-none-manylinux2014_x86_64.whl

This one actually contains an xgboost Python module. That might indicate the 
build step in %pyproject_wheel is somewhat broken. Without full logs, I cannot 
say more.




--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
--
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: python packaging assistance sought for xgboost

2023-12-08 Thread Sandro

On 08-12-2023 07:22, Nathan Scott wrote:

ValueError: Globs did not match any module: xgboost


This sounds like the module is not installed where you think it is. In 
other words %{pyproject_files} would be empty because the glob (xgboost) 
after %pyproject_save_files doesn't match anything.


What do you have in 
build/BUILDROOT/*/usr/lib64/python3.12/site-packages/ inside your mock 
changeroot?


-- Sandro
--
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue