forked from eriknw/cytoolz
-
Notifications
You must be signed in to change notification settings - Fork 72
/
Makefile
34 lines (29 loc) · 1.12 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
SHELL= /bin/bash
PYTHON ?= python
inplace:
$(PYTHON) setup.py build_ext --inplace --cython
test: inplace
pytest -s --doctest-modules cytoolz/
echo 'cimport cytoolz ; from cytoolz.functoolz cimport memoize' > try_cimport_cytoolz.pyx
cythonize -i try_cimport_cytoolz.pyx
python -c 'import try_cimport_cytoolz'
rm try_cimport_cytoolz.*
clean:
rm -f cytoolz/*.c cytoolz/*.so cytoolz/*/*.c cytoolz/*/*.so
rm -rf build/ __pycache__/ cytoolz/__pycache__/ cytoolz/*/__pycache__/
curried:
sed -e 's/toolz/cytoolz/g' -e 's/itercytoolz/itertoolz/' \
-e 's/dictcytoolz/dicttoolz/g' -e 's/funccytoolz/functoolz/g' \
../toolz/toolz/curried/__init__.py > cytoolz/curried/__init__.py
copytests:
for f in ../toolz/toolz/tests/test*py; \
do \
if [[ $$f == *test_utils* ]]; then continue ; fi; \
if [[ $$f == *test_curried_doctests* ]]; then continue ; fi; \
if [[ $$f == *test_tlz* ]]; then continue ; fi; \
newf=`echo $$f | sed 's/...toolz.toolz/cytoolz/g'`; \
sed -e 's/toolz/cytoolz/g' -e 's/itercytoolz/itertoolz/' \
-e 's/dictcytoolz/dicttoolz/g' -e 's/funccytoolz/functoolz/g' \
$$f > $$newf; \
echo $$f $$newf; \
done