-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
76 lines (59 loc) · 2.13 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
MY_CURR_DIR=$(shell pwd)
MY_PYTHON_PATH=$(shell echo ${PYTHONPATH})
all: build-source-package
build-source-package: clean generate-rst-description-file
./setup.py sdist
install-user: clean generate-rst-description-file
./setup.py install --user
install: clean generate-rst-description-file
sudo ./setup.py install
uninstall-user:
pip uninstall avroknife
uninstall:
sudo pip uninstall avroknife
## Tests run on the local file system as well as on HDFS.
## Note that in order to run them, you need to have HDFS accessible from this machine.
test:
export PYTHONPATH=$(MY_PYTHON_PATH):$(MY_CURR_DIR); export AVROKNIFE_HDFS_TESTS=TRUE; nosetests -v
## Tests run on the local file system only
test-local:
export PYTHONPATH=$(MY_PYTHON_PATH):$(MY_CURR_DIR); nosetests -v
## Check correctness of the `.travis.yml` file
check-travis:
travis-lint
check-package-metatada: generate-rst-description-file
./setup.py check --restructuredtext
html-readme:
mkdir -p tmp
pandoc -N -t html -s --no-wrap -o tmp/README.html README.markdown
clean:
rm -rf build dist avroknife.egg-info docs-api tmp
## PyPI requires the description of the package to be in the reStructuredText format.
## This is how we generate it from the Markdown README.
generate-rst-description-file:
mkdir -p tmp
pandoc --from=markdown --to=rst README.markdown -o tmp/README.rst
## Uplading to testpypi and pypi as defined below requires two profiles to be defined
## in the `~/.pypirc` file: `test` and `pypi`. On my computer this looks like this:
##
## [distutils]
## index-servers=
## pypi
## test
##
## [test]
## repository = https://testpypi.python.org/pypi
## username = XXXX
## password = XXXX
##
## [pypi]
## repository = https://pypi.python.org/pypi
## username = XXXX
## password = XXXX
## Note that in order to make the `bdisk_wheel` option work you need to have
## `wheel` Python package installed.
upload-to-testpypi-and-install: generate-rst-description-file
./setup.py sdist bdist_wheel upload -r test
pip install --user -i https://testpypi.python.org/pypi avroknife
upload-to-pypi: generate-rst-description-file
./setup.py sdist bdist_egg bdist_wheel upload -r pypi