-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
74 lines (61 loc) · 2.42 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
PACKAGE := juicefs
VERSION := $(shell cat juicefs/version.py | sed -n -E 's/^VERSION = "(.+?)"/\1/p')
JUICEFS_VERSION := 0.14.2
clean:
rm -rf dist build *.egg-info .pytype .pytest_cache .pytype_output
build_libjfs_so:
rm -rf build && mkdir build
cd build \
&& wget https://github.com/juicedata/juicefs/archive/refs/tags/v${JUICEFS_VERSION}.zip \
&& unzip v${JUICEFS_VERSION}.zip
cd build/juicefs-${JUICEFS_VERSION}/sdk/java/libjfs \
&& make libjfs.so \
&& cp libjfs.so ../../../../../juicefs/lib/libjfs.so
cd build/juicefs-${JUICEFS_VERSION} \
&& make juicefs \
&& cp juicefs ../../juicefs/lib/juicefs
build_libjfs_dll:
rm -rf build && mkdir build
cd build \
&& curl -L -O https://github.com/juicedata/juicefs/archive/refs/tags/v${JUICEFS_VERSION}.zip \
&& unzip v${JUICEFS_VERSION}.zip
cd build/juicefs-${JUICEFS_VERSION}/sdk/java/libjfs \
&& make libjfs.dll \
&& realpath ./ \
&& realpath ../../../../../juicefs/lib/libjfs.dll \
&& test -f libjfs.dll; echo $? \
&& cp libjfs.dll ../../../../../juicefs/lib/libjfs.dll \
&& test -f ../../../../../juicefs/lib/libjfs.dll; echo $?
cd build/juicefs-${JUICEFS_VERSION} \
&& make juicefs.exe \
&& realpath ./ \
&& realpath ../../juicefs/lib/juicefs.exe \
&& test -f juicefs.exe; echo $? \
&& cp juicefs.exe ../../juicefs/lib/juicefs.exe \
&& test -f ../../juicefs/lib/juicefs.exe; echo $?
print_libjfs_version:
echo ${JUICEFS_VERSION}
build_wheel:
python3 setup.py bdist_wheel
static_check:
pytype ${PACKAGE}
test:
pytest -s --cov=${PACKAGE} --no-cov-on-fail --cov-report=html:html_cov/ --cov-report=term-missing tests
style_check:
isort --check --diff ${PACKAGE}
black --check --diff ${PACKAGE}
format:
autoflake --remove-unused-variables --remove-all-unused-imports --ignore-init-module-imports -r -i ${PACKAGE} tests
isort ${PACKAGE} tests
black ${PACKAGE} tests
doc:
python3 setup.py build_sphinx --fresh-env --build-dir html_doc/
release:
# git tag ${VERSION}
# git push origin ${VERSION}
rm -rf build dist
python3 setup.py bdist_wheel
auditwheel repair --plat manylinux2014_x86_64 dist/${PACKAGE}-${VERSION}-py3-none-any.whl
devpi login ${PYPI_USERNAME} --password=${PYPI_PASSWORD}
devpi upload wheelhouse/${PACKAGE}-${VERSION}-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
twine upload wheelhouse/${PACKAGE}-${VERSION}-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl --username=${PYPI_USERNAME_2} --password=${PYPI_PASSWORD_2}