Skip to content

Commit

Permalink
About to release v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bjodah committed Mar 9, 2020
1 parent f95e379 commit cfc368c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v0.2.1
======
- Distribute Cython source.

v0.2
====
- Better reshaping for numpy arrays.
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
recursive-include include *.hpp *.h
recursive-include include *.hpp *.h *.pyx
include AUTHORS
include CHANGES.rst
include LICENSE
Expand Down
1 change: 1 addition & 0 deletions scripts/generate_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ sed -i "s/'sphinx.ext.viewcode',/'sphinx.ext.viewcode',\n 'sphinx.ext.autosum
sed -i "s/alabaster/sphinx_rtd_theme/g" doc/conf.py
if [[ $NARGS -eq 3 ]]; then
cat <<EOF>>doc/conf.py
context = {
'conf_py_path': '/doc/',
'github_user': '$1',
Expand Down
16 changes: 4 additions & 12 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#!/bin/bash -xeu
# Usage:
#
# $ ./scripts/release.sh v1.2.3 ~/anaconda2/bin myserver.example.com GITHUB_USER (GITHUB_REPO)
# $ ./scripts/release.sh v1.2.3 GITHUB_USER (GITHUB_REPO)
#

if [[ $1 != v* ]]; then
echo "Argument does not start with 'v'"
exit 1
fi
VERSION=${1#v}
CONDA_PATH=$2
SERVER=$3
find . -type f -iname "*.pyc" -exec rm {} +
find . -type f -iname "*.o" -exec rm {} +
find . -type f -iname "*.so" -exec rm {} +
Expand All @@ -23,13 +21,7 @@ PKG=$(find . -maxdepth 2 -name __init__.py -print0 | xargs -0 -n1 dirname | xarg
PKG_UPPER=$(echo $PKG | tr '[:lower:]' '[:upper:]')
./scripts/run_tests.sh
env ${PKG_UPPER}_RELEASE_VERSION=v$VERSION python setup.py sdist
env ${PKG_UPPER}_RELEASE_VERSION=v$VERSION ./scripts/generate_docs.sh $4 ${5:-$PKG} v$VERSION
for CONDA_PY in 2.7 3.4 3.5; do
for CONDA_NPY in 1.11; do
continue # we build the conda recipe on another host for now..
PATH=$CONDA_PATH:$PATH ./scripts/build_conda_recipe.sh v$VERSION --python $CONDA_PY --numpy $CONDA_NPY
done
done
env ${PKG_UPPER}_RELEASE_VERSION=v$VERSION ./scripts/generate_docs.sh $2 ${3:-$PKG} v$VERSION

# All went well, add a tag and push it.
git tag -a v$VERSION -m v$VERSION
Expand All @@ -40,10 +32,10 @@ twine upload dist/${PKG}-$VERSION.tar.gz
set +x
echo ""
echo " You may now create a new github release at with the tag \"v$VERSION\", here is a link:"
echo " https://github.com/$4/${5:-$PKG}/releases/new "
echo " https://github.com/$2/${3:-$PKG}/releases/new "
echo " name the release \"${PKG}-${VERSION}\", and don't foreget to manually attach the file:"
echo " $(openssl sha256 $(pwd)/dist/${PKG}-${VERSION}.tar.gz)"
echo " Then run:"
echo ""
echo " $ ./scripts/post_release.sh $1 $SERVER $4"
echo " $ ./scripts/post_release.sh $1 myserver.university.edu $2"
echo ""
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def build_extensions(self):
# depending on tagged version (set BATEMANEQ_RELEASE_VERSION)
# this will ensure source distributions contain the correct version
shutil.move(release_py_path, release_py_path+'__temp__')
io.open(release_py_path, 'wt', encoding='utf-8').write(
open(release_py_path, 'wt').write(
"__version__ = '{}'\n".format(__version__))
setup(**setup_kwargs)
finally:
Expand Down

0 comments on commit cfc368c

Please sign in to comment.