Skip to content

Commit

Permalink
add makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen L. <lrq3000@gmail.com>
  • Loading branch information
lrq3000 committed Aug 7, 2017
1 parent 9424af7 commit d738ab2
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# IMPORTANT: for compatibility with `python setup.py make [alias]`, ensure:
# 1. Every alias is preceded by @[+]make (eg: @make alias)
# 2. A maximum of one @make alias or command per line
#
# Sample makefile compatible with `python setup.py make`:
#```
#all:
# @make test
# @make install
#test:
# nosetest
#install:
# python setup.py install
#```


help:
@python setup.py make

distclean:
@+make coverclean
@+make prebuildclean
@+make clean
prebuildclean:
@+python -c "import shutil; shutil.rmtree('build', True)"
@+python -c "import shutil; shutil.rmtree('dist', True)"
@+python -c "import shutil; shutil.rmtree('fdict.egg-info', True)"
coverclean:
@+python -c "import os; os.remove('.coverage') if os.path.exists('.coverage') else None"
clean:
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('*.py[co]')]"
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('fdict/*.py[co]')]"
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('fdict/tests/*.py[co]')]"
@+python -c "import os; import glob; [os.remove(i) for i in glob.glob('fdict/examples/*.py[co]')]"

installdev:
python setup.py develop --uninstall
python setup.py develop

install:
python setup.py install

build:
@make prebuildclean
python setup.py sdist --formats=gztar,zip bdist_wheel
python setup.py bdist_wininst

pypimeta:
python setup.py register

pypi:
twine upload dist/*

buildupload:
@make testsetup
@make build
@make pypimeta
@make pypi

none:
# used for unit testing

0 comments on commit d738ab2

Please sign in to comment.