1

I'm planning to install on a sensitive production IBM AIX5.3 machine a new Python environment alongside an existing Python 2.5 installation. The goal is to eventually port all legacy code from version 2.5 to 3.9.

In addition to being extremely old, the current Python environment has not been properly set up and misses several dependencies, so many built-in modules and third party libraries are not usable. Instead of trying to fix an archaic installation, I'm more inclined to install the latest one and port the code bit by bit.

It is crucial for me that the new installation misses no dependencies and runs 100% as intended. The official Python website provides a link to an installation package that should assure me that everything will be in place once installed, but the OS is very old and I have to make sure that libraries that may be now provided by default are not missing.

What is the best way to ensure that a Python installation, including all its built-in modules, is complete and properly working?

I think that running python3 -m test may be a good starting point, but is it exhaustive?

Lorenzo
  • 11
  • 1
  • This may not be what you want, but running your project in a Docker container that you create could be a good way to ensure version and dependency control. – Matt L. May 11 '21 at 16:08
  • IIRC compiling python from source and using the `./configure --enable-optimizations` will run tests during the process, that aside, as opposed to checking for all the stdlibs (some of which you may not use), why is testing the code by writing tests only for the modules you use not an option? – python_user May 11 '21 at 16:32
  • @MattL. I really wish I had Docker available on that machine. Unfortunatly that's not an option for me – Lorenzo May 11 '21 at 17:17
  • @python_user at first glance the tests `make` runs at compile time look exactly like the ones I can run via `python3 -m test`. I'm trying to replace the current production python2 environment with the latest available, and in order for it to be future-proof I need *all* (or at least almost every) built-in modules to work. – Lorenzo May 11 '21 at 17:22
  • Such things cannot be guarranteed. Perform as many tests, as you can. Mind you, AIX is an exotic platform witb exotic features, you will experience problems if you try to compile Python3 from source. – Zsigmond Lőrinczy May 11 '21 at 20:21

0 Answers0