You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suggestions on Python processing of cloud.spec file in packaging directory #4513
In the packaging\centos7 and packaging\centos8 directories, there are many problems about Python processing in the cloud.spec file.
python2 is used in the current compilation environment, while python3 is used in some running environments, which causes confusion. It is suggested that package dependency of the running environment should not be handled in the compilation environment, and the basic environmental requirements should be explained in the installation document of the running environment. Considering the transitional period between two major versions of python, it is recommended to use python2 only when compiling and python3 as much as possible in the running environment.
It is not recommended to download the package of python3 running environment and put it in RPM file at compile time, but to run “pip install " at install time, because these installation packages are updated frequently and should not be limited to a lower version by cloudstack. At the same time, because of the existence of mirror image, it is more appropriate for pip to download from the mirror image site faster.
It is not recommended to add dependencies such as Requires: python36-libvirt, Requires: python, Requires: python3, and Requires: python3-pip to cloud.spec. At present, Python is used for compilation and installation, or tar package installation directly, instead of RPM installation. After I cancel these dependencies, I compile smoothly. If I add these, I have to install python2 and python3 at the same time using RPM, which is easy to cause conflicts.
In addition, it is suggested that, when the two major versions of python are used together, the commands previously used in python2 should be modified instead of python commands, so as to be clearly distinguished from python3.
Add the compilation environment python processing way:
Operating system: CentOS-8.2
Python2 installation uses yum install python2
Python3.7.9 is compiled with source code and installed in python3.7 under the home directory.
@saliven1970 thanks for the input, we have several locations where transition from python2 to python3 is ongoing see #3195 if you have any experience on the transition in any area such as packaging input is welcome (are you preparing a pr, or do you have code changes to sugest?)
I'll add a ref back to this in that easy querying.
Activity
DaanHoogland commentedon Dec 2, 2020
@saliven1970 thanks for the input, we have several locations where transition from python2 to python3 is ongoing see #3195 if you have any experience on the transition in any area such as packaging input is welcome (are you preparing a pr, or do you have code changes to sugest?)
I'll add a ref back to this in that easy querying.
saliven1970 commentedon Mar 2, 2021
Marvin and tests and SystemVM scripts have all been migrated to python3,this issus can be closed
DaanHoogland commentedon Mar 2, 2021
@saliven1970 I'm not sure I followed all your suggestions, and also component tests are not all passing yet, but the larger part is done.