Skip to content

Commit

Permalink
Make target for building wheel (#1031)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
smaragden committed Sep 30, 2021
1 parent b4b36a1 commit 585df71
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 585df71

Please sign in to comment.