提交 d5444af1 编写于 作者: K Kentaro Wada

Fix cwd for pyrcc4 conversion

上级 60438002
......@@ -14,16 +14,18 @@ version = '1.2.1'
class LabelmeBuildPyCommand(BuildPyCommand):
def run(self):
this_dir = osp.dirname(osp.abspath(__file__))
src = osp.join(this_dir, 'labelme/resources.qrc')
dst = osp.join(this_dir, 'labelme/resources.py')
if find_executable('pyrcc4') is None:
sys.stderr.write('Please install pyrcc4 command.\n')
sys.stderr.write('(See https://github.com/wkentaro/labelme.git)\n')
sys.exit(1)
this_dir = osp.dirname(osp.abspath(__file__))
package_dir = osp.join(this_dir, 'labelme')
src = 'resources.qrc'
dst = 'resources.py'
print('converting {0} -> {1}'
.format(osp.join(package_dir, src), osp.join(package_dir, dst)))
cmd = 'pyrcc4 -o {1} {0}'.format(src, dst)
print('converting {0} -> {1}'.format(src, dst))
subprocess.call(shlex.split(cmd))
subprocess.call(shlex.split(cmd), cwd=package_dir)
BuildPyCommand.run(self)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册