-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mauko Quiroga
committed
Oct 1, 2021
1 parent
a957555
commit 95d696b
Showing
3 changed files
with
46 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,30 @@ | ||
## Install openfisca-core for deployment and publishing. | ||
## Install building utils. | ||
install-builder: | ||
@$(call print_help,$@:) | ||
@pip install --upgrade pip setuptools wheel | ||
|
||
## Install publishing tools. | ||
install-publisher: | ||
@$(call print_help,$@:) | ||
@pip install --upgrade twine | ||
|
||
## Install build dependencies. | ||
install-deps: | ||
@## Create a requirements file & install openfisca's dependencies. | ||
@$(call print_help,$@:) | ||
python setup.py egg_info | ||
pip install `grep -v "^\[" *.egg-info/requires.txt` | ||
@$(call print_pass,$@:) | ||
|
||
## Build & install openfisca-core for deployment and publishing. | ||
build: | ||
@## This allows us to be sure tests are run against the packaged version | ||
@## of openfisca-core, the same we put in the hands of users and reusers. | ||
@$(call print_help,$@:) | ||
@python setup.py bdist_wheel | ||
@find dist -name "*.whl" -exec pip install --force-reinstall {}[dev] \; | ||
|
||
## Run openfisca-core tests againts the built version. | ||
test-built: | ||
@$(call print_help,$@:) | ||
@PYTEST_ADDOPTS="${PYTEST_ADDOPTS} --cov=openfisca_core --cov=openfisca_web_api ${pytest_args}" \ | ||
openfisca test $(shell find tests -name "*.py") \ | ||
${openfisca_args} | ||
@find dist -name "*.whl" -exec pip install --force-reinstall --no-dependencies {} \; | ||
@$(call print_pass,$@:) | ||
|
||
## Upload openfisca-core package to PyPi. | ||
publish: | ||
@twine upload dist/* --username $${PYPI_USERNAME} --password $${PYPI_PASSWORD} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters