mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-14 04:47:35 +08:00
35 lines
864 B
Plaintext
35 lines
864 B
Plaintext
import setuptools.command.install
|
|
import shutil
|
|
from distutils.sysconfig import get_python_lib
|
|
|
|
|
|
class CompiledLibInstall(setuptools.command.install.install):
|
|
"""
|
|
Specialized install to install to python libs
|
|
"""
|
|
|
|
def run(self):
|
|
"""
|
|
Run method called by setup
|
|
:return:
|
|
"""
|
|
# Get filenames from CMake variable
|
|
filenames = '${PYTHON_INSTALL_FILES}'.split(';')
|
|
|
|
# Directory to install to
|
|
install_dir = get_python_lib()
|
|
|
|
# Install files
|
|
[shutil.copy(filename, install_dir) for filename in filenames]
|
|
|
|
|
|
if __name__ == '__main__':
|
|
setuptools.setup(
|
|
name='ecl_EKF',
|
|
version='1.0.0-dev',
|
|
packages=['ecl_EKF'],
|
|
license='BSD 3.0',
|
|
author='PX4',
|
|
author_email='px4@px4.io',
|
|
cmdclass={'install': CompiledLibInstall}
|
|
) |