Skip to content

Commit

Permalink
fixed setup.py and CMake scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
nadavbh12 committed Jan 21, 2017
1 parent 21320c5 commit bb49625
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
19 changes: 9 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,6 @@ IF(INSTALL_CORES)
set(GENESIS_INSTALL_COMMAND
mv genesis_plus_gx_libretro.so
${LIBDIR}/genesis_plus_gx_libretro.so)
ELSEIF(BUILD_PYTHON)
set(SNES9X_INSTALL_COMMAND
mv `${FIND_SNES9X}`
${PYTHON_RLE_DIR}/snes9x2010_libretro.so)
set(STELLA_INSTALL_COMMAND
mv stella_libretro.so
${PYTHON_RLE_DIR}/stella_libretro.so)
set(GENESIS_INSTALL_COMMAND
mv genesis_plus_gx_libretro.so
${PYTHON_RLE_DIR}/genesis_plus_gx_libretro.so)
ELSE()
set(SNES9X_INSTALL_COMMAND "")
set(STELLA_INSTALL_COMMAND "")
Expand Down Expand Up @@ -153,6 +143,15 @@ ExternalProject_add(genesis_plus_gx_libretro
INSTALL_COMMAND "${GENESIS_INSTALL_COMMAND}"
)

IF(BUILD_PYTHON)
INSTALL(DIRECTORY ${SNES9X_DIR} DESTINATION ${PYTHON_RLE_DIR}/snes9x2010_libretro.so
FILES_MATCHING PATTERN "*.so")
INSTALL(DIRECTORY ${GENESIS_PLUS_GX_DIR} DESTINATION ${PYTHON_RLE_DIR}/stella_libretro.so
FILES_MATCHING PATTERN "*.so")
INSTALL(DIRECTORY ${STELLA_DIR} DESTINATION ${PYTHON_RLE_DIR}/genesis_plus_gx_libretro.so
FILES_MATCHING PATTERN "*.so")
ENDIF()

add_library(rle-lib SHARED ${SOURCE_DIR}/rle_interface.cpp ${SOURCES})
set_target_properties(rle-lib PROPERTIES OUTPUT_NAME rle)
set_target_properties(rle-lib PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recursive-include src *
recursive-include rle_python_interface *
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ def run_cmake():
ds.spawn(['make', '-j', str(cores_to_use)])
except ds.DistutilsExecError:
print "Error while running cmake"
print "run 'setup.py build --help' for build options"
print "You may also try editing the settings in CMakeLists.txt file and re-running setup"
sys.exit(-1)

###########################
Expand All @@ -43,18 +41,18 @@ def run(self):
os.chdir(cwd)

setup(name = 'rle_python_interface',
version='1.0.3',
version='1.0.4',
description = 'Retro Learning Environment Python Interface based on Ben Goodrich\'s work',
url='https://github.com/nadavbh12/Retro-Learning-Environment',
download_url='https://github.com/nadavbh12/Retro-Learning-Environment/tarball/1.0.3',
download_url='https://github.com/nadavbh12/Retro-Learning-Environment/tarball/1.0.4',
author='Nadav Bhonker, Shai Rozenberg',
author_email='[email protected];[email protected]',
license = 'GPL',
packages=['rle_python_interface'],
package_dir={'rle_python_interface': 'rle_python_interface'},
package_data={'rle_python_interface': ['librle_c.so',
'stella_libretro.so',
'snes9x2010_libretrolinux-x86_64.so',
'snes9x2010_libretro.so',
'genesis_plus_gx_libretro.so']},
cmdclass={'build': Build }
)

0 comments on commit bb49625

Please sign in to comment.