Skip to content

Instantly share code, notes, and snippets.

@ionelmc
Last active December 26, 2015 06:39
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ionelmc/7109195 to your computer and use it in GitHub Desktop.
Save ionelmc/7109195 to your computer and use it in GitHub Desktop.
#!/bin/bash -eEx
if ! which gpg-agent; then
sudo apt-get install gnupg-agent
fi
if ! which pull-lp-source; then
sudo apt-get install ubuntu-dev-tools
fi
gpg-agent || eval `gpg-agent --daemon`
git clone https://github.com/haypo/pytracemalloc.git || (cd pytracemalloc; git fetch)
echo ==============================
echo making packages for 0.9.1
echo ==============================
(
cd pytracemalloc
git checkout -f pytracemalloc-0.9.1
)
for dist in precise trusty; do
rm -rf python*
pull-lp-source python2.7 $dist
(
cd python*
dch --force-distribution -D $dist -l"+tracemalloc0.9.1+ppa" "Apply pytracemalloc-0.9.1 patches."
patch -p1 < ../pytracemalloc/python2.7_track_free_list.patch
debuild -S -sa
)
dput -f ppa:ionel-mc/pytracemalloc *.changes
done
echo ==============================
echo making packages for 1.0
echo ==============================
(
cd pytracemalloc
git checkout -f pytracemalloc-1.2
)
for dist in precise trusty; do
rm -rf python*
pull-lp-source python2.7 $dist
(
cd python*
dch --force-distribution -D $dist -l"+tracemalloc1.0+ppa5" "Apply pytracemalloc-1.0 patches."
patch -p1 < ../pytracemalloc/patches/2.7/pep445.patch
debuild -S -sa
)
dput -f ppa:ionel-mc/pytracemalloc-1.0 *.changes
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment