id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 9630,Building RPM from svn checkout (of 1.0.1 tag) fails,robinbowes,nobody,"I checked out v1.0.1 from the svn tag and tried to build it using {{{python setup.py bdist_rpm}}} It failed with the following msg: {{{ ... hard linking extras/django_bash_completion -> Django-1.0.1-final/extras hard linking scripts/rpm-install.sh -> Django-1.0.1-final/scripts tar -cf dist/Django-1.0.1-final.tar Django-1.0.1-final gzip -f9 dist/Django-1.0.1-final.tar removing 'Django-1.0.1-final' (and everything under it) copying dist/Django-1.0.1-final.tar.gz -> build/bdist.linux-x86_64/rpm/SOURCES building RPMs rpmbuild -ba --define _topdir /var/software/django/1.0.1/build/bdist.linux-x86_64/rpm --clean build/bdist.linux-x86_64/rpm/SPECS/Django.spec error: File /var/software/django/1.0.1/build/bdist.linux-x86_64/rpm/SOURCES/Django-1.0.1_final.tar.gz: No such file or directory error: command 'rpmbuild' failed with exit status 1 }}} Upon further investigation, this is because of a mis-match between the version string generated by setuptools and written into the spec file: {{{ %define version 1.0.1_final }}} and code in setup.py: {{{ ... version = __import__('django').get_version() if u'SVN' in version: version = ' '.join(version.split(' ')[:-1]) setup( name = ""Django"", version = version.replace(' ', '-'), ... }}} which generates a version of {{{1.0.1-final}}} Notice that one uses {{{_}}} (underscore) while the other uses {{{-}}} (hyphen). I fixed this by changing {{{version.replace(' ', '-')}}} to {{{version.replace(' ', '_')}}} in setup.py, but I don't know enough about the rest of your naming convention to determine whether or not this is an appropriate fix.",,closed,Uncategorized,1.0,,duplicate,rpm,,Unreviewed,1,0,0,0,0,0