Skip to content

Commit

Permalink
fix: pkg: update package.
Browse files Browse the repository at this point in the history
  • Loading branch information
vaab committed Mar 19, 2015
1 parent ec74351 commit 1175540
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
19 changes: 18 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,30 @@ python:
- "3.4"
- "2.7"
install:
- python setup.py install && python setup.py develop easy_install "$(./autogen.sh --get-name)[test]"
- easy_install --version
- pip install setuptools==9.1 ## version 10 introduce a bug with d2to1
- pip install pip==1.5.6 ## some ``python setup.py`` black magic do not work with d2to1 and pip ``6.0.7``
- pip install coverage coveralls
- if [ -e requirements.txt ]; then pip install -r requirements.txt; fi
script:

## checking that we can actually install it

- python setup.py install
- python setup.py develop easy_install "$(./autogen.sh --get-name)[test]" ## getting deps
## This somehow makes the following lines fails on travis CI
#- python setup.py develop --uninstall ## removing stuff that breaks the following checks

## checking pip installability

- git fetch --unshallow ; pip install git+file://$PWD
- git reset --hard HEAD ; git clean -d -f ; python setup.py sdist --formats=gztar && pip install "dist/$(./autogen.sh --get-name)-$(./autogen.sh --get-version | tr "_" "-").tar.gz" --upgrade
- python -c "import $(./autogen.sh --get-name)"
- pip uninstall -y "$(./autogen.sh --get-name)"

## real tests

- nosetests .

after_success:
- coveralls
18 changes: 9 additions & 9 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ get_current_version() {
echo "$version"
else
version=$(echo "$version" | compat_sed "$get_short_tag")
echo "${version}.1dev_r$(dev_version_tag)"
echo "${version}.dev$(dev_version_tag)"
fi

}
Expand All @@ -111,13 +111,13 @@ prepare_files() {

for file in $FILES; do
if [ -e "$file" ]; then
compat_sed_i "s/%%version%%/$version/g;
s/%%short-version%%/${short_version}/g;
s/%%name%%/${NAME}/g;
s/%%author%%/${AUTHOR}/g;
s/%%email%%/${EMAIL}/g;
s/%%author-email%%/${AUTHOR_EMAIL}/g;
s/%%description%%/${DESCRIPTION}/g" \
compat_sed_i "s#%%version%%#$version#g;
s#%%short-version%%#${short_version}#g;
s#%%name%%#${NAME}#g;
s#%%author%%#${AUTHOR}#g;
s#%%email%%#${EMAIL}#g;
s#%%author-email%%#${AUTHOR_EMAIL}#g;
s#%%description%%#${DESCRIPTION}#g" \
"$file"
fi
done
Expand Down Expand Up @@ -217,4 +217,4 @@ fi
prepare_files
if [ "$?" != 0 ]; then
print_error "Error while updating version information."
fi
fi
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
## you can also find here: https://gist.github.com/vaab/9118087/raw
##

try:
from setuptools import setup
except ImportError:
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup
from setuptools import setup

##
## Ensure that ``./autogen.sh`` is run prior to using ``setup.py``
Expand Down

0 comments on commit 1175540

Please sign in to comment.