New submission from Alexandru Gheorghe: When having spaces in the path which represents the root for the build on going, rpmbuild from bdist_rpm will fail:
---------------------------------------------------- + python setup.py install -O1 --root=/home/lex/Development/4. Test/11. ARTA/build/src/rpm/BUILDROOT/efw-arta-3.0.1_0.test0-0.x86_64 --record=INSTALLED_FILES invalid command name 'Test/11.' error: Bad exit status from /var/tmp/rpm-tmp.cbEEZl (%install) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.cbEEZl (%install) error: command 'rpmbuild' failed with exit status 1 ---------------------------------------------------- With this patch it will work: --- bdist_rpm-BAK.py 2014-03-02 14:52:31.501744617 +0200 +++ bdist_rpm.py 2014-03-02 14:53:10.705746243 +0200 @@ -512,8 +512,8 @@ # that we open and interpolate into the spec file, but the defaults # are just text that we drop in as-is. Hmmm. - install_cmd = ('%s install -O1 --root=$RPM_BUILD_ROOT ' - '--record=INSTALLED_FILES') % def_setup_call + install_cmd = ('%s install -O1 --root="$RPM_BUILD_ROOT" ' + '--record="INSTALLED_FILES"') % def_setup_call script_options = [ ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), but then another roadblock is hit: + cp -pr CHANGELOG /home/lex/Development/4. Test/11. ARTA/build/src/rpm/BUILDROOT/efw-safi-3.0.1_0.test0-0.x86_64/usr/share/doc/efw-arta-3.0.1_0.test0 cp: cannot stat `CHANGELOG': No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.1tO2OV (%doc) error: File not found: /home/lex/Development/4. Test/11. ARTA/build/src/rpm/BUILDROOT/efw-arta-3.0.1_0.test0-0.x86_64/usr/share/doc/efw-arta-3.0.1_0.test0 seems stat also needs quoted path: lex@hemvi:~/Development/4. Test/11. ARTA/build$ stat --format="%a" /home/lex/Development/4. Test/11. ARTA/build/CHANGELOG ; echo $? 755 stat: cannot stat `Test/11.': No such file or directory stat: cannot stat `ARTA/build/CHANGELOG': No such file or directory 1 lex@hemvi:~/Development/4. Test/11. ARTA/build$ stat --format="%a" "/home/lex/Development/4. Test/11. ARTA/build/CHANGELOG" ; echo $? 644 0 I guess all the calls need to be rewritten to take into account spaces in the path. This would be too laborious, thus perhaps we should warn in documentation packagers/developers not to use spaces in path when building? ---------- components: Distutils messages: 212548 nosy: drunax priority: normal severity: normal status: open title: setup.py install doesn't parse spaces in path type: enhancement versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20824> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com