2014-11-03 36 views
2

我想從setuptools 7.0源https://pypi.python.org/pypi/setuptools建立一個rpm。無法創建setuptools rpm:錯誤:在一行上的兩個文件

,我做的步驟是:

  • 下載源並解壓縮
  • 在setuptools的直接I運行python setup.py bdist_rpm

我使用Python 2.7.8和Red Hat 6.2(64位)

登錄:

running bdist_rpm 
running egg_info 
writing requirements to setuptools.egg-info/requires.txt 
writing setuptools.egg-info/PKG-INFO 
writing top-level names to setuptools.egg-info/top_level.txt 
writing dependency_links to setuptools.egg-info/dependency_links.txt 
writing entry points to setuptools.egg-info/entry_points.txt 
reading manifest file 'setuptools.egg-info/SOURCES.txt' 
reading manifest template 'MANIFEST.in' 
writing manifest file 'setuptools.egg-info/SOURCES.txt' 
writing 'build/bdist.linux-x86_64/rpm/SPECS/setuptools.spec' 
running sdist 
running check 
creating setuptools-7.0 
creating setuptools-7.0/_markerlib 
creating setuptools-7.0/docs 
creating setuptools-7.0/docs/_templates 
creating setuptools-7.0/docs/_theme 
creating setuptools-7.0/docs/_theme/nature 
creating setuptools-7.0/docs/_theme/nature/static 
creating setuptools-7.0/setuptools 
creating setuptools-7.0/setuptools.egg-info 
creating setuptools-7.0/setuptools/command 
creating setuptools-7.0/setuptools/tests 
creating setuptools-7.0/setuptools/tests/indexes 
creating setuptools-7.0/setuptools/tests/indexes/test_links_priority 
creating setuptools-7.0/setuptools/tests/indexes/test_links_priority/simple 
creating setuptools-7.0/setuptools/tests/indexes/test_links_priority/simple/foobar 
creating setuptools-7.0/setuptools/tests/svn_data 
creating setuptools-7.0/tests 
creating setuptools-7.0/tests/shlib_test 
making hard links in setuptools-7.0... 
hard linking .gitignore -> setuptools-7.0 
hard linking .hgignore -> setuptools-7.0 
......... 
......... 
hard linking tests/shlib_test/setup.py -> setuptools-7.0/tests/shlib_test 
hard linking tests/shlib_test/test_hello.py -> setuptools-7.0/tests/shlib_test 
copying setup.cfg -> setuptools-7.0 
Writing setuptools-7.0/setup.cfg 
Creating tar archive 
removing 'setuptools-7.0' (and everything under it) 
copying dist/setuptools-7.0.tar.gz -> build/bdist.linux-x86_64/rpm/SOURCES 
building RPMs 
rpmbuild -ba --define _topdir /root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm --clean build/bdist.linux-x86_64/rpm/SPECS/setuptools.spec 
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.VPynSG 
+ umask 022 
+ cd /root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm/BUILD 
+ cd /root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm/BUILD 
+ rm -rf setuptools-7.0 
+ /usr/bin/gzip -dc /root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm/SOURCES/setuptools-7.0.tar.gz 
+ /bin/tar -xvvf - 
drwxr-xr-x root/root   0 2014-11-03 17:55 setuptools-7.0/ 
drwxr-xr-x root/root   0 2014-11-03 17:55 setuptools-7.0/setuptools/ 
-rw-rw-rw- root/root  714 2014-10-19 15:11 setuptools-7.0/setuptools/windows_support.py 
-rw-rw-rw- root/root  5195 2014-09-30 04:49 setuptools-7.0/setuptools/__init__.py 
-rwxrwxrwx root/root  74752 2014-09-30 04:37 setuptools-7.0/setuptools/cli-64.exe 
...... 
...... 
-rw-rw-rw- root/root  4813 2014-11-03 17:55 setuptools-7.0/setuptools.egg-info/SOURCES.txt 
-rw-rw-rw- root/root  8772 2014-10-19 14:00 setuptools-7.0/README.txt 
+ STATUS=0 
+ '[' 0 -ne 0 ']' 
+ cd setuptools-7.0 
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w . 
+ exit 0 
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.169Vak 
+ umask 022 
+ cd /root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm/BUILD 
+ cd setuptools-7.0 
+ python setup.py build 
running build 
running build_py 
creating build 
creating build/lib 
copying pkg_resources.py -> build/lib 
...... 
...... 
+ exit 0 
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.h1D3YX 
+ umask 022 
+ cd /root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm/BUILD 
+ cd setuptools-7.0 
+ python setup.py install --single-version-externally-managed -O1 --root=/root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm/BUILDROOT/setuptools-7.0-1.x86_64 --record=INSTALLED_FILES 
running install 
running build 
running build_py 
running install_lib 
writing byte-compilation script '/tmp/tmp56GdDT.py' 
/usr/local/bin/python -O /tmp/tmp56GdDT.py 
removing /tmp/tmp56GdDT.py 
running install_egg_info 
running egg_info 
writing requirements to setuptools.egg-info/requires.txt 
writing setuptools.egg-info/PKG-INFO 
writing top-level names to setuptools.egg-info/top_level.txt 
writing dependency_links to setuptools.egg-info/dependency_links.txt 
writing entry points to setuptools.egg-info/entry_points.txt 
reading manifest file 'setuptools.egg-info/SOURCES.txt' 
reading manifest template 'MANIFEST.in' 
writing manifest file 'setuptools.egg-info/SOURCES.txt' 
removing '/root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm/BUILDROOT/setuptools-7.0-1.x86_64/usr/local/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg-info' (and everything under it) 
Copying setuptools.egg-info to /root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm/BUILDROOT/setuptools-7.0-1.x86_64/usr/local/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg-info 
running install_scripts 
Installing easy_install script to /root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm/BUILDROOT/setuptools-7.0-1.x86_64/usr/local/bin 
Installing easy_install-2.7 script to /root/xxx/robot_tests/test_env_scripts/test1/setuptools-7.0/build/bdist.linux-x86_64/rpm/BUILDROOT/setuptools-7.0-1.x86_64/usr/local/bin 
writing list of installed files to 'INSTALLED_FILES' 
+ /usr/lib/rpm/brp-compress 
+ /usr/lib/rpm/brp-strip 
+ /usr/lib/rpm/brp-strip-static-archive 
+ /usr/lib/rpm/brp-strip-comment-note 
Processing files: setuptools-7.0-1.noarch 
error: Two files on one line: /usr/local/lib/python2.7/site-packages/setuptools/script 
error: File must begin with "/": (dev).tmpl 


RPM build errors: 
    Two files on one line: /usr/local/lib/python2.7/site-packages/setuptools/script 
    File must begin with "/": (dev).tmpl 
error: command 'rpmbuild' failed with exit status 1 

build/bdist.linux-x86_64/rpm/SPECS/setuptools.spec

http://paste.ubuntu.com/8815648/

INSTALLED_FILES

http://paste.ubuntu.com/8819582/

+0

您能否包含'build/bdist.linux-x86_64/rpm/SPECS/setuptools.spec'文件和'INSTALLED_FILES'文件的內容? – 2014-11-03 16:06:15

+0

@EtanReisner請看看http://paste.ubuntu.com/8815648/ – Patryk 2014-11-04 08:46:12

+0

這是spec文件。 「INSTALLED_FILES」呢?另外...對於上帝的愛和所有那些是可怕的'%描述'區塊的神聖。這讓我想要把我的眼睛挖出來。誰決定這是一個好主意需要被槍殺。 – 2014-11-04 13:12:05

回答

2

68線INSTALLED_FILES(在第二膏)是問題所在。 (並且大致是我的預期。)

存在一個文件,其中包含空格。

那空間沒有逃脫或引用(我甚至不知道我知道該怎麼做適當在SPEC文件%files -f <file>使用的文件列表文件)和由轉導致INSTALLED_FILES文件的解析失敗。

該文件將需要重新命名或刪除或該空間需要以某種方式逃脫。

如果這不是你添加的文件,我會在setuptools上提出一個關於它的問題,因爲它們應該正確地處理(或避免)它。

相關問題