Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonzalo-Mier committed May 13, 2024
2 parents cbcd7e9 + 047c853 commit 446888b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:

- name: Test Python
working-directory: ${{github.workspace}}
run: pytest-3 tests/python/
run: PYTHONPATH=${PYTHONPATH}:instdir/lib/python$(python3 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))')/site-packages pytest-3 tests/python/



Expand Down
4 changes: 2 additions & 2 deletions swig/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ file(
if(Python_VERSION VERSION_GREATER_EQUAL 3)
add_custom_target(install-python
DEPENDS _fields2cover_python
COMMAND python3 ${SETUP_PY_OUT} install
COMMAND python3 ${SETUP_PY_OUT} install --prefix=${CMAKE_INSTALL_PREFIX}
)
install(CODE "execute_process(COMMAND python3 ${SETUP_PY_OUT} install)")
install(CODE "execute_process(COMMAND python3 ${SETUP_PY_OUT} install --prefix=${CMAKE_INSTALL_PREFIX})")
elseif(Python_VERSION VERSION_GREATER_EQUAL 2)
add_custom_target(
install-python
Expand Down
4 changes: 3 additions & 1 deletion swig/python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class CompiledLibInstall(setuptools.command.install.install):
filenames = '${PYTHON_INSTALL_FILES}'.split(';')

# Directory to install to
install_dir = get_python_lib()
install_dir = get_python_lib(prefix=self.prefix)
if not os.path.isdir(install_dir):
os.makedirs(install_dir)

# Install files
[shutil.copy(filename, install_dir) for filename in filenames]
Expand Down

0 comments on commit 446888b

Please sign in to comment.