Skip to content

Commit 3f7b8d7

Browse files
committed
change version to 0.6.2, tweak build scripts
1 parent ccecb70 commit 3f7b8d7

File tree

5 files changed

+25
-14
lines changed

5 files changed

+25
-14
lines changed

.github/workflows/wheels2.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- uses: actions/checkout@v3
3131

3232
- name: Build wheels
33-
uses: pypa/[email protected].2
33+
uses: pypa/[email protected].3
3434
env:
3535
CIBW_BUILD: ${{ github.event.inputs.cibw_build }}
3636
CIBW_SKIP: ${{ github.event.inputs.cibw_skip }}

docs/gemmi-help.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$ gemmi -h
2-
gemmi 0.6.2-dev
2+
gemmi 0.6.2
33
Command-line utility that accompanies the GEMMI library,
44
which is a joint project of CCP4 and Global Phasing Ltd.
55
Licence: Mozilla Public License 2.0. Copyright Global Phasing Ltd.

include/gemmi/version.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
#ifndef GEMMI_VERSION_HPP_
66
#define GEMMI_VERSION_HPP_
77

8-
#define GEMMI_VERSION "0.6.2-dev"
8+
#define GEMMI_VERSION "0.6.2"
99

1010
#endif

run-tests.sh

+18-8
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ set -eu
1313
cd "$(dirname "$0")"
1414
BUILD_DIR="$(pwd)"
1515
[ -e build ] && BUILD_DIR="$(pwd)/build"
16-
PYTHON=`grep ^_Python_EXECUTABLE: $BUILD_DIR/CMakeCache.txt | cut -d= -f2`
16+
if [ -z "${PYTHON-}" ]; then
17+
PYTHON=`grep ^_Python_EXECUTABLE: $BUILD_DIR/CMakeCache.txt | cut -d= -f2`
18+
fi
1719

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

3741
# Run tests and checks.
38-
export PYTHONPATH=$BUILD_DIR
39-
export PATH="$BUILD_DIR:$PATH"
42+
if [ $# = 0 ] || [ $1 != i ]; then
43+
export PYTHONPATH=$BUILD_DIR
44+
export PATH="$BUILD_DIR:$PATH"
45+
fi
4046
$PYTHON -m unittest discover -s tests
4147
./tools/header-list.py >docs/headers.rst
42-
# Where python 2 and 3 output differ, the docs have output from v3.
43-
# So 'make doctest' works only if sphinx-build was installed for python3.
44-
(cd docs && make doctest SPHINXOPTS="-q -n -E")
48+
49+
if [ -z "${NO_DOCTEST-}" ]; then
50+
# 'make doctest' works only if sphinx-build was installed for python3.
51+
(cd docs && make doctest SPHINXOPTS="-q -n -E")
52+
fi
53+
4554
flake8 docs/ examples/ tests/ tools/ setup.py
4655
# We want to avoid having '::' in pydoc from pybind11.
4756
$PYTHON -m pydoc gemmi | grep :: ||:
4857

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

54-
if [ $1 = a ]; then
64+
if [ $1 = i ]; then
5565
echo 'Check if gemmi package is found by setuptools pkg_resources...'
5666
$PYTHON -c '__requires__ = ["gemmi"]; import pkg_resources'
5767
echo 'OK'

tools/release.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
- bash ./run-tests.sh a
99
- VERSION=$(grep -Po '\d\.\d\.\d' include/gemmi/version.hpp)
1010

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

1718
- git commit -a -m "change version number to $VERSION"
1819
git push

0 commit comments

Comments
 (0)