Skip to content

Commit

Permalink
lxa_iobus: move the project from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
The pyproject.toml format is the new and modern way to package python
projects. We still use setuptools under the hood to do the packaging,
but configure it in the pyproject.toml.

This change also moves the executable scripts from the bin folder,
where they were e.g. not caught by ruff by default,
into the python project folder itself.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
  • Loading branch information
hnez committed Mar 14, 2024
1 parent e4ed6f6 commit 552c867
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 288 deletions.
20 changes: 0 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,6 @@ server: env
--lss-address-cache-file=$(LSS_ADDRESS_CACHE_FILE) \
$(args)

# packaging environment #######################################################
$(PYTHON_PACKAGING_VENV)/.created: REQUIREMENTS.packaging.txt
rm -rf $(PYTHON_PACKAGING_VENV) && \
$(PYTHON) -m venv $(PYTHON_PACKAGING_VENV) && \
. $(PYTHON_PACKAGING_VENV)/bin/activate && \
pip install --upgrade pip && \
pip install -r REQUIREMENTS.packaging.txt
date > $(PYTHON_PACKAGING_VENV)/.created

packaging-env: $(PYTHON_PACKAGING_VENV)/.created

sdist: packaging-env
. $(PYTHON_PACKAGING_VENV)/bin/activate && \
rm -rf dist *.egg-info && \
./setup.py sdist

_release: sdist
. $(PYTHON_PACKAGING_VENV)/bin/activate && \
twine upload dist/*

# testing #####################################################################
$(PYTHON_TESTING_ENV)/.created:
rm -rf $(PYTHON_TESTING_ENV) && \
Expand Down
2 changes: 0 additions & 2 deletions REQUIREMENTS.packaging.txt

This file was deleted.

34 changes: 0 additions & 34 deletions bin/lxa-iobus-can-setup

This file was deleted.

184 changes: 0 additions & 184 deletions bin/lxa-iobus-server

This file was deleted.

2 changes: 0 additions & 2 deletions lxa_iobus/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
VERSION = (0, 4, 2)
VERSION_STRING = "{}".format(".".join([str(i) for i in VERSION]))
Empty file added lxa_iobus/cli/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions bin/lxa-iobus-lpc11xxcanisp-invoke → lxa_iobus/cli/lpc11xxcanisp_invoke.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def invoke_isp(self):
self.node.sdo.download(0x2B07, 0, struct.pack("I", 0x12345678))


def invoke_rom_loader():
def main():
can = CanOpen()
can.setup()

Expand All @@ -38,4 +38,4 @@ def invoke_rom_loader():


if __name__ == "__main__":
invoke_rom_loader()
main()
File renamed without changes.
Loading

0 comments on commit 552c867

Please sign in to comment.