Skip to content

Commit

Permalink
Update to pyproject.toml build system configuration (#284)
Browse files Browse the repository at this point in the history
* Use pyproject.toml instead of setup.py in generated vlc package

* Update generated 3.0 files

* Update pyproject links

* Make a pyproject.toml file for the generator itself

(it doesn't work, as it would need TreeSitter / ..., which are installed
through a git submodule)

* Remove the make target "deb" as it used setup.py
  • Loading branch information
ewenak authored Oct 6, 2024
1 parent 3647543 commit 0f5333e
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 708 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include setup.py
include COPYING COPYING.generator MANIFEST.in README.rst TODO
include distribute_setup.py Makefile
recursive-include generator *
recursive-include tests *
recursive-include examples *
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,11 @@ installed: $(VERSIONED_NAME)
dist: $(VERSIONED_NAME)
$(GENERATE) -p $<

deb: dist
cd $(VERSIONED_PATH) ; python3 setup.py --command-packages=stdeb.command sdist_dsc --with-python3=true --copyright-file=COPYING bdist_deb

$(MODULE_NAME): generator/generate.py generator/templates/header.py generator/templates/footer.py generator/templates/override.py $(DEV_INCLUDES)
mkdir -p $(DEV_PATH)
$(GENERATE) $(DEV_INCLUDES) -o $@

$(VERSIONED_NAME): generator/generate.py generator/templates/header.py generator/templates/footer.py generator/templates/override.py $(INSTALLED_INCLUDES)
$(VERSIONED_NAME): generator/generate.py generator/templates/header.py generator/templates/footer.py generator/templates/override.py generator/templates/pyproject.toml $(INSTALLED_INCLUDES)
mkdir -p $(VERSIONED_PATH)
$(GENERATE) $(INSTALLED_INCLUDES) -o $@

Expand All @@ -72,10 +69,10 @@ test_generator: installed
test: test_bindings test_generator

sdist: $(VERSIONED_NAME)
cd $(VERSIONED_PATH); python3 setup.py bdist_wheel sdist
cd $(VERSIONED_PATH); python3 -m build

publish: $(VERSIONED_NAME)
cd $(VERSIONED_PATH); python3 setup.py bdist_wheel sdist && twine upload dist/*
cd $(VERSIONED_PATH); python3 -m build && twine upload dist/*

format:
ruff format ./generator/generate.py ./tests dev_setup.py ./generator/templates/
Expand Down
Loading

0 comments on commit 0f5333e

Please sign in to comment.