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