Commit e9451c4bb5cd6cfec3e9f5f2fdbc34769d615d61

Authored by Marcin Woliński
1 parent aed116c4

wersjonowanie bingingu; wheel na Linuksie

przy okazji morfeusz@ipipan.waw.pl
Showing 26 changed files with 84 additions and 114 deletions
CMakeLists.txt
@@ -160,8 +160,8 @@ endif () @@ -160,8 +160,8 @@ endif ()
160 160
161 # general 161 # general
162 set (CPACK_PACKAGE_FILE_NAME "morfeusz2-${Morfeusz_VERSION}-${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}") 162 set (CPACK_PACKAGE_FILE_NAME "morfeusz2-${Morfeusz_VERSION}-${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}")
163 -set (CPACK_PACKAGE_VENDOR "Michał Lenart")  
164 -set (CPACK_PACKAGE_CONTACT "michal.lenart@ipipan.waw.pl") 163 +set (CPACK_PACKAGE_VENDOR "Morfeusz SGJP Team")
  164 +set (CPACK_PACKAGE_CONTACT "morfeusz@ipipan.waw.pl")
165 set (CPACK_DEBIAN_PACKAGE_VERSION "${Morfeusz_VERSION}") 165 set (CPACK_DEBIAN_PACKAGE_VERSION "${Morfeusz_VERSION}")
166 if (BUILT_ON) 166 if (BUILT_ON)
167 set (CPACK_DEBIAN_PACKAGE_RELEASE "${BUILT_ON}") 167 set (CPACK_DEBIAN_PACKAGE_RELEASE "${BUILT_ON}")
@@ -5,7 +5,7 @@ Compilation - prerequisites @@ -5,7 +5,7 @@ Compilation - prerequisites
5 5
6 This tutorial assumes that build process is performed on Linux 64bit machine (preferably from Debian/Ubuntu family). 6 This tutorial assumes that build process is performed on Linux 64bit machine (preferably from Debian/Ubuntu family).
7 7
8 -sudo apt-get install cmake zip build-essential autotools-dev python python-setuptools python-stdeb python-pip python-all-dev python-pyparsing devscripts libcppunit-dev acl 8 +sudo apt-get install cmake zip build-essential autotools-dev python python-setuptools python-stdeb python-pip python-all-dev python3-pyparsing devscripts libcppunit-dev acl
9 sudo pip install pyinstaller 9 sudo pip install pyinstaller
10 10
11 For cross compiling: 11 For cross compiling:
@@ -233,10 +233,6 @@ crossmorfeusz @@ -233,10 +233,6 @@ crossmorfeusz
233 jdk1.7.0_45 233 jdk1.7.0_45
234 python 234 python
235 235
236 -Notes on Mac OS X cross-compilation:  
237 -------------------  
238 -Very special, very magic and ancient version of gcc OSX compiler is required (Apple is evil and does not support cross-compilation anymore). The best way to obtain it is to personally ask the authors (michal.lenart@ipipan.waw.pl, wolinski@ipipan.waw.pl). Once you get it, the compiler directory (x86_64-apple-darwin9) must be copied into /usr directory.  
239 -  
240 236
241 buildAll.sh script: 237 buildAll.sh script:
242 ------------------- 238 -------------------
buildDarwin.sh
@@ -132,8 +132,6 @@ function buildegg { @@ -132,8 +132,6 @@ function buildegg {
132 buildDir=$BUILD_ROOT/$os-$bity-$embedded/morfeusz/wrappers/python${python_ver:0:1} 132 buildDir=$BUILD_ROOT/$os-$bity-$embedded/morfeusz/wrappers/python${python_ver:0:1}
133 if [[ "$python_ver" =~ 2.* ]] 133 if [[ "$python_ver" =~ 2.* ]]
134 then 134 then
135 - eggName=morfeusz2-0.4.0-py2.7  
136 - eggDir=$buildDir/$eggName  
137 pythonIncl=python27 135 pythonIncl=python27
138 if [ "$os-$arch" == "Windows-amd64" ] 136 if [ "$os-$arch" == "Windows-amd64" ]
139 then 137 then
@@ -156,19 +154,13 @@ function buildegg { @@ -156,19 +154,13 @@ function buildegg {
156 if [ "$python_ver" == "3.6" ] 154 if [ "$python_ver" == "3.6" ]
157 then 155 then
158 pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python36 156 pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python36
159 - eggName=morfeusz2-0.4.0-py3.6  
160 - eggDir=$buildDir/$eggName  
161 pythonIncl=python36 157 pythonIncl=python36
162 elif [ "$python_ver" == "3.7" ] 158 elif [ "$python_ver" == "3.7" ]
163 then 159 then
164 pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python37 160 pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python37
165 - eggName=morfeusz2-0.4.0-py3.7  
166 - eggDir=$buildDir/$eggName  
167 pythonIncl=python37 161 pythonIncl=python37
168 fi 162 fi
169 else 163 else
170 - eggName=morfeusz2-0.4.0-py3.6  
171 - eggDir=$buildDir/$eggName  
172 pythonIncl=python36 164 pythonIncl=python36
173 if [ "$os-$arch" == "Windows-i386" ] 165 if [ "$os-$arch" == "Windows-i386" ]
174 then 166 then
@@ -188,8 +180,19 @@ function buildegg { @@ -188,8 +180,19 @@ function buildegg {
188 fi 180 fi
189 181
190 targetDir=$TARGET_ROOT/$os/$bity 182 targetDir=$TARGET_ROOT/$os/$bity
  183 + echo 'pwd:' `pwd`
  184 +
  185 + cd $buildDir
  186 + eggName=$(echo morfeusz2-*-py$python_ver)
  187 + if [[ ! -d $eggName ]]; then
  188 + echo Egg directory $eggName not found in $buildDir!!!
  189 + exit 1
  190 + fi
  191 + eggDir=$buildDir/$eggName
  192 +
191 echo "src_dir: $MORFEUSZ_SRC" 193 echo "src_dir: $MORFEUSZ_SRC"
192 echo "python_build_dir: $buildDir" 194 echo "python_build_dir: $buildDir"
  195 + echo "egg_name: $eggName"
193 echo "egg_dir: $eggDir" 196 echo "egg_dir: $eggDir"
194 echo "python_lib_dir: $pythonDir" 197 echo "python_lib_dir: $pythonDir"
195 if [ "$os-$arch" == "Windows-amd64" ] 198 if [ "$os-$arch" == "Windows-amd64" ]
@@ -240,6 +243,7 @@ function buildegg { @@ -240,6 +243,7 @@ function buildegg {
240 cp $buildDir/../../libmorfeusz2.dylib $eggDir/ 243 cp $buildDir/../../libmorfeusz2.dylib $eggDir/
241 fi 244 fi
242 245
  246 + cp $buildDir/morfeusz2.egg-info/PKG-INFO $eggDir/EGG-INFO/
243 cp $buildDir/morfeusz2.py $eggDir/ 247 cp $buildDir/morfeusz2.py $eggDir/
244 if [ -d "$buildDir/$eggName" ]; then 248 if [ -d "$buildDir/$eggName" ]; then
245 cd $buildDir/$eggName 249 cd $buildDir/$eggName
@@ -276,9 +280,9 @@ export -f log @@ -276,9 +280,9 @@ export -f log
276 mkdir -p log 280 mkdir -p log
277 281
278 build Darwin $BITS true 2 package package-java gui-dmg 2>&1 | log Darwin $BITS; 282 build Darwin $BITS true 2 package package-java gui-dmg 2>&1 | log Darwin $BITS;
279 -build Darwin $BITS true 2 py2morfeusz 2>&1 | log Darwin $BITS; 283 +build Darwin $BITS true 2 package-python2-egg-info 2>&1 | log Darwin $BITS;
280 buildegg Darwin $BITS true 2 2>&1 | log Darwin $BITS; 284 buildegg Darwin $BITS true 2 2>&1 | log Darwin $BITS;
281 -build Darwin $BITS true 3 py3morfeusz 2>&1 | log Darwin $BITS; 285 +build Darwin $BITS true 3 package-python3-egg-info 2>&1 | log Darwin $BITS;
282 buildegg Darwin $BITS true 3 2>&1 | log Darwin $BITS 286 buildegg Darwin $BITS true 3 2>&1 | log Darwin $BITS
283 #build Darwin $BITS true 2 package package-java py2morfeusz 2>&1 | log Darwin $BITS 287 #build Darwin $BITS true 2 package package-java py2morfeusz 2>&1 | log Darwin $BITS
284 #buildegg Darwin $BITS true 2 2>&1 | log Darwin $BITS 288 #buildegg Darwin $BITS true 2 2>&1 | log Darwin $BITS
buildWindows.sh
@@ -132,8 +132,6 @@ function buildegg { @@ -132,8 +132,6 @@ function buildegg {
132 buildDir=$BUILD_ROOT/$os-$bity-$embedded/morfeusz/wrappers/python${python_ver:0:1} 132 buildDir=$BUILD_ROOT/$os-$bity-$embedded/morfeusz/wrappers/python${python_ver:0:1}
133 if [[ "$python_ver" =~ 2.* ]] 133 if [[ "$python_ver" =~ 2.* ]]
134 then 134 then
135 - eggName=morfeusz2-0.4.0-py2.7  
136 - eggDir=$buildDir/$eggName  
137 pythonIncl=python27 135 pythonIncl=python27
138 if [ "$os-$arch" == "Windows-amd64" ] 136 if [ "$os-$arch" == "Windows-amd64" ]
139 then 137 then
@@ -156,19 +154,13 @@ function buildegg { @@ -156,19 +154,13 @@ function buildegg {
156 if [ "$python_ver" == "3.6" ] 154 if [ "$python_ver" == "3.6" ]
157 then 155 then
158 pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python36 156 pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python36
159 - eggName=morfeusz2-0.4.0-py3.6  
160 - eggDir=$buildDir/$eggName  
161 pythonIncl=python36 157 pythonIncl=python36
162 elif [ "$python_ver" == "3.7" ] 158 elif [ "$python_ver" == "3.7" ]
163 then 159 then
164 pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python37 160 pythonDir=$CROSSMORFEUSZ_ROOT/windows64/Python37
165 - eggName=morfeusz2-0.4.0-py3.7  
166 - eggDir=$buildDir/$eggName  
167 pythonIncl=python37 161 pythonIncl=python37
168 fi 162 fi
169 else 163 else
170 - eggName=morfeusz2-0.4.0-py3.6  
171 - eggDir=$buildDir/$eggName  
172 pythonIncl=python36 164 pythonIncl=python36
173 if [ "$os-$arch" == "Windows-i386" ] 165 if [ "$os-$arch" == "Windows-i386" ]
174 then 166 then
@@ -186,8 +178,19 @@ function buildegg { @@ -186,8 +178,19 @@ function buildegg {
186 fi 178 fi
187 179
188 targetDir=$TARGET_ROOT/$os/$bity 180 targetDir=$TARGET_ROOT/$os/$bity
  181 + echo 'pwd:' `pwd`
  182 +
  183 + cd $buildDir
  184 + eggName=$(echo morfeusz2-*-py$python_ver)
  185 + if [[ ! -d $eggName ]]; then
  186 + echo Egg directory $eggName not found in $buildDir!!!
  187 + exit 1
  188 + fi
  189 + eggDir=$buildDir/$eggName
  190 +
189 echo "src_dir: $MORFEUSZ_SRC" 191 echo "src_dir: $MORFEUSZ_SRC"
190 echo "python_build_dir: $buildDir" 192 echo "python_build_dir: $buildDir"
  193 + echo "egg_name: $eggName"
191 echo "egg_dir: $eggDir" 194 echo "egg_dir: $eggDir"
192 echo "python_lib_dir: $pythonDir" 195 echo "python_lib_dir: $pythonDir"
193 if [ "$os-$arch" == "Windows-amd64" ] 196 if [ "$os-$arch" == "Windows-amd64" ]
@@ -236,6 +239,7 @@ function buildegg { @@ -236,6 +239,7 @@ function buildegg {
236 cp $buildDir/../../libmorfeusz2.dylib $eggDir/ 239 cp $buildDir/../../libmorfeusz2.dylib $eggDir/
237 fi 240 fi
238 241
  242 + cp $buildDir/morfeusz2.egg-info/PKG-INFO $eggDir/EGG-INFO/
239 cp $buildDir/morfeusz2.py $eggDir/ 243 cp $buildDir/morfeusz2.py $eggDir/
240 if [ -d "$buildDir/$eggName" ]; then 244 if [ -d "$buildDir/$eggName" ]; then
241 cd $buildDir/$eggName 245 cd $buildDir/$eggName
@@ -271,44 +275,11 @@ export -f log @@ -271,44 +275,11 @@ export -f log
271 ##??? rm -rf log $BUILD_ROOT 275 ##??? rm -rf log $BUILD_ROOT
272 mkdir -p log 276 mkdir -p log
273 277
274 -build Windows $BITS true 2.7 package package-java py2morfeusz 2>&1 | log Windows $BITS  
275 -build Windows $BITS true 2.7 gui-installer 2>&1 | log Windows $BITS 278 +build Windows $BITS true 2.7 package package-java gui-installer 2>&1 | log Windows $BITS
  279 +build Windows $BITS true 2.7 package-python2-egg-info 2>&1 | log Windows $BITS
276 buildegg Windows $BITS true 2.7 2>&1 | log Windows $BITS 280 buildegg Windows $BITS true 2.7 2>&1 | log Windows $BITS
277 -build Windows $BITS true 3.6 py3morfeusz 2>&1 | log Windows $BITS 281 +build Windows $BITS true 3.6 package-python3-egg-info 2>&1 | log Windows $BITS
278 buildegg Windows $BITS true 3.6 2>&1 | log Windows $BITS 282 buildegg Windows $BITS true 3.6 2>&1 | log Windows $BITS
279 -build Windows $BITS true 3.7 py3morfeusz 2>&1 | log Windows $BITS 283 +build Windows $BITS true 3.7 package-python3-egg-info 2>&1 | log Windows $BITS
280 buildegg Windows $BITS true 3.7 2>&1 | log Windows $BITS 284 buildegg Windows $BITS true 3.7 2>&1 | log Windows $BITS
281 285
282 -# build Windows $BITS true 2.7 package package-java py2morfeusz 2>&1 | log Windows $BITS  
283 -# buildegg Windows $BITS true 2.7 2>&1 | log Windows $BITS  
284 -# build Windows $BITS true 3.0 py3morfeusz 2>&1 | log Windows $BITS  
285 -# buildegg Windows $BITS true 3.0 2>&1 | log Windows $BITS  
286 -  
287 -  
288 -# {  
289 -# echo "build Linux amd64 true 2.7 package package-java package-python2 package-builder 2>&1 | log Linux-tgz2 amd64; \  
290 -# build Linux amd64 true 3.0 package-python3 2>&1 | log Linux-tgz3 amd64"  
291 -# echo "build Linux amd64 false 0 lib-deb bin-deb dev-deb dictionary-deb java-deb 2>&1 | log Linux-deb amd64"  
292 -# echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 2.7 package package-java py2morfeusz 2>&1 | log Linux-tgz i386; \  
293 -# buildegg Linux i386 true 2.7 2>&1 | log Linux i386; \  
294 -# LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 true 3.0 py3morfeusz 2>&1 | log Linux-tgz i386; \  
295 -# buildegg Linux i386 true 3.0 2>&1 | log Linux i386"  
296 -# echo "LDFLAGS=-m32;CFLAGS=-m32;CXXFLAGS=-m32 build Linux i386 false 0 lib-deb bin-deb java-deb 2>&1 | log Linux-deb i386"  
297 -# echo "build Windows amd64 true 2.7 package package-java py2morfeusz 2>&1 | log Windows amd64; \  
298 -# buildegg Windows amd64 true 2.7 2>&1 | log Windows amd64; \  
299 -# build Windows amd64 true 3.6 py3morfeusz 2>&1 | log Windows amd64; \  
300 -# buildegg Windows amd64 true 3.6 2>&1 | log Windows amd64; \  
301 -# build Windows amd64 true 3.7 py3morfeusz 2>&1 | log Windows amd64; \  
302 -# buildegg Windows amd64 true 3.7 2>&1 | log Windows amd64"  
303 -# echo "build Windows i386 true 2.7 package package-java py2morfeusz 2>&1 | log Windows i386; \  
304 -# buildegg Windows i386 true 2.7 2>&1 | log Windows i386; \  
305 -# build Windows i386 true 3.0 py3morfeusz 2>&1 | log Windows i386 \  
306 -# buildegg Windows i386 true 3.0 2>&1 | log Windows i386"  
307 -# echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64; \  
308 -# buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64; \  
309 -# build Darwin amd64 true 3 py3morfeusz 2>&1 | log Darwin amd64; \  
310 -# buildegg Darwin amd64 true 3 2>&1 | log Darwin amd64"  
311 -# echo "build Darwin amd64 true 2 package package-java py2morfeusz 2>&1 | log Darwin amd64"  
312 -# echo "buildegg Darwin amd64 true 2 2>&1 | log Darwin amd64"  
313 -  
314 -# } | xargs -n1 -P6 -d$'\n' bash -c  
fsabuilder/CMakeLists.txt
@@ -28,12 +28,17 @@ add_custom_target (package-builder-egg @@ -28,12 +28,17 @@ add_custom_target (package-builder-egg
28 COMMAND python3 ${SETUP_PY} bdist_egg -d "${TARGET_DIR}" 28 COMMAND python3 ${SETUP_PY} bdist_egg -d "${TARGET_DIR}"
29 DEPENDS builder-setup 29 DEPENDS builder-setup
30 ) 30 )
  31 +add_custom_target (package-builder-whl
  32 + COMMAND python3 ${SETUP_PY} bdist_wheel -d "${TARGET_DIR}"
  33 + DEPENDS builder-setup
  34 +)
31 add_custom_target (package-builder-sdist 35 add_custom_target (package-builder-sdist
32 COMMAND python3 ${SETUP_PY} sdist -d "${TARGET_DIR}" 36 COMMAND python3 ${SETUP_PY} sdist -d "${TARGET_DIR}"
33 DEPENDS builder-setup 37 DEPENDS builder-setup
34 ) 38 )
35 39
36 -set (PACKAGE_DEPENDS "package-builder-egg" "package-builder-sdist") 40 +set (PACKAGE_DEPENDS "package-builder-egg" "package-builder-whl"
  41 + "package-builder-sdist")
37 42
38 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 43 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
39 if (BUILT_ON) 44 if (BUILT_ON)
morfeusz/CMakeLists.txt
@@ -16,14 +16,14 @@ else () @@ -16,14 +16,14 @@ else ()
16 endif () 16 endif ()
17 add_custom_command ( 17 add_custom_command (
18 OUTPUT "${ANALYZER_DICTIONARY_CPP}" "${GENERATOR_DICTIONARY_CPP}" 18 OUTPUT "${ANALYZER_DICTIONARY_CPP}" "${GENERATOR_DICTIONARY_CPP}"
19 - COMMAND python ${PROJECT_SOURCE_DIR}/fsabuilder/morfeusz_builder --input-files="${INPUT_DICTIONARIES}" --dict="${DEFAULT_DICT_NAME}" --analyzer-cpp="${ANALYZER_DICTIONARY_CPP}" --generator-cpp="${GENERATOR_DICTIONARY_CPP}" --tagset-file="${INPUT_TAGSET}" --segments-file="${SEGMENT_RULES_FILE}" ${ADDITIONAL_CMD} 19 + COMMAND python3 ${PROJECT_SOURCE_DIR}/fsabuilder/morfeusz_builder --input-files="${INPUT_DICTIONARIES}" --dict="${DEFAULT_DICT_NAME}" --analyzer-cpp="${ANALYZER_DICTIONARY_CPP}" --generator-cpp="${GENERATOR_DICTIONARY_CPP}" --tagset-file="${INPUT_TAGSET}" --segments-file="${SEGMENT_RULES_FILE}" ${ADDITIONAL_CMD}
20 DEPENDS "${INPUT_DICTIONARY}" 20 DEPENDS "${INPUT_DICTIONARY}"
21 COMMENT "Building default dictionary C++ files" 21 COMMENT "Building default dictionary C++ files"
22 ) 22 )
23 else () 23 else ()
24 add_custom_command ( 24 add_custom_command (
25 OUTPUT "${ANALYZER_DICTIONARY_FILE}" "${GENERATOR_DICTIONARY_FILE}" 25 OUTPUT "${ANALYZER_DICTIONARY_FILE}" "${GENERATOR_DICTIONARY_FILE}"
26 - COMMAND python ${PROJECT_SOURCE_DIR}/fsabuilder/morfeusz_builder --input-files="${INPUT_DICTIONARIES}" --dict="${DEFAULT_DICT_NAME}" --dict-dir="${DEFAULT_DICT_DIR}" --tagset-file="${INPUT_TAGSET}" --segments-file="${SEGMENT_RULES_FILE}" 26 + COMMAND python3 ${PROJECT_SOURCE_DIR}/fsabuilder/morfeusz_builder --input-files="${INPUT_DICTIONARIES}" --dict="${DEFAULT_DICT_NAME}" --dict-dir="${DEFAULT_DICT_DIR}" --tagset-file="${INPUT_TAGSET}" --segments-file="${SEGMENT_RULES_FILE}"
27 DEPENDS "${INPUT_DICTIONARY}" 27 DEPENDS "${INPUT_DICTIONARY}"
28 COMMENT "Building default dictionary files" 28 COMMENT "Building default dictionary files"
29 ) 29 )
morfeusz/wrappers/python2/CMakeLists.txt
@@ -5,8 +5,7 @@ @@ -5,8 +5,7 @@
5 FIND_PACKAGE (PythonLibs ${PY} EXACT) 5 FIND_PACKAGE (PythonLibs ${PY} EXACT)
6 #~ INCLUDE (${SWIG_USE_FILE}) 6 #~ INCLUDE (${SWIG_USE_FILE})
7 7
8 -set (PY2MORFEUSZ_VERSION "0.4.0")  
9 -#set (PY2MORFEUSZ_VERSION "${Morfeusz_VERSION}") 8 +set (PY2MORFEUSZ_VERSION "${Morfeusz_LIB_VERSION}")
10 9
11 # SWIG Java 10 # SWIG Java
12 INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH}) 11 INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
@@ -31,7 +30,9 @@ set (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build") @@ -31,7 +30,9 @@ set (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build")
31 30
32 configure_file (${SETUP_PY_IN} ${SETUP_PY}) 31 configure_file (${SETUP_PY_IN} ${SETUP_PY})
33 32
34 -file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/morfeusz2-0.4.0-py2.7" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") 33 +set (EGG_NAME "morfeusz2-${PY2MORFEUSZ_VERSION}-py${PY}")
  34 +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${EGG_NAME}")
  35 +file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/EGG-INFO" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/${EGG_NAME}/")
35 36
36 add_custom_target (generate_python2_setup_file 37 add_custom_target (generate_python2_setup_file
37 DEPENDS ${SETUP_PY}) 38 DEPENDS ${SETUP_PY})
@@ -52,11 +53,15 @@ if (UNIX) @@ -52,11 +53,15 @@ if (UNIX)
52 COMMAND python2 ${SETUP_PY} install --home=${CMAKE_INSTALL_PREFIX} 53 COMMAND python2 ${SETUP_PY} install --home=${CMAKE_INSTALL_PREFIX}
53 DEPENDS py2morfeusz 54 DEPENDS py2morfeusz
54 ) 55 )
55 - add_custom_target (package-python2-bin 56 + add_custom_target (package-python2-egg
56 COMMAND python2 ${SETUP_PY} bdist_egg -d "${TARGET_DIR}" --plat-name "${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}" 57 COMMAND python2 ${SETUP_PY} bdist_egg -d "${TARGET_DIR}" --plat-name "${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}"
57 DEPENDS py2morfeusz 58 DEPENDS py2morfeusz
58 ) 59 )
59 - set (PACKAGE_DEPENDS "package-python2-bin") 60 + add_custom_target (package-python2-whl
  61 + COMMAND python2 ${SETUP_PY} bdist_wheel -d "${TARGET_DIR}"
  62 + DEPENDS py2morfeusz
  63 + )
  64 + set (PACKAGE_DEPENDS "package-python2-egg" "package-python2-whl")
60 65
61 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 66 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
62 if (BUILT_ON) 67 if (BUILT_ON)
@@ -72,7 +77,6 @@ if (UNIX) @@ -72,7 +77,6 @@ if (UNIX)
72 endif () 77 endif ()
73 add_custom_target (package-python2-deb-build 78 add_custom_target (package-python2-deb-build
74 COMMAND debuild -us -uc 79 COMMAND debuild -us -uc
75 -# WORKING_DIRECTORY deb_dist/morfeusz2-${Morfeusz_DEB_VERSION}  
76 WORKING_DIRECTORY deb_dist/morfeusz2-${PY2MORFEUSZ_VERSION} 80 WORKING_DIRECTORY deb_dist/morfeusz2-${PY2MORFEUSZ_VERSION}
77 DEPENDS package-python2-deb-sdist 81 DEPENDS package-python2-deb-sdist
78 ) 82 )
@@ -84,6 +88,16 @@ if (UNIX) @@ -84,6 +88,16 @@ if (UNIX)
84 endif () 88 endif ()
85 add_custom_target (package-python2 89 add_custom_target (package-python2
86 DEPENDS py2morfeusz ${PACKAGE_DEPENDS}) 90 DEPENDS py2morfeusz ${PACKAGE_DEPENDS})
  91 +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND CMAKE_CROSSCOMPILING)
  92 + add_custom_target (package-python2-egg-info
  93 + COMMAND python ${SETUP_PY} egg_info
  94 + DEPENDS generate_python2_wrapper generate_python2_setup_file libmorfeusz
  95 + )
  96 +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND CMAKE_CROSSCOMPILING)
  97 + add_custom_target (package-python2-egg-info
  98 + COMMAND python ${SETUP_PY} egg_info
  99 + DEPENDS generate_python2_wrapper generate_python2_setup_file libmorfeusz
  100 + )
87 elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND NOT CMAKE_CROSSCOMPILING) 101 elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND NOT CMAKE_CROSSCOMPILING)
88 add_custom_target (package-python2-win-egg 102 add_custom_target (package-python2-win-egg
89 COMMAND python2 ${SETUP_PY} bdist_egg -d ${TARGET_DIR} --plat-name "${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}" 103 COMMAND python2 ${SETUP_PY} bdist_egg -d ${TARGET_DIR} --plat-name "${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}"
morfeusz/wrappers/python2/morfeusz2-0.4.0-py2.7/EGG-INFO/SOURCES.txt renamed to morfeusz/wrappers/python2/EGG-INFO/SOURCES.txt
morfeusz/wrappers/python2/morfeusz2-0.4.0-py2.7/EGG-INFO/dependency_links.txt renamed to morfeusz/wrappers/python2/EGG-INFO/dependency_links.txt
No preview for this file type
morfeusz/wrappers/python2/morfeusz2-0.4.0-py2.7/EGG-INFO/native_libs.txt renamed to morfeusz/wrappers/python2/EGG-INFO/native_libs.txt
morfeusz/wrappers/python2/morfeusz2-0.4.0-py2.7/EGG-INFO/not-zip-safe renamed to morfeusz/wrappers/python2/EGG-INFO/not-zip-safe
No preview for this file type
morfeusz/wrappers/python2/morfeusz2-0.4.0-py2.7/EGG-INFO/top_level.txt renamed to morfeusz/wrappers/python2/EGG-INFO/top_level.txt
morfeusz/wrappers/python2/morfeusz2-0.4.0-py2.7/EGG-INFO/PKG-INFO deleted
1 -Metadata-Version: 1.0  
2 -Name: morfeusz2  
3 -Version: 0.4.0  
4 -Summary: Python bindings for Morfeusz  
5 -Home-page: UNKNOWN  
6 -Author: Michał Lenart  
7 -Author-email: michal.lenart@ipipan.waw.pl  
8 -License: UNKNOWN  
9 -Description: UNKNOWN  
10 -Platform: UNKNOWN  
morfeusz/wrappers/python3/CMakeLists.txt
@@ -6,8 +6,7 @@ set(Python_ADDITIONAL_VERSIONS 3.4) @@ -6,8 +6,7 @@ set(Python_ADDITIONAL_VERSIONS 3.4)
6 FIND_PACKAGE (PythonLibs ${PY} REQUIRED) 6 FIND_PACKAGE (PythonLibs ${PY} REQUIRED)
7 #~ INCLUDE (${SWIG_USE_FILE}) 7 #~ INCLUDE (${SWIG_USE_FILE})
8 8
9 -set (PY3MORFEUSZ_VERSION "0.4.0")  
10 - 9 +set (PY3MORFEUSZ_VERSION "${Morfeusz_LIB_VERSION}")
11 # SWIG Java 10 # SWIG Java
12 INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH}) 11 INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
13 INCLUDE_DIRECTORIES (../..) 12 INCLUDE_DIRECTORIES (../..)
@@ -31,8 +30,9 @@ set (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build") @@ -31,8 +30,9 @@ set (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/build")
31 30
32 configure_file (${SETUP_PY_IN} ${SETUP_PY}) 31 configure_file (${SETUP_PY_IN} ${SETUP_PY})
33 32
34 -file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/morfeusz2-0.4.0-py3.6" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")  
35 -file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/morfeusz2-0.4.0-py3.7" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") 33 +set (EGG_NAME "morfeusz2-${PY3MORFEUSZ_VERSION}-py${PY}")
  34 +file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${EGG_NAME}")
  35 +file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/EGG-INFO" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/${EGG_NAME}/")
36 36
37 add_custom_target (generate_python3_setup_file 37 add_custom_target (generate_python3_setup_file
38 DEPENDS ${SETUP_PY}) 38 DEPENDS ${SETUP_PY})
@@ -53,11 +53,16 @@ if (UNIX) @@ -53,11 +53,16 @@ if (UNIX)
53 COMMAND python3 ${SETUP_PY} install --home=${CMAKE_INSTALL_PREFIX} 53 COMMAND python3 ${SETUP_PY} install --home=${CMAKE_INSTALL_PREFIX}
54 DEPENDS py3morfeusz 54 DEPENDS py3morfeusz
55 ) 55 )
56 - add_custom_target (package-python3-bin  
57 - COMMAND python3 ${SETUP_PY} bdist_egg -d "${TARGET_DIR}" --plat-name "${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}" 56 + add_custom_target (package-python3-egg
  57 + COMMAND python3 ${SETUP_PY} bdist_egg -d "${TARGET_DIR}" --plat-name "${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}"
  58 + DEPENDS py3morfeusz
  59 + )
  60 + add_custom_target (package-python3-whl
  61 + COMMAND python3 ${SETUP_PY} bdist_wheel -d "${TARGET_DIR}"
  62 + #--plat-name "${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}"
58 DEPENDS py3morfeusz 63 DEPENDS py3morfeusz
59 ) 64 )
60 - set (PACKAGE_DEPENDS "package-python3-bin") 65 + set (PACKAGE_DEPENDS package-python3-egg package-python3-whl)
61 66
62 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 67 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
63 if (BUILT_ON) 68 if (BUILT_ON)
@@ -83,7 +88,17 @@ if (UNIX) @@ -83,7 +88,17 @@ if (UNIX)
83 list (APPEND PACKAGE_DEPENDS package-python3-deb) 88 list (APPEND PACKAGE_DEPENDS package-python3-deb)
84 endif () 89 endif ()
85 add_custom_target (package-python3 90 add_custom_target (package-python3
86 - DEPENDS py3morfeusz ${PACKAGE_DEPENDS}) 91 + DEPENDS py3morfeusz ${PACKAGE_DEPENDS})
  92 +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND CMAKE_CROSSCOMPILING)
  93 + add_custom_target (package-python3-egg-info
  94 + COMMAND python3 ${SETUP_PY} egg_info
  95 + DEPENDS generate_python3_wrapper generate_python3_setup_file libmorfeusz
  96 + )
  97 +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND CMAKE_CROSSCOMPILING)
  98 + add_custom_target (package-python3-egg-info
  99 + COMMAND python3 ${SETUP_PY} egg_info
  100 + DEPENDS generate_python3_wrapper generate_python3_setup_file libmorfeusz
  101 + )
87 elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND NOT CMAKE_CROSSCOMPILING) 102 elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND NOT CMAKE_CROSSCOMPILING)
88 add_custom_target (package-python3-win-installer 103 add_custom_target (package-python3-win-installer
89 COMMAND python3 ${SETUP_PY} bdist_wininst -d ${TARGET_DIR} --plat-name "${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}" 104 COMMAND python3 ${SETUP_PY} bdist_wininst -d ${TARGET_DIR} --plat-name "${CMAKE_SYSTEM_NAME}-${ARCHITECTURE}"
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.6/EGG-INFO/SOURCES.txt renamed to morfeusz/wrappers/python3/EGG-INFO/SOURCES.txt
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.6/EGG-INFO/dependency_links.txt renamed to morfeusz/wrappers/python3/EGG-INFO/dependency_links.txt
No preview for this file type
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.6/EGG-INFO/native_libs.txt renamed to morfeusz/wrappers/python3/EGG-INFO/native_libs.txt
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.6/EGG-INFO/not-zip-safe renamed to morfeusz/wrappers/python3/EGG-INFO/not-zip-safe
No preview for this file type
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.6/EGG-INFO/top_level.txt renamed to morfeusz/wrappers/python3/EGG-INFO/top_level.txt
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.6/EGG-INFO/PKG-INFO deleted
1 -Metadata-Version: 1.0  
2 -Name: morfeusz2  
3 -Version: 0.4.0  
4 -Summary: Python bindings for Morfeusz  
5 -Home-page: UNKNOWN  
6 -Author: Michał Lenart  
7 -Author-email: michal.lenart@ipipan.waw.pl  
8 -License: UNKNOWN  
9 -Description: UNKNOWN  
10 -Platform: UNKNOWN  
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/PKG-INFO deleted
1 -Metadata-Version: 1.0  
2 -Name: morfeusz2  
3 -Version: 0.4.0  
4 -Summary: Python bindings for Morfeusz  
5 -Home-page: UNKNOWN  
6 -Author: Michał Lenart  
7 -Author-email: michal.lenart@ipipan.waw.pl  
8 -License: UNKNOWN  
9 -Description: UNKNOWN  
10 -Platform: UNKNOWN  
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/SOURCES.txt deleted
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/dependency_links.txt deleted
No preview for this file type
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/native_libs.txt deleted
1 -_morfeusz2.so  
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/not-zip-safe deleted
No preview for this file type
morfeusz/wrappers/python3/morfeusz2-0.4.0-py3.7/EGG-INFO/top_level.txt deleted
1 -_morfeusz2  
2 -morfeusz2