From 585df713eaf56bcd0b907bbf517779dd213ff92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Br=C3=A4nnbacka?= Date: Thu, 30 Sep 2021 04:17:53 +0200 Subject: [PATCH] Make target for building wheel (#1031) * Add wheel make target * Folders created when making wheels will be removed by clean target * Simplifie wheel target Replacing wheel build command from: `python setup.py bdist_wheel` with: `pip wheel . --no-deps` This will have several advantages. Use pyproject for dependencies. This makes it much cleaner to build wheels. We no longer need to check for the availability of the wheel package. And the build will be out of source, and we don't need to cleanup intermediate folders. The `clean` target will now remove *.whl files in the root of the project. This is where `make wheel` will output the wheels to with the new command. --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 69cf5c34c..ea9404ad5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: coverage test test_first_fail clean autopep8 lint doc-html \ - python-version manifest lcov + python-version wheel manifest lcov # Special definition to handle Make from stripping newlines define newline @@ -113,6 +113,7 @@ ifdef COV_PROG @${COV_PROG} erase endif @${MAKE_PROG} -C contrib/opentimelineio_contrib/adapters clean VERBOSE=$(VERBOSE) + rm -vf *.whl # conform all files to pep8 -- WILL CHANGE FILES IN PLACE # autopep8: @@ -141,6 +142,10 @@ ifndef FLAKE8_PROG endif @python -m flake8 +# build python wheel package for the available python version +wheel: + @pip wheel . --no-deps + # format all .h and .cpp files using clang-format format: opentimeFiles = src/opentime/*.h src/opentime/*.cpp