我正在尝试将软件包中的某些文件复制到根目录,但是复制时出现错误,提示为no such file or directory
。
在这种情况下如何指定相对路径?
CUSTOM_COMMANDS = [
['sudo', 'apt-get', 'update'],
['sudo', 'apt-get', '--assume-yes', 'install', 'ffmpeg'],
['sudo', 'cp', os.getcwd() + '/app/init/celeryd', '/etc/init.d/'],
['sudo', 'cp', os.getcwd() + '/app/init/celerybeat', '/etc/init.d/'],
['sudo', 'cp', os.getcwd() + '/app/default/celeryd', '/etc/default/']
]
setuptools.setup(
description='Image/Video recording software - Detect and uploads motions to WandSentry.',
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
packages=setuptools.find_packages(),
package_data={'app': ['init/celeryd', 'init/celerybeat', 'default/celeryd', 'default/celerybeat']},
include_package_data=True,
install_requires=[
'WSDiscovery', 'netifaces', 'imutils', 'opencv-python',
'peewee', 'celery', 'flask', 'flask-restful',
]
)
使用自定义命令时出错。