Project

General

Profile

Actions

action #133610

closed

coordination #138077: [qe-core] Packages in Python Reduced Stack

[qe-core] Introduce a new test to verify python3-pip and virtual-env

Added by dvenkatachala over 1 year ago. Updated about 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
New test
Start date:
2023-08-01
Due date:
% Done:

50%

Estimated time:
Difficulty:
Sprint:
QE-Core: October Sprint 23 (Oct 11 - Nov 08)

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.


Related issues 1 (0 open1 closed)

Is duplicate of openQA Tests (public) - action #133607: [qe-core] Introduce a test for python-setuptoolsResolveddvenkatachala2023-08-01

Actions
Actions #1

Updated by dvenkatachala over 1 year ago

  • Description updated (diff)
Actions #2

Updated by dvenkatachala over 1 year ago

  • Description updated (diff)
Actions #4

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
Actions #5

Updated by ypagar over 1 year ago

  • Assignee set to ypagar
Actions #6

Updated by okurz over 1 year ago

  • Target version changed from Ready to QE-Core: Ready

wrong target version, correcting.

Actions #7

Updated by szarate over 1 year ago

Actions #8

Updated by ypagar over 1 year ago

  • Status changed from New to In Progress
Actions #9

Updated by ypagar over 1 year ago

I followed below manual steps:-

  1. Checked installed system distribution version

    [root@d193: ~]# cat /etc/os-release | grep VERSION_ID
    VERSION_ID="15.4"
    
  2. Checked installed system python version

    [root@d193: ~]# python3 -V
    Python 3.6.15
    [root@d193: ~]# python3 --version
    Python 3.6.15
    
  3. Check whether the system python version matches with the expected python version of system as per python stack proposal.

  4. 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)
    
  5. 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
    
  6. 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
    
  7. Install available latest python3 version

    #zypper -n install python3xx
    
  8. Check associated latest installed python3 version's pip

    #pyhton3.x -m pip --version
    OR
    #pip3.x --version
    
  9. 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
    
  10. 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
    
  11. Check whether the package get installed on system or not

    (env1)#pip list | grep mypackage
    OR
    (env1)#pip show mypackage
    
  12. Uninstall the previously installed package

    (env1)#pip uninstall mypackage
    
  13. Deactivate virtualenv

    (env1)#deactivate
    
  14. Uninstall available python version

    #zypper remove python3xx
    
Actions #10

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
Actions #11

Updated by ypagar over 1 year ago

  • % Done changed from 0 to 50
Actions #12

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

Actions #13

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)
Actions #14

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)
Actions #15

Updated by ypagar about 1 year ago

  • Is duplicate of action #133607: [qe-core] Introduce a test for python-setuptools added
Actions #16

Updated by ypagar about 1 year ago

  • Status changed from In Progress to Rejected
Actions #17

Updated by dvenkatachala about 1 year ago

  • Parent task set to #138077
Actions

Also available in: Atom PDF