File tree Expand file tree Collapse file tree 13 files changed +120
-114
lines changed Expand file tree Collapse file tree 13 files changed +120
-114
lines changed Original file line number Diff line number Diff line change @@ -41,26 +41,29 @@ jobs:
41
41
run : |
42
42
python setup.py bdist_wheel
43
43
44
+ - name : Build source package on Windows
45
+ if : runner.os == 'Windows' && matrix.python-version == '3.7'
46
+ run : |
47
+ python setup.py sdist
48
+
44
49
- name : Build manylinux wheel
45
50
if : runner.os == 'Linux' && matrix.python-version == '3.7'
46
51
uses :
RalfG/[email protected] _x86_64
52
+ env :
53
+ GITHUB_BUILD_ACTION : True
47
54
with :
48
- python-versions : ' cp37-cp37m cp38-cp38m cp39-cp39m '
55
+ python-versions : ' cp37-cp37m cp38-cp38 cp39-cp39 '
49
56
build-requirements : ' numpy'
50
- pip-wheel-args : ' -w ./wheelhouse ' # save wheel packages to wheelhouse folder
57
+ system-packages : ' libffi-devel '
51
58
pre-build-command : ' export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH'
59
+ pip-wheel-args : ' -w ./wheelhouse' # save wheel packages to wheelhouse folder
52
60
53
61
- name : Move valid packages to dist folder for manylinux
54
62
if : runner.os == 'Linux' && matrix.python-version == '3.7'
55
63
run : |
56
64
mkdir -p dist
57
65
cp wheelhouse/pymaro-*-manylinux*.whl dist
58
66
59
- - name : Build source package on linux
60
- if : runner.os == 'Linux' && matrix.python-version == '3.7'
61
- run : |
62
- python setup.py sdist
63
-
64
67
- name : Upload linux wheel to artifact
65
68
uses : actions/upload-artifact@v2
66
69
with :
Original file line number Diff line number Diff line change 1
- @ ECHO OFF
2
-
3
- rem script to build maro locally on Windows, usually for development
4
-
5
- chdir " %~dp0 .."
6
-
7
- rem compile cython files
8
- call scripts\compile_cython.bat
9
-
10
- python setup.py build_ext -i
1
+ @ ECHO OFF
2
+
3
+ rem script to build maro locally on Windows, usually for development
4
+
5
+ chdir " %~dp0 .."
6
+
7
+ rem compile cython files
8
+ call scripts\compile_cython.bat
9
+
10
+ python setup.py build_ext -i
Original file line number Diff line number Diff line change 10
10
# compile cython files first
11
11
bash ./scripts/compile_cython.sh
12
12
13
- python setup.py build_ext -i
13
+ python setup.py build_ext -i
Original file line number Diff line number Diff line change 1
- chdir " %~dp0 .."
2
-
3
- python setup.py sdist
1
+ chdir " %~dp0 .."
2
+
3
+ python setup.py sdist
Original file line number Diff line number Diff line change 10
10
11
11
bash ./scripts/compile_cython.sh
12
12
13
- python setup.py sdist
13
+ python setup.py sdist
Original file line number Diff line number Diff line change 1
-
2
- rem script to build wheel package on Windows
3
- rem NOTE: Before building the wheels, please make sure you have setup-up the environment.
4
- rem for python 3.6/3.7 we need vs++14
5
-
6
- chdir " %~dp0 .."
7
-
8
- call scripts\compile_cython.bat
9
-
10
- pip install -r maro/requirements.build.txt
11
- pip install wheel
12
- pip install --upgrade setuptools
13
-
14
- python setup.py bdist_wheel
1
+
2
+ rem script to build wheel package on Windows
3
+ rem NOTE: Before building the wheels, please make sure you have setup-up the environment.
4
+ rem for python 3.6/3.7 we need vs++14
5
+
6
+ chdir " %~dp0 .."
7
+
8
+ call scripts\compile_cython.bat
9
+
10
+ pip install -r maro/requirements.build.txt
11
+ pip install wheel
12
+ pip install --upgrade setuptools
13
+
14
+ python setup.py bdist_wheel
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ set -e -x
8
8
cd /maro
9
9
10
10
# Compile wheels
11
- for PYVER in 6 7 ; do
11
+ for PYVER in 7 8 9 ; do
12
12
PYBIN=" /opt/python/cp3${PYVER} -cp3${PYVER} m/bin"
13
13
14
14
" ${PYBIN} /pip" install -r maro/requirements.build.txt
Original file line number Diff line number Diff line change 1
- @ ECHO OFF
2
-
3
- rem Script to install MARO in editable mode on Windows,
4
- rem usually for development.
5
-
6
- chdir " %~dp0 .."
7
-
8
- rem Install dependencies.
9
- pip install -r .\maro\requirements.build.txt
10
-
11
- rem Compile cython files.
12
- call .\scripts\compile_cython.bat
13
-
14
- call .\scripts\install_torch.bat
15
-
16
- rem Install MARO in editable mode.
17
- pip install -e .
1
+ @ ECHO OFF
2
+
3
+ rem Script to install MARO in editable mode on Windows,
4
+ rem usually for development.
5
+
6
+ chdir " %~dp0 .."
7
+
8
+ rem Install dependencies.
9
+ pip install -r .\maro\requirements.build.txt
10
+
11
+ rem Compile cython files.
12
+ call .\scripts\compile_cython.bat
13
+
14
+ call .\scripts\install_torch.bat
15
+
16
+ rem Install MARO in editable mode.
17
+ pip install -e .
Original file line number Diff line number Diff line change 1
- pip install torch== =1.6.0 torchvision== =0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
1
+ pip install torch== =1.6.0 torchvision== =0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
Original file line number Diff line number Diff line change 1
- rem script to run all the test script under tests folder which the file name match test_xxxx.py
2
-
3
- chdir " %~dp0 .."
4
-
5
- set " PYTHONPAH = ."
6
-
7
- call scripts/build_maro.bat
8
-
9
- rem install requirements
10
-
11
- pip install -r ./tests/requirements.test.txt
12
-
13
- rem show coverage
14
-
15
- coverage run --rcfile=./tests/.coveragerc
16
-
17
- coverage report --rcfile=./tests/.coveragerc
1
+ rem script to run all the test script under tests folder which the file name match test_xxxx.py
2
+
3
+ chdir " %~dp0 .."
4
+
5
+ set " PYTHONPAH = ."
6
+
7
+ call scripts/build_maro.bat
8
+
9
+ rem install requirements
10
+
11
+ pip install -r ./tests/requirements.test.txt
12
+
13
+ rem show coverage
14
+
15
+ coverage run --rcfile=./tests/.coveragerc
16
+
17
+ coverage report --rcfile=./tests/.coveragerc
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ pip install -r ./tests/requirements.test.txt
17
17
18
18
coverage run --rcfile=./tests/.coveragerc
19
19
20
- coverage report --rcfile=./tests/.coveragerc
20
+ coverage report --rcfile=./tests/.coveragerc
Original file line number Diff line number Diff line change 1
-
2
- chdir " %~dp0 .."
3
-
4
- rem remove old htmlcov
5
- @ RD /S /Q htmlcov
6
-
7
- rem generate html
8
-
9
- coverage html
10
-
11
- rem host html
12
-
13
- cd htmlcov
14
-
15
- REM python -m http.server 8888
16
-
17
- start python -m http.server 8888
18
-
19
- start " " " http://localhost:8888"
1
+
2
+ chdir " %~dp0 .."
3
+
4
+ rem remove old htmlcov
5
+ @ RD /S /Q htmlcov
6
+
7
+ rem generate html
8
+
9
+ coverage html
10
+
11
+ rem host html
12
+
13
+ cd htmlcov
14
+
15
+ REM python -m http.server 8888
16
+
17
+ start python -m http.server 8888
18
+
19
+ start " " " http://localhost:8888"
Original file line number Diff line number Diff line change 25
25
# Set environment variable to skip deployment process of MARO
26
26
os .environ ["SKIP_DEPLOYMENT" ] = "TRUE"
27
27
28
-
29
28
# root path to backend
30
29
BASE_SRC_PATH = "./maro/backends"
31
30
# backend module name
51
50
),
52
51
)
53
52
54
-
55
53
include_dirs .append (numpy .get_include ())
56
54
57
55
extensions .append (
84
82
),
85
83
)
86
84
87
- specific_requires = []
85
+ # It is not necessary to install these packages when using manylinux action, as we only need numpy to build wheels
86
+ # NOTE: install following package will cause build error in current(2023-03-14) manylinux image
87
+ if "GITHUB_BUILD_ACTION" in os .environ :
88
+ install_requires = []
89
+ else :
90
+ install_requires = [
91
+ # TODO: use a helper function to collect these
92
+ "holidays>=0.10.3" ,
93
+ "numpy>=1.19.5" ,
94
+ "pandas>=0.25.3" ,
95
+ "paramiko>=2.9.2" ,
96
+ "ptvsd>=4.3.2" ,
97
+ "python_dateutil>=2.8.1" ,
98
+ "PyYAML>=5.4.1" ,
99
+ "pyzmq>=19.0.2" ,
100
+ "redis>=3.5.3" ,
101
+ "requests>=2.25.1" ,
102
+ "scipy>=1.7.0" ,
103
+ "tabulate>=0.8.5" ,
104
+ "torch>=1.6.0, <1.14.0" ,
105
+ "tornado>=6.1" ,
106
+ ]
107
+
88
108
if sys .version .startswith ("3.6" ):
89
- specific_requires .append ("dataclasses>=0.5" )
109
+ install_requires .append ("dataclasses>=0.5" )
90
110
91
111
readme = io .open ("./maro/README.rst" , encoding = "utf-8" ).read ()
92
112
133
153
setup_requires = [
134
154
"numpy<1.20.0" ,
135
155
],
136
- install_requires = [
137
- # TODO: use a helper function to collect these
138
- "holidays>=0.10.3" ,
139
- "numpy>=1.19.5" ,
140
- "pandas>=0.25.3" ,
141
- "paramiko>=2.9.2" ,
142
- "ptvsd>=4.3.2" ,
143
- "python_dateutil>=2.8.1" ,
144
- "PyYAML>=5.4.1" ,
145
- "pyzmq>=19.0.2" ,
146
- "redis>=3.5.3" ,
147
- "requests>=2.25.1" ,
148
- "scipy>=1.7.0" ,
149
- "tabulate>=0.8.5" ,
150
- "torch>=1.6.0, <1.14.0" ,
151
- "tornado>=6.1" ,
152
- ]
153
- + specific_requires ,
156
+ install_requires = install_requires ,
154
157
entry_points = {
155
158
"console_scripts" : [
156
159
"maro=maro.cli.maro:main" ,
You can’t perform that action at this time.
0 commit comments