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/s3transfer/archive/0.3.3.tar.gz # Create python3.6-s3transfer.tcz tar xzvf 0.3.3.tar.gz cd s3transfer-0.3.3/ 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/s3transfer-0.3.3-py3.6.egg/ cp -r build/lib/s3transfer/ $DESTDIR/usr/local/lib/python3.6/site-packages/s3transfer-0.3.3-py3.6.egg/ cd $DESTDIR/usr/local/lib/python3.6/site-packages/ ln -s s3transfer-0.3.3-py3.6.egg/s3transfer/ . cd /tmp/source_package/s3transfer-0.3.3/ mkdir -p $DESTDIR/usr/local/lib/python3.6/site-packages/s3transfer-0.3.3-py3.6.egg/EGG-INFO cp s3transfer.egg-info/* $DESTDIR/usr/local/lib/python3.6/site-packages/s3transfer-0.3.3-py3.6.egg/EGG-INFO cd $DESTDIR tar -czf $PKGDIR/tar.gz/python3.6-s3transfer.tcz.tar.gz * mksquashfs $DESTDIR $PKGDIR/tcz/python3.6-s3transfer.tcz -all-root -info find $DESTDIR -not -type d | sed -e "s#^${DESTDIR}##" > $PKGDIR/tcz/python3.6-s3transfer.tcz.list cd $PKGDIR/tcz md5sum python3.6-s3transfer.tcz > python3.6-s3transfer.tcz.md5.txt echo -e "python3.6.tcz\npython3.6-botocore.tcz" > python3.6-s3transfer.tcz.dep # Clean-up cd /tmp rm -rf $DESTDIR rm -rf /tmp/source_package/