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