Building utils4 from a Source Distribution

As this library contains C extensions, you may need to build the code from source, to accommodate your specific architecture or OS.

Note

Windows users:

If building for Windows, you will need a C-compiler installed.

For example, the MinGW development environment is an easy to install option which provides this functionality for Windows, a link is provided below.

The good people at winlibs have put together 7-Zip and Zip archives for a number of standalone GCC and MinGW-w64 builds. Once the selected build is downloaded, refer to the Usage section for installation and usage details.

Building utils4 from source

The steps below demonstrate building utils4 from the latest source distribution.

  1. Download the source distribution from the S3DEV archive.

  2. Copy the source distribution file (utils4-latest.tar.gz) to your local PC.

  3. Navigate to the directory into which the source was just copied.

  4. Extract the source [1]:

    $ tar -zxvf utils4-latest.tar.gz
    
  5. Navigate into the extracted source directory:

    $ cd ./utils4-latest
    
  6. Unix-like - Option A: Build the distribution from source:

    $ python ./setup.py build
    
  7. Unix-like - Option B: Build a wheel from source:

    $ python ./setup.py bdist_wheel
    
  8. Unix-like - Option C: Install directly from source:

    $ pip install .
    
  9. Windows: Build the distribution from source:

    $ python setup.py build --compiler=mingw32  # <-- specify the compiler to be used
    
  10. Windows - Option A: Build a wheel from the build:

    # Reminder: The a .\build directory must exist.
    $ python setup.py bdist_wheel
    
  11. Windows - Option B: Install from the build:

    # Reminder: The a .\build directory must exist.
    $ pip install .
    
  12. Install the newly created wheel as any other:

    $ cd ./dist
    $ pip install utils4-latest-<architecture>.whl
    

Questions or Issues

If you have any issues or questions with your installation, please refer to the Troubleshooting section, or feel free to contact us.

Footnotes

Last updated: 14 Aug 2024