Skip to content

Commit

Permalink
make: Revert to wheel file name with underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
blockstreamsatellite committed Jul 18, 2024
1 parent a613479 commit 9359333
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ PY_FILES = $(shell find . -type f -name '*.py')
VERSION = $(shell grep "__version__ =" blocksatcli/main.py | cut -d '"' -f2)
SDIST = dist/blocksat-cli-$(VERSION).tar.gz
SDIST_UNDERSCORE = dist/blocksat_cli-$(VERSION).tar.gz
WHEEL = dist/blocksat-cli-$(VERSION)-py3-none-any.whl
WHEEL_UNDERSCORE = dist/blocksat_cli-$(VERSION)-py3-none-any.whl
WHEEL = dist/blocksat_cli-$(VERSION)-py3-none-any.whl
DISTRO = ubuntu:jammy
DISTRO_ALT = $(subst :,-,$(DISTRO))
PLATFORM = linux/amd64,linux/arm64
Expand All @@ -30,15 +29,14 @@ $(SDIST): $(PY_FILES)
python3 setup.py sdist
mv $(SDIST_UNDERSCORE) $(SDIST) || true

# NOTE: depending on the setuptools version, the generated sdist and wheel file
# names may have an underscore instead of a dash. Rename them to the expected
# names with a dash.
# NOTE: depending on the setuptools version, the generated sdist file name may
# have blocksat_cli (with an underscore) instead of blocksat-cli (with a
# hyphen). Rename it to blocksat-cli for consistency.

sdist: $(SDIST)

$(WHEEL): $(PY_FILES)
python3 setup.py bdist_wheel
mv $(WHEEL_UNDERSCORE) $(WHEEL) || true

wheel: $(WHEEL)

Expand All @@ -58,12 +56,12 @@ $(COMPLETION): $(PY_FILES)
pypi: clean sdist wheel
python3 -m twine upload --repository pypi \
dist/blocksat-cli-$(VERSION).tar.gz \
dist/blocksat-cli-$(VERSION)-*.whl
dist/blocksat_cli-$(VERSION)-*.whl

testpypi: clean sdist wheel
python3 -m twine upload --repository testpypi \
dist/blocksat-cli-$(VERSION).tar.gz \
dist/blocksat-cli-$(VERSION)-*.whl
dist/blocksat_cli-$(VERSION)-*.whl

docker: $(SDIST) $(MANPAGE) $(COMPLETION)
docker build --build-arg distro=$(DISTRO) \
Expand Down

0 comments on commit 9359333

Please sign in to comment.