Skip to content

Commit 1135201

Browse files
authored
Add wheel build option (#133)
1 parent be2a7e6 commit 1135201

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
.PHONY: clean-pyc init help test-ci
1+
.PHONY: build clean-pyc init help test-ci
22
.DEFAULT_GOAL := help
33

44
help: ## See what commands are available.
55
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36mmake %-15s\033[0m # %s\n", $$1, $$2}'
66

77
init: clean-pyc ## Install dependencies and initialise for development.
8-
pip install --upgrade pip setuptools twine
8+
pip install --upgrade pip setuptools wheel twine
99
pip install -e '.[testing,docs]' -U
1010
nvm use
1111
npm install
@@ -44,11 +44,12 @@ clean-pyc: ## Remove Python file artifacts.
4444
find . -name '*.pyo' -exec rm -f {} +
4545
find . -name '*~' -exec rm -f {} +
4646

47-
sdist: ## Builds package version
48-
rm dist/* ; python setup.py sdist
47+
build: ## Builds package version
48+
rm dist/*
49+
python setup.py sdist bdist_wheel
4950

50-
publish: sdist ## Publishes a new version to pypi.
51+
publish: build ## Publishes a new version to pypi.
5152
twine upload dist/* && echo 'Success! Go to https://pypi.org/project/draftjs_exporter/ and check that all is well.'
5253

53-
publish-test: sdist ## Publishes a new version to test pypi.
54+
publish-test: clean-dist bdist_wheel sdist ## Publishes a new version to test pypi.
5455
twine upload --repository-url https://test.pypi.org/legacy/ dist/* && echo 'Success! Go to https://test.pypi.org/project/draftjs_exporter/ and check that all is well.'

docs/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ make dev # Restarts the example whenever a file changes.
4444
make benchmark # Runs a one-off performance (speed, memory) benchmark.
4545
make clean-pyc # Remove Python file artifacts.
4646
make sdist # Builds package version
47+
make bdist_wheel # Builds package version wheel.
4748
make publish # Publishes a new version to pypi.
4849
make publish-test # Publishes a new version to test pypi.
4950
```

0 commit comments

Comments
 (0)