-
Notifications
You must be signed in to change notification settings - Fork 4k
python: Replace deprecated setup.py with pypa/build+pip #5284
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
base: master
Are you sure you want to change the base?
Conversation
459af7d to
62beac2
Compare
|
Rebase to master (commit 5043759) |
62beac2 to
eab0710
Compare
|
rebase to master. |
eab0710 to
c97a9ce
Compare
|
Applying this patch on top of current master, I used the following script to build bcc: And I see the following error: With out patch, the build is successful. Could you take a look? |
Thanks for you reply
On my fedora42 python3.13, i just |
c97a9ce to
07ed475
Compare
|
Rebase to master. compile log of this patch |
|
Somehow, it still does not work for me. Using python3.12 (my command line Using python3.9, I got further, like below |
@yonghong-song Thanks for your reply, I think some dependencies may not be installed. I checked my local compilation script Can you confirm whether the wheel package of python3.9 is installed in your environment? |
07ed475 to
f2fea8f
Compare
19be707 to
abd3222
Compare
abd3222 to
db6d5a5
Compare
01b3ca9 to
809566f
Compare
|
Rebase to master. |
809566f to
4b6cb48
Compare
4b6cb48 to
9999a92
Compare
|
rebase to master |
When setuptools>58.2.0 setup.py installation is a deprecated method, a warning
message will be prompted [1]:
$ sudo make install
....
running install
/usr/lib/python3.13/site-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()
/usr/lib/python3.13/site-packages/setuptools/_distutils/cmd.py:66:
EasyInstallDeprecationWarning: easy_install command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``easy_install``.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See pypa/setuptools#917 for details.
********************************************************************************
!!
self.initialize_options()
Use the recommended solution [2] to replace setup.py with pypa/build and
pip-install to completely solve the problem. It is worth noting that under
Debian, you need to add the --break-system-packages parameter to pip-uninstall,
as shown in the following prompt:
Debian12:~$ sudo pip3 uninstall bcc
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python
installation or OS distribution provider. You can override this, at the
risk of breaking your Python installation or OS, by passing
--break-system-packages.
hint: See PEP 668 for the detailed specification.
# Successfully uninstalled
Debian12:~$ sudo pip3 uninstall bcc --break-system-packages
Fix: iovisor#4586 [1]
Link: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html [2]
Cc: Jerome Marchand <[email protected]>
Cc: Hengqi Chen <[email protected]>
Signed-off-by: Rong Tao <[email protected]>
9999a92 to
ae7c7cd
Compare
When setuptools>58.2.0 setup.py installation is a deprecated method, a warning message will be prompted [1]:
Use the recommended solution [2] to replace setup.py with pypa/build and pip-install to completely solve the problem. It is worth noting that under Debian, you need to add the --break-system-packages parameter to pip-uninstall, as shown in the following prompt:
Fix: #4586 [1]
Link: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html [2]