mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-10-31 15:20:13 +00:00
python: do all work in build directory
This commit is contained in:
parent
7bb864b999
commit
ca628e55bb
@ -436,6 +436,7 @@ write_basic_package_version_file(
|
||||
if(${BUILD_PYTHON})
|
||||
find_package(Python3 COMPONENTS Development Interpreter REQUIRED)
|
||||
file(GLOB PYSRC CONFIGURE_DEPENDS python/src/notcurses/*.py)
|
||||
file(COPY python/src/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/python/)
|
||||
set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/python/setup.py.in")
|
||||
set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/python/setup.py")
|
||||
set(SETUP_CFG_IN "${CMAKE_CURRENT_SOURCE_DIR}/python/setup.cfg.in")
|
||||
@ -446,7 +447,9 @@ if(${BUILD_PYTHON})
|
||||
OUTPUT
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/build/pytimestamp"
|
||||
COMMAND
|
||||
"${Python3_EXECUTABLE}" ${SETUP_PY} build_ext -L ${CMAKE_CURRENT_BINARY_DIR} -b ${CMAKE_CURRENT_BINARY_DIR}/python
|
||||
"${Python3_EXECUTABLE}" ${SETUP_PY} build_ext -R${CMAKE_INSTALL_LIBDIR} -L ${CMAKE_CURRENT_BINARY_DIR} -b ${CMAKE_CURRENT_BINARY_DIR}/python &&
|
||||
"${Python3_EXECUTABLE}" ${SETUP_PY} build_py &&
|
||||
"${Python3_EXECUTABLE}" ${SETUP_PY} egg_info -b ${CMAKE_CURRENT_BINARY_DIR}/python
|
||||
DEPENDS
|
||||
${PYSRC} ${SETUP_PY} ${SETUP_CFG} notcurses
|
||||
COMMENT "Building Python wrappers"
|
||||
|
@ -7,9 +7,9 @@ def read(fname):
|
||||
if __name__ == '__main__':
|
||||
setup(name='notcurses',
|
||||
version='${PROJECT_VERSION}',
|
||||
package_dir={ '': '${CMAKE_CURRENT_SOURCE_DIR}/python/src/notcurses' },
|
||||
packages=find_packages('${CMAKE_CURRENT_SOURCE_DIR}/python/src/notcurses'),
|
||||
cffi_modules=['${CMAKE_CURRENT_SOURCE_DIR}/python/src/notcurses/build_notcurses.py:ffibuild'],
|
||||
package_dir={ '': '${CMAKE_CURRENT_BINARY_DIR}/python/notcurses' },
|
||||
packages=find_packages('${CMAKE_CURRENT_BINARY_DIR}/python/notcurses'),
|
||||
cffi_modules=['${CMAKE_CURRENT_BINARY_DIR}/python/notcurses/build_notcurses.py:ffibuild'],
|
||||
py_modules=["notcurses"],
|
||||
include_dirs=['${CMAKE_CURRENT_SOURCE_DIR}/include']
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user