Packaging pyceda for Ubuntu 16.04 using distutils

Prepare pyceda package

Run the cedapackage script to package the ceda core libraries. These are created under ~/developer/ceda/lib/Linuxx64/Release

  (root)
    └── lib
        └── Linuxx64
            └── Release
                ├── libcxBuild.so
                ├── libcxCedaScript.so
                ├── libcxLss.so
                ├── libcxMacroExpander.so
                ├── libcxMessage.so
                ├── libcxObject.so
                ├── libcxOperation.so
                ├── libcxPersistStore.so
                ├── libcxPython.so
                ├── libcxRmi.so
                ├── libcxSocket.so
                ├── libcxThread.so
                ├── libcxUtils.so
                └── libcxWorkingSetIpc.so

Run the following command to copy the pyceda_package from ~/developer/_root_/Ceda/Core/Python/pyceda_package to ~/developer/pyceda_package


cp -r ~/developer/_root_/Ceda/Core/Python/pyceda_package ~/developer

Run the following command in order to copy the shared library files from ~/developer/ceda/lib/Linuxx64/Release to ~/developer/pyceda_package/pyceda/lib/linux:


cp ~/developer/ceda/lib/Linuxx64/Release/*.so ~/developer/pyceda_package/pyceda/lib/linux

Check pyceda package

Check the folder structure with the following command:


tree pyceda_package/

The following structure should be shown:

pyceda_package
    ├── pyceda
    │   ├── __init__.py
    │   ├── lib
    │   │   ├── linux
    │   │   │   ├── libcxBuild.so
    │   │   │   ├── libcxCedaScript.so
    │   │   │   ├── libcxLss.so
    │   │   │   ├── libcxMacroExpander.so
    │   │   │   ├── libcxMessage.so
    │   │   │   ├── libcxObject.so
    │   │   │   ├── libcxOperation.so
    │   │   │   ├── libcxPersistStore.so
    │   │   │   ├── libcxPython.so
    │   │   │   ├── libcxRmi.so
    │   │   │   ├── libcxSocket.so
    │   │   │   ├── libcxThread.so
    │   │   │   ├── libcxUtils.so
    │   │   │   └── libcxWorkingSetIpc.so
    │   │   ├── macOS
    │   │   └── windows
    │   ├── namespace.py
    │   ├── pstore.py
    │   └── utils.py
    └── setup.py

Generate tarball using distutils

Run the commands:


cd ~/developer/pyceda_package
python setup.py sdist

This generates the following output:

running sdist
running check
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)

warning: sdist: standard file not found: should have one of README, README.txt

writing manifest file 'MANIFEST'
creating pyceda-0.1
creating pyceda-0.1/pyceda
creating pyceda-0.1/pyceda/lib
creating pyceda-0.1/pyceda/lib/linux
making hard links in pyceda-0.1...
hard linking setup.py -> pyceda-0.1
hard linking pyceda/__init__.py -> pyceda-0.1/pyceda
hard linking pyceda/namespace.py -> pyceda-0.1/pyceda
hard linking pyceda/pstore.py -> pyceda-0.1/pyceda
hard linking pyceda/utils.py -> pyceda-0.1/pyceda
hard linking pyceda/lib/linux/libcxBuild.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxCedaScript.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxLss.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxMacroExpander.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxMessage.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxObject.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxOperation.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxPersistStore.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxPython.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxRmi.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxSocket.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxThread.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxUtils.so -> pyceda-0.1/pyceda/lib/linux
hard linking pyceda/lib/linux/libcxWorkingSetIpc.so -> pyceda-0.1/pyceda/lib/linux
creating dist
Creating tar archive
removing 'pyceda-0.1' (and everything under it)

and results in the following tree structure:

pyceda_package
    ├── dist
    │   └── pyceda-0.1.tar.gz
    └── MANIFEST

Distribute the tarball to users

The file pyceda-0.1.tar.gz represents the pyceda python package which can be uploaded to the cedanet website in order to be installed by users