action #133610
closedcoordination #138077: [qe-core] Packages in Python Reduced Stack
[qe-core] Introduce a new test to verify python3-pip and virtual-env
50%
Description
Introduce a new test to verify python3-pip. Verify the system's python3-pip and also install and verify available python3-pip in SLE15-SPs and Tumbleweed.
Acceptance Criteria¶
1. Installation Test:
- Check the version of the system's pip to ensure it matches the expected version.
2. Package Installation Test:
- Install a set of common packages from PyPI using pip install.
- Verify that the packages are installed correctly and can be imported in Python.
- Check that dependencies are resolved and installed automatically.
3. Package Uninstallation Test:
- Verify that the packages are removed from the system and no longer accessible.
4. Install all available pip versions and repeat the above steps for each installed pip version.
Updated by dvenkatachala over 1 year ago
- Subject changed from Introduce a new test to verify python3-pip to [qe-core] Introduce a new test to verify python3-pip
Updated by okurz over 1 year ago
- Target version changed from Ready to QE-Core: Ready
wrong target version, correcting.
Updated by szarate over 1 year ago
For a follow up, https://jira.suse.com/browse/PED-5573
Updated by ypagar over 1 year ago
I followed below manual steps:-
Checked installed system distribution version
[root@d193: ~]# cat /etc/os-release | grep VERSION_ID VERSION_ID="15.4"
Checked installed system python version
[root@d193: ~]# python3 -V Python 3.6.15 [root@d193: ~]# python3 --version Python 3.6.15
Check whether the system python version matches with the expected python version of system as per python stack proposal.
Check whether the python pip version matches with system python version (we can opt one way from below)
[root@d193: ~]# python3.6 -m pip --version pip 20.0.2 from /usr/lib/python3.6/site-packages/pip (python 3.6) OR [root@d193: ~]# pip3.6 --version pip 20.0.2 from /usr/lib/python3.6/site-packages/pip (python 3.6)
Enable/add new python version repository using SUSEConnect
e.g. #SUSEConnect -p sle-module-python3/${VERSION_ID}/${CPU} #SUSEConnect -p sle-module-python3/15.4/x86_64
Find out latest available python3 version on system after enabling the repo using SUSEConnect
#zypper se 'python3[0-9]*' | awk -F '|' '/python3[0-9]/ {gsub(" ", ""); print \$2}' | awk -F '-' '{print \$1}' | uniq
Install available latest python3 version
#zypper -n install python3xx
Check associated latest installed python3 version's pip
#pyhton3.x -m pip --version OR #pip3.x --version
Create virtual environment
#pip3.x install virtualenv #virtualenv env1 #source env1/bin/activate OR #python3.x -m venv env1 --(functionality available from python3.4+) #source env1/bin/activate
Install a already download package using python pip offline
e.g. (env1)#pip3.x install --no-index --find-links /some/path <package name> (env1)#pip3.11 install --no-index --find-links /home/ypagar/Download/mypackage.tar.gz
Check whether the package get installed on system or not
(env1)#pip list | grep mypackage OR (env1)#pip show mypackage
Uninstall the previously installed package
(env1)#pip uninstall mypackage
Deactivate virtualenv
(env1)#deactivate
Uninstall available python version
#zypper remove python3xx
Updated by szarate over 1 year ago
- Sprint set to QE-Core: August Sprint 23 (Aug 09 - Sep 04)
- Tags set to qe-core-august-sprint
Updated by szarate over 1 year ago
- Subject changed from [qe-core] Introduce a new test to verify python3-pip to [qe-core] Introduce a new test to verify python3-pip and virtual-env
During today's review, it was suggested that combining pip and virtualenv would be a great idea
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/17681
Updated by szarate over 1 year ago
- Sprint changed from QE-Core: August Sprint 23 (Aug 09 - Sep 04) to QE-Core: September Sprint 23 (Sep 06 - Oct 04)
Updated by szarate about 1 year ago
- Sprint changed from QE-Core: September Sprint 23 (Sep 06 - Oct 04) to QE-Core: October Sprint 23 (Oct 11 - Nov 08)
Updated by ypagar about 1 year ago
- Is duplicate of action #133607: [qe-core] Introduce a test for python-setuptools added