python setuptool bug ***错误:找不到内部版本说明

时间:2018-07-04 12:47:01

标签: python python-3.x setuptools

你好,我尝试使用python和设置工具来构建rpm,但是我遇到了问题

对于朗姆酒我的setup.py文件,我执行以下命令: python3 ./setup.py bdist --formats = rpm

我的文件setup.py:

#!/usr/bin/python
# -*- coding: utf-8 -*-

from setuptools import setup, find_packages
import os
import sys

def package_files(directory):
    paths = []
    for (path, directories, filenames) in os.walk(directory):
        for filename in filenames:
            paths.append(os.path.join(path, filename))
    return paths


entry_points = """
[console_scripts]

[gui_scripts]

"""

setup(
    name='hyliaduc',
    version="3.0",
    author='Vallet Thomas',
    author_email='thomas.vallet@atos.net',
    url='',
    #packages=find_packages(),
    entry_points=entry_points,
    #./dist/main/*
    data_files=[
        ('/etc/hyliaduc', ['hyliaduc.conf']),
        ('/var/hyliaduc', package_files('/home/tbewair/dist/main'))
        ]

)

当我运行此命令时,将tar.gz存档与我的文件夹/ home / tbewair / dist / main中的所有文件一起编程 但是创建存档后,我遇到了这个错误:

extracting debug info from /home/tbewair/build/bdist.linux-x86_64/rpm/BUILDROOT/hyliaduc-3.0-1.x86_64/var/hyliaduc/_struct.so
*** ERROR: No build ID note found in /home/tbewair/build/bdist.linux-x86_64/rpm/BUILDROOT/hyliaduc-3.0-1.x86_64/var/hyliaduc/_struct.so
xargs: stat: terminated by signal 13
error: Bad exit status from /var/tmp/rpm-tmp.6FiAe0 (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.6FiAe0 (%install)
error: command 'rpmbuild' failed with exit status 1

但是文件存在并且他有效: /home/tbewair/build/bdist.linux-x86_64/rpm/BUILDROOT/hyliaduc-3.0-1.x86_64/var/hyliaduc/_struct.so

为什么我有这个错误? 如何解决这个问题

我想将/ home / tbewair / dist / main文件夹中的所有文件都放在/ var / hyliaduc文件夹中的rpm文件中

0 个答案:

没有答案