Skip to content

Commit

Permalink
Update Python library packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
janakj committed Jun 28, 2022
1 parent 656d4d2 commit 74b4c97
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,14 @@ install: $(BIN) $(HEX) $(ALLDEP)
$(Q)$(ECHO) "Copying $(HEX) to ./$(BASENAME).hex..."
$(Q)cp -f "$(HEX)" "$(BASENAME).hex"
.PHONY: python
python: $(ALLDEP) python/VERSION
cd python && python -m build
.PHONY: python/VERSION
python/VERSION: $(ALLDEP)
git describe --tags | sed -e 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/g' > $@
$(BIN): $(ELF) $(ALLDEP)
$(Q)$(ECHO) "Creating $(BIN) from $(ELF)..."
$(Q)$(OBJCOPY) -O binary "$(ELF)" "$(BIN)"
Expand Down Expand Up @@ -439,6 +447,7 @@ $(OBJ_DIR)/$(TYPE)/%.o: %.s $(ALLDEP)
clean: $(ALLDEP)
$(Q)$(MAKE) .clean-obj
$(Q)$(MAKE) .clean-out
$(Q)$(MAKE) .clean-python
.PHONY: .clean-obj
.clean-obj: $(ALLDEP)
Expand All @@ -450,6 +459,13 @@ clean: $(ALLDEP)
$(Q)$(ECHO) "Deleting output files..."
$(Q)rm -rf "$(OUT_DIR)"
.PHONY: .clean-python
.clean-python: $(ALLDEP)
$(Q)$(ECHO) "Deleting Python build files..."
$(Q)rm -rf "python/build"
$(Q)$(ECHO) "Deleting Python dist files..."
$(Q)rm -rf "python/dist"
################################################################################
# Debugging targets #
################################################################################
Expand Down
1 change: 1 addition & 0 deletions python/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ __pycache__
/*.egg-info
/dist
/build
/VERSION
/.mypy_cache
1 change: 1 addition & 0 deletions python/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include LICENSE
include README.md
include VERSION
include pyproject.toml
5 changes: 3 additions & 2 deletions python/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[metadata]
name = lora-modem-abz
version = 1.0.0
version = file: VERSION
description = Python library for the Murata TypeABZ LoRaWAN modem
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/hardwario/lora-modem-abz
author = Jan Janak
author_email = [email protected]
license = BSD 3-Clause License
license_file = LICENSE
license_files = [ LICENSE ]

[options]
install_requires =
Expand Down

0 comments on commit 74b4c97

Please sign in to comment.