Skip to content

Commit

Permalink
change version to 0.6.2, tweak build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wojdyr committed May 25, 2023
1 parent ccecb70 commit 3f7b8d7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/wheels2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v3

- name: Build wheels
uses: pypa/cibuildwheel@v2.12.2
uses: pypa/cibuildwheel@v2.12.3
env:
CIBW_BUILD: ${{ github.event.inputs.cibw_build }}
CIBW_SKIP: ${{ github.event.inputs.cibw_skip }}
Expand Down
2 changes: 1 addition & 1 deletion docs/gemmi-help.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ gemmi -h
gemmi 0.6.2-dev
gemmi 0.6.2
Command-line utility that accompanies the GEMMI library,
which is a joint project of CCP4 and Global Phasing Ltd.
Licence: Mozilla Public License 2.0. Copyright Global Phasing Ltd.
Expand Down
2 changes: 1 addition & 1 deletion include/gemmi/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
#ifndef GEMMI_VERSION_HPP_
#define GEMMI_VERSION_HPP_

#define GEMMI_VERSION "0.6.2-dev"
#define GEMMI_VERSION "0.6.2"

#endif
26 changes: 18 additions & 8 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ set -eu
cd "$(dirname "$0")"
BUILD_DIR="$(pwd)"
[ -e build ] && BUILD_DIR="$(pwd)/build"
PYTHON=`grep ^_Python_EXECUTABLE: $BUILD_DIR/CMakeCache.txt | cut -d= -f2`
if [ -z "${PYTHON-}" ]; then
PYTHON=`grep ^_Python_EXECUTABLE: $BUILD_DIR/CMakeCache.txt | cut -d= -f2`
fi

# Build all, except when we called with an option to avoid full compilation:
# G - only build the program,
Expand All @@ -27,31 +29,39 @@ if [ $# = 1 ] && [ $1 = P ]; then
(cd $BUILD_DIR && make -j4 gemmi_py)
exit
fi
if [ $# = 0 ] || [ $1 != n ]; then
if [ $# != 0 ] && [ $1 = n ]; then
shift
else
(cd $BUILD_DIR && make -j4 all check)
./tools/cmp-size.py build/gemmi build/gemmi.*.so
./tools/docs-help.sh
fi
(cd docs && make -j4 html SPHINXOPTS="-q -n")

# Run tests and checks.
export PYTHONPATH=$BUILD_DIR
export PATH="$BUILD_DIR:$PATH"
if [ $# = 0 ] || [ $1 != i ]; then
export PYTHONPATH=$BUILD_DIR
export PATH="$BUILD_DIR:$PATH"
fi
$PYTHON -m unittest discover -s tests
./tools/header-list.py >docs/headers.rst
# Where python 2 and 3 output differ, the docs have output from v3.
# So 'make doctest' works only if sphinx-build was installed for python3.
(cd docs && make doctest SPHINXOPTS="-q -n -E")

if [ -z "${NO_DOCTEST-}" ]; then
# 'make doctest' works only if sphinx-build was installed for python3.
(cd docs && make doctest SPHINXOPTS="-q -n -E")
fi

flake8 docs/ examples/ tests/ tools/ setup.py
# We want to avoid having '::' in pydoc from pybind11.
$PYTHON -m pydoc gemmi | grep :: ||:


# Usually, we stop here. Below are more extensive checks below that are run
# before making a release. They are run when this script is called with 'a'
# or with an option corresponding to the check.
[ $# = 0 ] && exit;

if [ $1 = a ]; then
if [ $1 = i ]; then
echo 'Check if gemmi package is found by setuptools pkg_resources...'
$PYTHON -c '__requires__ = ["gemmi"]; import pkg_resources'
echo 'OK'
Expand Down
7 changes: 4 additions & 3 deletions tools/release.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
- bash ./run-tests.sh a
- VERSION=$(grep -Po '\d\.\d\.\d' include/gemmi/version.hpp)

- make, test and upload source package to PyPI:
- make and test source package for PyPI:
python3 setup.py sdist
twine check dist/gemmi-$VERSION.tar.gz
python3 -m pip uninstall gemmi
python3 -m pip install dist/gemmi-$VERSION.tar.gz
python3.11 -m pip uninstall gemmi
python3.11 -m pip install dist/gemmi-$VERSION.tar.gz
PYTHON=python3.11 NO_DOCTEST=1 ./run-tests.sh n i

- git commit -a -m "change version number to $VERSION"
git push
Expand Down

0 comments on commit 3f7b8d7

Please sign in to comment.