fix tarfile creation

This commit is contained in:
Maximilian Hils 2015-11-29 03:38:23 +01:00
parent decdb75fba
commit 45c199a807
2 changed files with 2 additions and 41 deletions

View File

@ -12,7 +12,7 @@ import shlex
import runpy
import pprint
from zipfile import ZipFile
from tarfile import TarFile
import tarfile
import platform
import click
@ -31,8 +31,7 @@ if platform.system() == "Windows":
return a
else:
def Archive(name):
a = TarFile(name + ".tar.gz", "w:gz")
return a
return tarfile.open(name + ".tar.gz", "w:gz")
RELEASE_DIR = join(os.path.dirname(os.path.realpath(__file__)))

View File

@ -1,38 +0,0 @@
#!/bin/bash
MITMPROXY_DIR=~/mitmproxy/mitmproxy
NETLIB_DIR=~/mitmproxy/netlib
PATHOD_DIR=~/mitmproxy/pathod
DST=/tmp/mitmproxy_release
rm -rf $DST
mkdir -p $DST
cd $NETLIB_DIR
echo "Creating netlib source distribution..."
python ./setup.py -q sdist --dist-dir $DST
echo "Creating mitmproxy source distribution..."
cd $MITMPROXY_DIR
python ./setup.py -q sdist --dist-dir $DST
echo "Creating pathod source distribution..."
cd $PATHOD_DIR
python ./setup.py -q sdist --dist-dir $DST
echo "Creating virtualenv for test install..."
virtualenv -q $DST/venv
cd $DST
echo "Installing netlib..."
./venv/bin/pip -q install --download-cache ~/.pipcache ./netlib*
echo "Installing pathod..."
./venv/bin/pip -q install --download-cache ~/.pipcache ./pathod*
echo "Installing mitmproxy..."
./venv/bin/pip -q install --download-cache ~/.pipcache ./mitmproxy*
echo "Running binaries..."
./venv/bin/mitmproxy --version
./venv/bin/mitmdump --version
./venv/bin/pathod --version
./venv/bin/pathoc --version