Skip to content

Commit

Permalink
fix: pkg: autogen.sh updates.
Browse files Browse the repository at this point in the history
- use ``rev`` instead of ``dev`` as ``dev`` is considered pre-version.
- switch to ``#`` delimiter to allow usage of ``/`` in name/description...
  • Loading branch information
vaab committed May 11, 2015
1 parent 8f9f5c9 commit adb1ff3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
17 changes: 13 additions & 4 deletions .travis.yml
Expand Up @@ -7,17 +7,26 @@ install:
- 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

## checking that we can actually install it

- python setup.py install
- python setup.py develop easy_install "$(./autogen.sh --get-name)[test]" ## getting deps
- python setup.py develop --uninstall ## removing stuff that breaks the following checks
- ## checking pip installability
## 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

## real tests

- nosetests .

after_success:
- coveralls
21 changes: 13 additions & 8 deletions autogen.sh
Expand Up @@ -98,7 +98,12 @@ get_current_version() {
echo "$version"
else
version=$(echo "$version" | compat_sed "$get_short_tag")
echo "${version}.dev$(dev_version_tag)"

## Python version packaging will consider various variation as pre-version.
## and will consider .rev .p .post as post-version.
## But package will be renamed to ``-postXXXXX``, and it'll complain if not
## ``post``... so not so much choice here.
echo "${version}.post$(dev_version_tag)"
fi

}
Expand All @@ -111,13 +116,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

0 comments on commit adb1ff3

Please sign in to comment.