Commit e1c5afde9e68a879908c82abac6fcc2a6dd20634
Committed by
Marcin Woliński

1 parent
d6973427
dwie wersje dla windowsa (3.6 i 3.7), drobne poprawki
Showing
13 changed files
with
110 additions
and
62 deletions
buildAll.sh
... | ... | @@ -126,8 +126,8 @@ function buildegg { |
126 | 126 | python_ver=$4 |
127 | 127 | |
128 | 128 | srcDir=`pwd` |
129 | - buildDir=buildall/$os-$arch-$embedded/morfeusz/wrappers/python$python_ver | |
130 | - if [ "$python_ver" = 2 ] | |
129 | + buildDir=buildall/$os-$arch-$embedded/morfeusz/wrappers/python${python_ver:0:1} | |
130 | + if [[ "$python_ver" =~ 2.* ]] | |
131 | 131 | then |
132 | 132 | eggName=morfeusz2-0.4.0-py2.7 |
133 | 133 | eggDir=$buildDir/$eggName |
... | ... | @@ -148,23 +148,37 @@ function buildegg { |
148 | 148 | pythonLib=$CROSSMORFEUSZ_ROOT/darwin64/Python.framework/Versions/2.7/lib |
149 | 149 | fi |
150 | 150 | else |
151 | - eggName=morfeusz2-0.4.0-py3.6 | |
152 | - eggDir=$buildDir/$eggName | |
153 | - pythonIncl=python36 | |
154 | 151 | if [ "$os-$arch" == "Windows-amd64" ] |
155 | 152 | then |
156 | - pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python36 | |
157 | - elif [ "$os-$arch" == "Windows-i386" ] | |
158 | - then | |
159 | - pythonDir=$CROSSMORFEUSZ_ROOT/windows32/Python36-32 | |
160 | - elif [ "$os-$arch" == "Linux-i386" ] | |
161 | - then | |
162 | - pythonDir=$CROSSMORFEUSZ_ROOT/linux32/python3/include/python3.4m | |
163 | - elif [ "$os-$arch" == "Darwin-amd64" ] | |
164 | - then | |
165 | - pythonIncl=python3.6 | |
166 | - pythonDir=$CROSSMORFEUSZ_ROOT/darwin64/Python3.framework/Versions/3.6/Headers | |
167 | - pythonLib=$CROSSMORFEUSZ_ROOT/darwin64/Python3.framework/Versions/3.6/lib | |
153 | + if [ "$python_ver" == "3.6" ] | |
154 | + then | |
155 | + pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python36 | |
156 | + eggName=morfeusz2-0.4.0-py3.6 | |
157 | + eggDir=$buildDir/$eggName | |
158 | + pythonIncl=python36 | |
159 | + elif [ "$python_ver" == "3.7" ] | |
160 | + then | |
161 | + pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python37 | |
162 | + eggName=morfeusz2-0.4.0-py3.7 | |
163 | + eggDir=$buildDir/$eggName | |
164 | + pythonIncl=python37 | |
165 | + fi | |
166 | + else | |
167 | + eggName=morfeusz2-0.4.0-py3.6 | |
168 | + eggDir=$buildDir/$eggName | |
169 | + pythonIncl=python36 | |
170 | + if [ "$os-$arch" == "Windows-i386" ] | |
171 | + then | |
172 | + pythonDir=$CROSSMORFEUSZ_ROOT/windows32/Python36-32 | |
173 | + elif [ "$os-$arch" == "Linux-i386" ] | |
174 | + then | |
175 | + pythonDir=$CROSSMORFEUSZ_ROOT/linux32/python3/include/python3.4m | |
176 | + elif [ "$os-$arch" == "Darwin-amd64" ] | |
177 | + then | |
178 | + pythonIncl=python3.6 | |
179 | + pythonDir=$CROSSMORFEUSZ_ROOT/darwin64/Python3.framework/Versions/3.6/Headers | |
180 | + pythonLib=$CROSSMORFEUSZ_ROOT/darwin64/Python3.framework/Versions/3.6/lib | |
181 | + fi | |
168 | 182 | fi |
169 | 183 | fi |
170 | 184 | |
... | ... | @@ -220,23 +234,25 @@ function buildegg { |
220 | 234 | fi |
221 | 235 | |
222 | 236 | cp $buildDir/morfeusz2.py $eggDir/ |
223 | - cd $buildDir/$eggName | |
224 | - if [ "$os-$arch" == "Windows-amd64" ] | |
225 | - then | |
226 | - zip -r $eggName-win-amd64.zip ./* | |
227 | - cp $eggName-win-amd64.zip $targetDir/$eggName-win-amd64.egg | |
228 | - elif [ "$os-$arch" == "Windows-i386" ] | |
229 | - then | |
230 | - zip -r $eggName-win32.zip ./* | |
231 | - cp $eggName-win32.zip $targetDir/$eggName-win32.egg | |
232 | - elif [ "$os-$arch" == "Linux-i386" ] | |
233 | - then | |
234 | - zip -r $eggName-linux-i686.zip ./* | |
235 | - cp $eggName-linux-i686.zip $targetDir/$eggName-linux-i686.egg | |
236 | - elif [ "$os-$arch" == "Darwin-amd64" ] | |
237 | - then | |
238 | - zip -r $eggName-macosx-10.9-x86_64.zip ./* | |
239 | - cp $eggName-macosx-10.9-x86_64.zip $targetDir/$eggName-macosx-10.9-x86_64.egg | |
237 | + if [ -d "$buildDir/$eggName" ]; then | |
238 | + cd $buildDir/$eggName | |
239 | + if [ "$os-$arch" == "Windows-amd64" ] | |
240 | + then | |
241 | + zip -r $eggName-win-amd64.zip ./* | |
242 | + cp $eggName-win-amd64.zip $targetDir/$eggName-win-amd64.egg | |
243 | + elif [ "$os-$arch" == "Windows-i386" ] | |
244 | + then | |
245 | + zip -r $eggName-win32.zip ./* | |
246 | + cp $eggName-win32.zip $targetDir/$eggName-win32.egg | |
247 | + elif [ "$os-$arch" == "Linux-i386" ] | |
248 | + then | |
249 | + zip -r $eggName-linux-i686.zip ./* | |
250 | + cp $eggName-linux-i686.zip $targetDir/$eggName-linux-i686.egg | |
251 | + elif [ "$os-$arch" == "Darwin-amd64" ] | |
252 | + then | |
253 | + zip -r $eggName-macosx-10.9-x86_64.zip ./* | |
254 | + cp $eggName-macosx-10.9-x86_64.zip $targetDir/$eggName-macosx-10.9-x86_64.egg | |
255 | + fi | |
240 | 256 | fi |
241 | 257 | |
242 | 258 | } |
... | ... | @@ -251,29 +267,43 @@ mkdir -p log buildall |
251 | 267 | buildDictionaries 2>&1 | log All all |
252 | 268 | |
253 | 269 | { |
254 | - echo "build Linux amd64 true 2 package package-java package-python2 package-builder 2>&1 | log Linux-tgz2 amd64; \ | |
255 | - build Linux amd64 true 3 package-python3 2>&1 | log Linux-tgz3 amd64" | |
270 | + echo "build Linux amd64 true 2.7 package package-java package-python2 package-builder 2>&1 | log Linux-tgz2 amd64; \ | |
271 | + build Linux amd64 true 3.0 package-python3 2>&1 | log Linux-tgz3 amd64" | |
256 | 272 | echo "build Linux amd64 false 0 lib-deb bin-deb dev-deb dictionary-deb java-deb 2>&1 | log Linux-deb amd64" |
257 | - echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 2 package package-java py2morfeusz 2>&1 | log Linux-tgz i386; \ | |
258 | - buildegg Linux i386 true 2 2>&1 | log Linux i386; \ | |
259 | - LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 3 py3morfeusz 2>&1 | log Linux-tgz i386; \ | |
260 | - buildegg Linux i386 true 3 2>&1 | log Linux i386" | |
273 | + echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 2.7 package package-java py2morfeusz 2>&1 | log Linux-tgz i386; \ | |
274 | + buildegg Linux i386 true 2.7 2>&1 | log Linux i386; \ | |
275 | + LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 3.0 py3morfeusz 2>&1 | log Linux-tgz i386; \ | |
276 | + buildegg Linux i386 true 3.0 2>&1 | log Linux i386" | |
261 | 277 | echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 false 0 lib-deb bin-deb java-deb 2>&1 | log Linux-deb i386" |
262 | - echo "build Windows amd64 true 2 package package-java py2morfeusz 2>&1 | log Windows amd64; \ | |
263 | - buildegg Windows amd64 true 2 2>&1 | log Windows amd64; \ | |
264 | - build Windows amd64 true 3 py3morfeusz 2>&1 | log Windows amd64; \ | |
265 | - buildegg Windows amd64 true 3 2>&1 | log Windows amd64" | |
266 | - echo "build Windows i386 true 2 package package-java py2morfeusz 2>&1 | log Windows i386; \ | |
267 | - buildegg Windows i386 true 2 2>&1 | log Windows i386; \ | |
268 | - build Windows i386 true 3 py3morfeusz 2>&1 | log Windows i386 \ | |
269 | - buildegg Windows i386 true 3 2>&1 | log Windows i386" | |
270 | - echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64; \ | |
271 | - buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64; \ | |
272 | - build Darwin amd64 true 3 py3morfeusz 2>&1 | log Darwin amd64; \ | |
273 | - buildegg Darwin amd64 true 3 2>&1 | log Darwin amd64" | |
274 | - echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64" | |
275 | - echo "buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64" | |
278 | + echo "build Windows amd64 true 2.7 package package-java py2morfeusz 2>&1 | log Windows amd64; \ | |
279 | + buildegg Windows amd64 true 2.7 2>&1 | log Windows amd64; \ | |
280 | + build Windows amd64 true 3.6 py3morfeusz 2>&1 | log Windows amd64; \ | |
281 | + buildegg Windows amd64 true 3.6 2>&1 | log Windows amd64; \ | |
282 | + build Windows amd64 true 3.7 py3morfeusz 2>&1 | log Windows amd64; \ | |
283 | + buildegg Windows amd64 true 3.7 2>&1 | log Windows amd64" | |
284 | + echo "build Windows i386 true 2.7 package package-java py2morfeusz 2>&1 | log Windows i386; \ | |
285 | + buildegg Windows i386 true 2.7 2>&1 | log Windows i386; \ | |
286 | + build Windows i386 true 3.0 py3morfeusz 2>&1 | log Windows i386 \ | |
287 | + buildegg Windows i386 true 3.0 2>&1 | log Windows i386" | |
288 | + # echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64; \ | |
289 | + # buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64; \ | |
290 | + # build Darwin amd64 true 3 py3morfeusz 2>&1 | log Darwin amd64; \ | |
291 | + # buildegg Darwin amd64 true 3 2>&1 | log Darwin amd64" | |
292 | + # echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64" | |
293 | + # echo "buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64" | |
294 | + | |
295 | +} | xargs -n1 -P6 -d$'\n' bash -c | |
276 | 296 | |
277 | -} | xargs -n1 -P4 -d$'\n' bash -c | |
297 | +srcDir=`pwd` | |
298 | +targetDir=$srcDir/target | |
278 | 299 | |
300 | +for f in `find "$targetDir" -name "*-py3.6-linux-x86_64.egg"` | |
301 | +do | |
302 | + cp -f "$f" "`echo $f | sed -r 's/py3.6/py3.7/'`" | |
303 | +done | |
279 | 304 | |
305 | +for f in `find "$targetDir" -name "*-py3.5-linux-x86_64.egg"` | |
306 | +do | |
307 | + cp -f "$f" "`echo $f | sed -r 's/py3.5/py3.6/'`" | |
308 | + cp -f "$f" "`echo $f | sed -r 's/py3.5/py3.7/'`" | |
309 | +done | |
... | ... |
morfeusz/wrappers/CMakeLists.txt
... | ... | @@ -2,9 +2,9 @@ add_subdirectory (java) |
2 | 2 | add_subdirectory (perl) |
3 | 3 | |
4 | 4 | if (${PY}) |
5 | - if(${PY} EQUAL "2") | |
5 | + if("${PY}" MATCHES "2.*") | |
6 | 6 | add_subdirectory (python2) |
7 | - elseif(${PY} EQUAL "3") | |
7 | + elseif("${PY}" MATCHES "3.*") | |
8 | 8 | add_subdirectory (python3) |
9 | 9 | endif() |
10 | 10 | endif() |
11 | 11 | \ No newline at end of file |
... | ... |
morfeusz/wrappers/python2/CMakeLists.txt
morfeusz/wrappers/python3/CMakeLists.txt
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | # SWIG |
3 | 3 | #set(CMAKE_SWIG_OUTDIR swig) |
4 | 4 | #~ FIND_PACKAGE (SWIG REQUIRED) |
5 | -FIND_PACKAGE (PythonLibs 3.0 REQUIRED) | |
5 | +FIND_PACKAGE (PythonLibs ${PY} REQUIRED) | |
6 | 6 | #~ INCLUDE (${SWIG_USE_FILE}) |
7 | 7 | |
8 | 8 | set (PY3MORFEUSZ_VERSION "0.4.0") |
... | ... | @@ -31,6 +31,7 @@ set (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build") |
31 | 31 | configure_file (${SETUP_PY_IN} ${SETUP_PY}) |
32 | 32 | |
33 | 33 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/morfeusz2-0.4.0-py3.6" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") |
34 | +file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/morfeusz2-0.4.0-py3.7" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") | |
34 | 35 | |
35 | 36 | add_custom_target (generate_python3_setup_file |
36 | 37 | DEPENDS ${SETUP_PY}) |
... | ... |
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/PKG-INFO
0 → 100644
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/SOURCES.txt
0 → 100644
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/dependency_links.txt
0 → 100644
No preview for this file type
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/native_libs.txt
0 → 100644
1 | +_morfeusz2.so | |
... | ... |
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/not-zip-safe
0 → 100644
No preview for this file type
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/top_level.txt
0 → 100644
toolchains/Toolchain-Linux-i386.cmake
... | ... | @@ -11,7 +11,7 @@ set (CMAKE_SYSTEM_PROCESSOR "x86") |
11 | 11 | set (JAVA_ROOT ${CROSSMORFEUSZ_ROOT}/linux32/jdk1.7.0_45) |
12 | 12 | set (PYTHON_ROOT ${CROSSMORFEUSZ_ROOT}/linux32/python) |
13 | 13 | if(${PY}) |
14 | - if(${PY} EQUAL "3") | |
14 | + if("${PY}" MATCHES "3.*") | |
15 | 15 | set (PYTHON_ROOT ${CROSSMORFEUSZ_ROOT}/linux32/python3) |
16 | 16 | endif() |
17 | 17 | endif() |
... | ... |
toolchains/Toolchain-Windows-amd64.cmake
... | ... | @@ -11,8 +11,10 @@ set (CMAKE_SYSTEM_PROCESSOR "x86_64") |
11 | 11 | set (WIN64_ROOT ${CROSSMORFEUSZ_ROOT}/windows64) |
12 | 12 | set (PYTHON_ROOT ${WIN64_ROOT}/Python27) |
13 | 13 | if(${PY}) |
14 | - if(${PY} EQUAL "3") | |
14 | + if("${PY}" EQUAL "3.6") | |
15 | 15 | set (PYTHON_ROOT ${WIN64_ROOT}/Python36) |
16 | + elseif("${PY}" EQUAL "3.7") | |
17 | + set (PYTHON_ROOT ${WIN64_ROOT}/Python37) | |
16 | 18 | endif() |
17 | 19 | endif() |
18 | 20 | set (JAVA_ROOT ${WIN64_ROOT}/Java/jdk1.7.0_45) |
... | ... |
toolchains/Toolchain-Windows-i386.cmake
... | ... | @@ -11,7 +11,7 @@ set (CMAKE_SYSTEM_PROCESSOR "x86") |
11 | 11 | set (WIN32_ROOT ${CROSSMORFEUSZ_ROOT}/windows32) |
12 | 12 | set (PYTHON_ROOT ${WIN32_ROOT}/Python27) |
13 | 13 | if(${PY}) |
14 | - if(${PY} EQUAL "3") | |
14 | + if("${PY}" MATCHES "3.*") | |
15 | 15 | set (PYTHON_ROOT ${WIN32_ROOT}/Python36-32) |
16 | 16 | endif() |
17 | 17 | endif() |
... | ... |