Skip to content
Snippets Groups Projects
Commit bff89b19 authored by Andrews Cordolino Sobral's avatar Andrews Cordolino Sobral
Browse files

Changes to update the bgs library and fix the pybgs

parent d58a0b76
No related branches found
No related tags found
No related merge requests found
MIT License
Copyright (c) 2012-2022 Andrews Cordolino Sobral
Copyright (c) 2012-2024 Andrews Cordolino Sobral
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
include *.txt
prune src
recursive-include src/algorithms *.*
recursive-include src/tools *.*
recursive-include src/utils *.*
prune bgslibrary
recursive-include bgslibrary/algorithms *.*
recursive-include bgslibrary/tools *.*
recursive-include bgslibrary/utils *.*
prune wrapper
recursive-include wrapper/python *.*
recursive-include modules *.*
......
Subproject commit 65bbd4e0b210655a981be91ae2d3daca358f30f8
Subproject commit c9d32a81f40ad540015814edf13b29980c63e39c
......@@ -79,8 +79,7 @@ class InstallCMakeLibs(install_lib, object):
os.path.splitext(_lib)[1] in [".dll", ".so"]
and not (_lib.startswith("python") or _lib.startswith(PACKAGE_NAME))]
for lib in libs:
shutil.move(lib, os.path.join(self.build_dir,
os.path.basename(lib)))
shutil.move(lib, os.path.join(self.build_dir, os.path.basename(lib)))
# Mark the libs for installation, adding them to
# distribution.data_files seems to ensure that setuptools' record
# writer appends them to installed-files.txt in the package's egg-info
......@@ -96,9 +95,7 @@ class InstallCMakeLibs(install_lib, object):
# included in the package, but are resultant of the cmake build
# step; depending on the files that are generated from your cmake
# build chain, you may need to modify the below code
self.distribution.data_files = [os.path.join(self.install_dir,
os.path.basename(lib))
for lib in libs]
self.distribution.data_files = [os.path.join(self.install_dir, os.path.basename(lib)) for lib in libs]
# Must be forced to run after adding the libs to data_files
self.distribution.run_command("install_data")
super(InstallCMakeLibs, self).run()
......@@ -120,9 +117,7 @@ class InstallCMakeScripts(install_scripts, object):
os.listdir(bin_dir) if
os.path.isdir(os.path.join(bin_dir, _dir))]
for scripts_dir in scripts_dirs:
shutil.move(scripts_dir,
os.path.join(self.build_dir,
os.path.basename(scripts_dir)))
shutil.move(scripts_dir, os.path.join(self.build_dir, os.path.basename(scripts_dir)))
# Mark the scripts for installation, adding them to
# distribution.scripts seems to ensure that the setuptools' record
# writer appends them to installed-files.txt in the package's egg-info
......
......@@ -9,7 +9,7 @@ source bgslibrary_env/bin/activate
# Upgrade pip and install required packages numpy and OpenCV
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install wheel setuptools
python -m pip install numpy
python -m pip install opencv-python
......@@ -22,7 +22,12 @@ python setup.py install
# Set the PYTHONPATH environment variable to the build directory to access the installed library
# The following line is for Linux
# ubuntu 20
export PYTHONPATH=$PYTHONPATH:$PWD/build/lib.linux-x86_64-cpython-38
# ubuntu 22
export PYTHONPATH=$PYTHONPATH:$PWD/build/lib.linux-x86_64-cpython-310
# ubuntu 24
export PYTHONPATH=$PYTHONPATH:$PWD/build/lib.linux-x86_64-cpython-312
# The following line is for Mac
export PYTHONPATH=$PYTHONPATH:$PWD/build/lib.macosx-11-x86_64-cpython-39
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment