Skip to content

Commit daf842f

Browse files
authored
Merge pull request #53 from sunsingerus/master
module executable
2 parents 89ae6ec + 14b7d14 commit daf842f

6 files changed

+29
-6
lines changed

examples/run_airline_ontime_data_mysql_to_ch_reader.sh renamed to examples/airline_ontime_data_mysql_to_ch_reader.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,24 @@
22
# read airline.ontime test dataset from MySQL and write it to CH
33

44
# ugly stub to suppress unsufficient sockets
5-
sudo bash -c "echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse"
5+
#sudo bash -c "echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse"
66

77
# run data reader with specified Python version
88

9-
PYTHON=python3.6
10-
PYTHON=/home/user/pypy3.5-5.9-beta-linux_x86_64-portable/bin/pypy
9+
PYTHON=""
10+
PYTHON="/home/user/pypy3.5-5.9-beta-linux_x86_64-portable/bin/pypy"
11+
PYTHON="python3.6"
12+
PYTHON="python3"
1113

12-
$PYTHON ../clickhouse-mysql ${*:1} \
14+
CH_MYSQL="/usr/bin/clickhouse-mysql"
15+
CH_MYSQL="-m clickhouse_mysql.main"
16+
17+
if [ ! -d "clickhouse_mysql" ]; then
18+
# no clickhouse_mysql dir available - step out of examples dir
19+
cd ..
20+
fi
21+
22+
$PYTHON $CH_MYSQL ${*:1} \
1323
--src-resume \
1424
--src-wait \
1525
--nice-pause=1 \

examples/run_datatypes.sh renamed to examples/datatypes.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
sudo bash -c "echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse"
44

5-
python3 ../clickhouse-mysql ${*:1} \
5+
PYTHON=""
6+
PYTHON="python3.6"
7+
PYTHON="python3"
8+
PYTHON="/home/user/pypy3.5-5.9-beta-linux_x86_64-portable/bin/pypy"
9+
10+
CH_MYSQL="/usr/bin/clickhouse-mysql"
11+
CH_MYSQL="-m clickhouse_mysql.main"
12+
13+
$PYTHON $CH_MYSQL ${*:1} \
614
--src-resume \
715
--src-wait \
816
--src-host=127.0.0.1 \

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@
4646
keywords='clickhouse mysql data migration',
4747

4848
# list of packages to be included into project
49-
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
49+
packages=find_packages(exclude=[
50+
'contrib',
51+
'docs',
52+
'tests',
53+
]),
5054

5155
# run-time dependencies
5256
# these will be installed by pip
@@ -60,6 +64,7 @@
6064
# cross-platform support for pip to create the appropriate form of executable
6165
entry_points={
6266
'console_scripts': [
67+
# executable name=what to call
6368
'clickhouse-mysql=clickhouse_mysql:main',
6469
],
6570
},

0 commit comments

Comments
 (0)