tce-load -w -i squashfs-tools python3.6 expat2 libffi DESTDIR='/tmp/package' # Create package directory mkdir /tmp/source_package mkdir -p $DESTDIR/usr/local/lib/python3.6/site-packages/ . /etc/init.d/tc-functions PKGDIR=/tmp/`getMajorVer`.x/`getBuild` mkdir -p $PKGDIR/tar.gz $PKGDIR/tcz # Download package cd /tmp/source_package wget https://github.com/boto/boto3/archive/1.14.59.tar.gz # Create python3.6-boto3.tcz tar xzvf 1.14.59.tar.gz cd boto3-1.14.59/ python3 setup.py bdist_egg mkdir -p $DESTDIR/usr/local/lib/python3.6/site-packages/ mkdir -p $DESTDIR/usr/local/lib/python3.6/site-packages/boto3-1.14.59-py3.6.egg/ cp -r build/lib/boto3/ $DESTDIR/usr/local/lib/python3.6/site-packages/boto3-1.14.59-py3.6.egg/ cd $DESTDIR/usr/local/lib/python3.6/site-packages/ ln -s boto3-1.14.59-py3.6.egg/boto3/ . cd /tmp/source_package/boto3-1.14.59/ mkdir -p $DESTDIR/usr/local/lib/python3.6/site-packages/boto3-1.14.59-py3.6.egg/EGG-INFO cp boto3.egg-info/* $DESTDIR/usr/local/lib/python3.6/site-packages/boto3-1.14.59-py3.6.egg/EGG-INFO cd $DESTDIR tar -czf $PKGDIR/tar.gz/python3.6-boto3.tcz.tar.gz * mksquashfs $DESTDIR $PKGDIR/tcz/python3.6-boto3.tcz -all-root -info find $DESTDIR -not -type d | sed -e "s#^${DESTDIR}##" > $PKGDIR/tcz/python3.6-boto3.tcz.list cd $PKGDIR/tcz md5sum python3.6-boto3.tcz > python3.6-boto3.tcz.md5.txt echo -e "python3.6.tcz\npython3.6-botocore.tcz\npython3.6-jmespath.tcz\npython3.6-s3transfer.tcz" > python3.6-boto3.tcz.dep # Clean-up cd /tmp rm -rf $DESTDIR rm -rf /tmp/source_package/