lpschedule-generator

libreplanet schedule generator - ricketyspace.net/lpschedule-generator
git clone git://git.ricketyspace.net/lpschedule-generator.git
Log | Files | Refs

Makefile (1438B)


      1 # -*- coding: utf-8 -*-
      2 #
      3 #   SPDX-License-Identifier: CC0-1.0
      4 #
      5 #   This file is part of lpschedule-generator.
      6 #
      7 
      8 GNU_MAKE=gmake
      9 
     10 VENV_DIR='.venv'
     11 VENV_CMD=virtualenv
     12 VENV_PREFIX=.
     13 VENV_DIR=${VENV_PREFIX}/.lpschedule-generator
     14 
     15 test:
     16 	@nosetests
     17 
     18 .PHONY: test
     19 
     20 build-dist:
     21 	@python setup.py sdist bdist_wheel
     22 
     23 egg:
     24 	@python setup.py egg_info
     25 
     26 upload:
     27 	@twine upload -r pypi -s --sign-with 'gpg2' \
     28 		-i '1534 126D 8C8E AD29 EDD9  1396 6BE9 3D8B F866 4377' \
     29 		dist/*.tar.gz
     30 	@twine upload -r pypi -s --sign-with 'gpg2' \
     31 		-i '1534 126D 8C8E AD29 EDD9  1396 6BE9 3D8B F866 4377' \
     32 		dist/*.whl
     33 
     34 .PHONY: build-dist egg upload
     35 
     36 docs:
     37 	${GNU_MAKE} -C docs html
     38 
     39 upload-docs: docs
     40 	@rsync -avz --delete docs/_build/html/  $(LPSG_DOCS_HOST)
     41 
     42 .PHONY: docs upload-docs
     43 
     44 
     45 venv:
     46 	rm -rf *.egg-info
     47 	${SHELL} -c 'if [[ -d $(VENV_DIR) ]] then mv $(VENV_DIR) $(VENV_DIR).`date +%s`; fi'
     48 	${VENV_CMD} --clear --python=python3 $(VENV_DIR)
     49 	@echo 'Initialized virtualenv, run' \
     50 		'source '$(VENV_DIR)'/bin/activate' \
     51 		'to activate the virtual environment'
     52 .PHONY: venv
     53 
     54 clean: clean-build clean-pyc clean-docs
     55 .PHONY: clean
     56 
     57 clean-build:
     58 	rm -rf build/
     59 	rm -rf dist/
     60 	rm -rf *.egg-info
     61 
     62 clean-pyc:
     63 	find . -name '*.pyc' -exec rm -f {} +
     64 
     65 clean-venv:
     66 	rm -rf ${VENV_DIR}*/
     67 
     68 clean-docs:
     69 	${GNU_MAKE} -C docs clean
     70 
     71 .PHONY: clean-build clean-pyc clean-venv clean-docs
     72 
     73 dev-env:
     74 	pip install -r requirements.txt
     75 	python setup.py develop
     76 .PHONY: dev-env