Skip to content

Commit

Permalink
Changes to update the bgs library and fix the pybgs
Browse files Browse the repository at this point in the history
andrewssobral committed Mar 3, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent d58a0b7 commit bff89b1
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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
8 changes: 4 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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 *.*
2 changes: 1 addition & 1 deletion modules/pybind11
Submodule pybind11 updated 243 files
11 changes: 3 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -79,8 +79,7 @@ def run(self):
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 @@ def run(self):
# 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 @@ def run(self):
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
7 changes: 6 additions & 1 deletion virtualenv-build-test-publish.sh
Original file line number Diff line number Diff line change
@@ -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 comments on commit bff89b1

Please sign in to comment.