You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# pwd
/mnt/storage/files/target-fb/configshell-fb-rpm
# diff ./build/configshell-fb-1.1.29.7.g50d5ffe/setup.py setup.py
28a29
> print "Version from init: %s " % (match)
32,33c33,34
< else:
< raise Exception("Couldn't find version in setup.py")
---
> else:
> raise Exception("Couldn't find version in setup.py")
When making RPM using Makefiles from targetcli-pkgscripts/
# make rpm
.
.
.
.
+ cd configshell-fb-1.1.29.7.g50d5ffe
+ LANG=C
+ export LANG
+ unset DISPLAY
+ /usr/bin/python setup.py build
Traceback (most recent call last):
File "setup.py", line 33, in <module>
raise Exception("Couldn't find version in setup.py")
Exception: Couldn't find version in setup.py
error: Bad exit status from /var/tmp/rpm-tmp.imTp3e (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.imTp3e (%build)
make: *** [build/rpm-stamp] Error 1
#
The text was updated successfully, but these errors were encountered:
Corrected above. The else is fine. Needed to update the expression match on this dated CentOS 6 Python 2.6.x install. Line 28 below:
23 # Get version without importing.
24 init_file_path = os.path.join(os.path.dirname(__file__), 'configshell/__init__.py')
25
26 with open(init_file_path) as f:
27 for line in f:
28 match = re.match(r"__version__.*'([0-9]+\.[0-9]+\.[0-9]+.*\.gba.*)'", line)
29 if match:
30 print "Version from init: %s " % (match)
31 if match:
32 version = match.group(1)
33 break
34 else:
35 raise Exception("Couldn't find version in setup.py")
configshell-fb/setup.py
Line 32 in 50d5ffe
When making RPM using Makefiles from targetcli-pkgscripts/
The text was updated successfully, but these errors were encountered: