如何为pyinstaller 3.2编写版本文件

时间:2016-08-10 22:30:26

标签: python python-3.x version pyinstaller

我正在尝试将我的python脚本转换为exe,一切顺利,直到我添加了一个版本文件,它抛出了这个错误,我不知道它意味着什么。我已经看过关于版本文件的不同帖子,我已经尝试了所有这些并且我不断收到此错误:

date_by_items.where(date_by_items > 0, 2)

这是我的版本文件:

#include <type_traits>
#include <utility>

template<typename T> struct is_bool;

template<> struct is_bool<bool> { typedef int value; };

template<typename function, typename ... arguments>
void for_each_call(function call, arguments && ... args)
{
    typedef decltype(call(std::forward<arguments>(args)...)) ret_type;

    typedef typename is_bool<ret_type>::value x;

    call(std::forward<arguments>(args)...);
}

bool foo(int, int) {}   // Compiles

// int foo(int, int) {}   // Does not compile

int main()
{
    for_each_call(foo, 4, 2);
    return 0;
}

1 个答案:

答案 0 :(得分:1)

您的版本文件应该足够好了。问题在于PyInstaller的versioninfo.py,目前可能没有Python3支持 作为一种简单的解决方法,您可以尝试使用资源编辑器(例如http://www.codeproject.com/Articles/37133/Simple-Version-Resource-Tool-for-Windows)向您的应用程序添加版本信息。
有关其他信息的相关pyinstaller问题:https://github.com/pyinstaller/pyinstaller/issues/1347

相关问题