Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building zvmsdk for Ubuntu 24.04 #831

Open
aazam-gh opened this issue Jul 19, 2024 · 6 comments
Open

Error when building zvmsdk for Ubuntu 24.04 #831

aazam-gh opened this issue Jul 19, 2024 · 6 comments

Comments

@aazam-gh
Copy link
Contributor

Hello, I am currently working on improving the Feilong Packaging process as part my OMP mentorship with Linux Foundation.

For building zvmsdk (as per documentation) in Ubuntu 24.04 using build-zvmsdk, we encounter an issue due to the depreciation of setup.py as it is no longer available in Python 3.12

Here is a snapshot of the errorlog, when running the buildzvmsdkdeb script.

make[1]: Leaving directory '/home/linux1/build-zvmsdk/feilong'
   create-stamp debian/debhelper-build-stamp
 fakeroot debian/rules binary
dh binary --with python3 --buildsystem=pybuild
   dh_testroot -O--buildsystem=pybuild
   dh_prep -O--buildsystem=pybuild
	rm -f -- debian/zvmsdk.substvars
	rm -fr -- debian/.debhelper/generated/zvmsdk/ debian/zvmsdk/ debian/tmp/
   dh_auto_install --destdir=debian/zvmsdk/ -O--buildsystem=pybuild
	install -m0755 -d /home/linux1/build-zvmsdk/feilong/debian/zvmsdk
	pybuild --install -i python{version} -p 3.12 --dest-dir /home/linux1/build-zvmsdk/feilong/debian/zvmsdk
I: pybuild base:311: /usr/bin/python3 setup.py install --root /home/linux1/build-zvmsdk/feilong/debian/zvmsdk 
running install
/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
error: error in /home/linux1/build-zvmsdk/feilong/.pybuild/cpython3_3.12_zvmsdk/.pydistutils.cfg: command 'install' has no such option 'install_layout'
E: pybuild pybuild:389: install: plugin distutils failed with: exit code=1: /usr/bin/python3 setup.py install --root /home/linux1/build-zvmsdk/feilong/debian/zvmsdk 
dh_auto_install: error: pybuild --install -i python{version} -p 3.12 --dest-dir /home/linux1/build-zvmsdk/feilong/debian/zvmsdk returned exit code 13
make: *** [debian/rules:6: binary] Error 13
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2

According to this blog setup.py can no longer be directly invoked and hence results in the build error. I have tried using pip to install but it seems as db-helper also calls setup.py.
By the introduction of PEP 517 and PEP 518 we will have to change how we build the package for debian.

I would appreciate any assistance in resolving this, especially on how we can move away from using setup.py. From what I have looked into, poetry might be the way with a pyproject.toml.
I currently have a PR in progress for this issue. Thank you :)

@mfriesenegger
Copy link
Contributor

@jichenjc @larainema Can you help provide guidance on how to solve this issue?

@larainema
Copy link
Contributor

@bjhuangr @wghaojue if you have some comments for this issue?

@mfriesenegger
Copy link
Contributor

If mfcloud/build-zvmsdk#7 (comment) can be duplicated then this issue might not need to be addressed.

@jichenjc
Copy link
Collaborator

jichenjc commented Aug 1, 2024

Thanks for reporting this

sorry for late response, we used to support Ubuntu but currently it's lack of test ,we will check what we can do here

@mfriesenegger
Copy link
Contributor

@aazam-gh Based on the latest success in building packages in OBS for Ubuntu, I think this issue is no longer valid and should be closed.

@aazam-gh
Copy link
Contributor Author

The issue has been resolved. Ubuntu 24.04 is successfully packaged for feilong.
However a point to note is that setup.py is indeed depreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants