blob: 9b6d33b9acc090a41b9af795cedc5310a400ec44 [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +00001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
Roger Meier81a1f992014-10-22 14:09:43 +020019AUTOMAKE_OPTIONS = serial-tests
Aditya Agarwal99e2c072007-07-31 01:36:08 +000020DESTDIR ?= /
Mark Slee5299a952007-10-05 00:13:24 +000021
Nobuaki Sukegawaa185d7e2015-11-06 21:24:24 +090022if WITH_PY3
23py3-build:
24 $(PYTHON3) setup.py build
Nobuaki Sukegawa7f404fd2015-11-14 17:05:42 +090025py3-test: py3-build
Nobuaki Sukegawaad835862015-12-23 23:32:09 +090026 $(PYTHON3) test/thrift_json.py
Zezeng Wang39381692020-04-28 14:24:58 +080027 $(PYTHON3) test/thrift_transport.py
Nobuaki Sukegawaad835862015-12-23 23:32:09 +090028 $(PYTHON3) test/test_sslsocket.py
Zezeng Wangc3728122020-04-27 15:48:19 +080029 $(PYTHON3) test/thrift_TBinaryProtocol.py
zeshuai007bbc5e062020-05-07 17:10:32 +080030 $(PYTHON3) test/thrift_TZlibTransport.py
zeshuai00726e6c842020-05-06 14:37:43 +080031 $(PYTHON3) test/thrift_TCompactProtocol.py
zeshuai007797fe252020-05-20 15:20:07 +080032 $(PYTHON3) test/thrift_TNonblockingServer.py
Ali-Akber Saifeeb7247872021-12-11 08:39:24 -080033 $(PYTHON3) test/thrift_TSerializer.py
Nobuaki Sukegawaa185d7e2015-11-06 21:24:24 +090034else
35py3-build:
Nobuaki Sukegawa7f404fd2015-11-14 17:05:42 +090036py3-test:
Nobuaki Sukegawaa185d7e2015-11-06 21:24:24 +090037endif
38
Nobuaki Sukegawa7f404fd2015-11-14 17:05:42 +090039all-local: py3-build
Jens Geyer79f988c2014-10-03 20:42:54 +020040 $(PYTHON) setup.py build
zeshuai007797fe252020-05-20 15:20:07 +080041 ${THRIFT} --gen py test/test_thrift_file/TestServer.thrift
Aditya Agarwal99e2c072007-07-31 01:36:08 +000042
David Reissaea19c92007-08-29 23:17:32 +000043# We're ignoring prefix here because site-packages seems to be
44# the equivalent of /usr/local/lib in Python land.
45# Old version (can't put inline because it's not portable).
46#$(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) $(PYTHON_SETUPUTIL_ARGS)
Marc Slemkod95abdd2007-01-16 22:20:19 +000047install-exec-hook:
Jens Geyer79f988c2014-10-03 20:42:54 +020048 $(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(PY_PREFIX) $(PYTHON_SETUPUTIL_ARGS)
David Reissb72d19f2007-09-18 19:46:00 +000049
Nobuaki Sukegawa7f404fd2015-11-14 17:05:42 +090050check-local: all py3-test
Nobuaki Sukegawaad835862015-12-23 23:32:09 +090051 $(PYTHON) test/thrift_json.py
Zezeng Wang39381692020-04-28 14:24:58 +080052 $(PYTHON) test/thrift_transport.py
Nobuaki Sukegawaad835862015-12-23 23:32:09 +090053 $(PYTHON) test/test_sslsocket.py
Neil Williams01d53f42020-07-07 07:27:29 -070054 $(PYTHON) test/test_socket.py
Zezeng Wangc3728122020-04-27 15:48:19 +080055 $(PYTHON) test/thrift_TBinaryProtocol.py
zeshuai007bbc5e062020-05-07 17:10:32 +080056 $(PYTHON) test/thrift_TZlibTransport.py
zeshuai00726e6c842020-05-06 14:37:43 +080057 $(PYTHON) test/thrift_TCompactProtocol.py
zeshuai007797fe252020-05-20 15:20:07 +080058 $(PYTHON) test/thrift_TNonblockingServer.py
Ali-Akber Saifeeb7247872021-12-11 08:39:24 -080059 $(PYTHON) test/thrift_TSerializer.py
zeshuai00726e6c842020-05-06 14:37:43 +080060
jfarrell8fd8c632014-07-10 09:14:51 -040061
James E. King IIIb96c4382019-01-24 17:45:07 -050062clean-local:
63 $(RM) -r build
zeshuai007797fe252020-05-20 15:20:07 +080064 $(RM) -r gen-py
James E. King IIIb96c4382019-01-24 17:45:07 -050065 find . -type f \( -iname "*.pyc" \) | xargs rm -f
66 find . -type d \( -iname "__pycache__" -or -iname "_trial_temp" \) | xargs rm -rf
67
68dist-hook:
69 find $(distdir) -type f \( -iname "*.pyc" \) | xargs rm -f
70 find $(distdir) -type d \( -iname "__pycache__" -or -iname "_trial_temp" \) | xargs rm -rf
71
jfarrell8fd8c632014-07-10 09:14:51 -040072EXTRA_DIST = \
jfarrellf13e4312015-08-25 00:39:29 -040073 CMakeLists.txt \
Jens Geyerf3a29742017-11-30 22:30:03 +010074 MANIFEST.in \
jfarrellf13e4312015-08-25 00:39:29 -040075 coding_standards.md \
Jens Geyer79f988c2014-10-03 20:42:54 +020076 compat \
77 setup.py \
78 setup.cfg \
79 src \
Nobuaki Sukegawae134cbc2016-03-18 15:13:36 +090080 test \
Jens Geyer79f988c2014-10-03 20:42:54 +020081 README.md