Skip to content

Commit

Permalink
PyPi publish makefile rules fixup (#640)
Browse files Browse the repository at this point in the history
Prior Makefile rule consolidation tried to group dependencies for the
pattern rule into separate lines for readability, but apparently this
isn't allowed.

This minor changes separates those out into a variable we can reference
instead. Tested on a clean build tree locally.
  • Loading branch information
bpkroth authored Jan 19, 2024
1 parent e2a0e10 commit 342eb5b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.1
current_version = 0.3.2
commit = True
tag = True

Expand Down
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -346,27 +346,28 @@ dist-test-clean: dist-test-env-clean
publish: publish-pypi

.PHONY:
publish-pypi-deps: build/publish-pypi-deps.build-stamp
publish-pypi-deps: build/publish-pypi-deps.${CONDA_ENV_NAME}.build-stamp

build/publish-pypi-deps.${CONDA_ENV_NAME}.build-stamp: build/conda-env.${CONDA_ENV_NAME}.build-stamp
conda run -n ${CONDA_ENV_NAME} pip install -U twine
touch $@

build/publish.%.py.build-stamp: build/publish-pypi-deps.${CONDA_ENV_NAME}.build-stamp
build/publish.%.py.build-stamp: build/pytest.${CONDA_ENV_NAME}.build-stamp
build/publish.%.py.build-stamp: build/dist-test.$(PYTHON_VERSION).build-stamp
build/publish.%.py.build-stamp: build/check-doc.build-stamp
build/publish.%.py.build-stamp: build/linklint-doc.build-stamp
build/publish.%.py.build-stamp:
PUBLISH_DEPS := build/publish-pypi-deps.${CONDA_ENV_NAME}.build-stamp
PUBLISH_DEPS += build/pytest.${CONDA_ENV_NAME}.build-stamp
PUBLISH_DEPS += build/dist-test.$(PYTHON_VERSION).build-stamp
PUBLISH_DEPS += build/check-doc.build-stamp
PUBLISH_DEPS += build/linklint-doc.build-stamp

build/publish.${CONDA_ENV_NAME}.%.py.build-stamp: $(PUBLISH_DEPS)
rm -f mlos_*/dist/*.tar.gz
ls mlos_*/dist/*.tar | xargs -I% gzip -k %
repo_name=`echo "$@" | sed -e 's|build/publish\.||' -e 's|\.py\.build-stamp||'` \
repo_name=`echo "$@" | sed -r -e 's|build/publish\.[^.]+\.||' -e 's|\.py\.build-stamp||'` \
&& conda run -n ${CONDA_ENV_NAME} python3 -m twine upload --repository $$repo_name \
mlos_*/dist/mlos*-*.tar.gz mlos_*/dist/mlos*-*.whl
touch $@

publish-pypi: build/publish.pypi.py.build-stamp
publish-test-pypi: build/publish.testpypi.py.build-stamp
publish-pypi: build/publish.${CONDA_ENV_NAME}.pypi.py.build-stamp
publish-test-pypi: build/publish.${CONDA_ENV_NAME}.testpypi.py.build-stamp

build/doc-prereqs.${CONDA_ENV_NAME}.build-stamp: build/conda-env.${CONDA_ENV_NAME}.build-stamp
build/doc-prereqs.${CONDA_ENV_NAME}.build-stamp: doc/requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
author = 'GSL'

# The full version, including alpha/beta/rc tags
release = '0.3.1'
release = '0.3.2'

try:
from setuptools_scm import get_version
Expand Down
2 changes: 1 addition & 1 deletion mlos_bench/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"""

# NOTE: This should be managed by bumpversion.
_VERSION = '0.3.1'
_VERSION = '0.3.2'
2 changes: 1 addition & 1 deletion mlos_core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"""

# NOTE: This should be managed by bumpversion.
_VERSION = '0.3.1'
_VERSION = '0.3.2'

0 comments on commit 342eb5b

Please sign in to comment.