New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setup.py crashes if sqlite version contains 'beta' #49283
Comments
When I try to 'make' Python 2.6.1: Traceback (most recent call last):
File "./setup.py", line 1880, in <module>
main()
File "./setup.py", line 1875, in main
'Lib/smtpd.py']
File "/home/apps/Python-2.6.1/Lib/distutils/core.py", line 152, in
setup
dist.run_commands()
File "/home/apps/Python-2.6.1/Lib/distutils/dist.py", line 975, in
run_commands
self.run_command(cmd)
File "/home/apps/Python-2.6.1/Lib/distutils/dist.py", line 995, in
run_command
cmd_obj.run()
File "/home/apps/Python-2.6.1/Lib/distutils/command/build.py", line
134, in run
self.run_command(cmd_name)
File "/home/apps/Python-2.6.1/Lib/distutils/cmd.py", line 333, in
run_command
self.distribution.run_command(command)
File "/home/apps/Python-2.6.1/Lib/distutils/dist.py", line 995, in
run_command
cmd_obj.run()
File "/home/apps/Python-2.6.1/Lib/distutils/command/build_ext.py",
line 343, in run
self.build_extensions()
File "./setup.py", line 103, in build_extensions
missing = self.detect_modules()
File "./setup.py", line 915, in detect_modules
for x in sqlite_version.split(".")])
ValueError: invalid literal for int() with base 10: '1beta' This was solved by replacing m = re.search(r'\s*.*#\s*.*define\s.*SQLITE_VERSION\W*"(.*)"', incf) with m = re.search(r'\s*.*#\s*.*define\s.*SQLITE_VERSION\W*"([\d\.]*)"',
incf) on line 911 |
A one line fix is given in msg80370, can this be applied,should the issue be closed or what? |
The regex is still the same. I’ll try changing the version string in sqlite and trigger the bug. |
This bug still exists in 2.7 and 3.4. If SQLITE_VERSION in sqlite3.h (/usr/include/sqlite3.h on Mac OS) ends with beta, such as
#define SQLITE_VERSION "3.7.12beta" make will fail. The regex changed suggested above fixes this. The attached patch contains that fix and makes the build work. |
New changeset 8b177aea9ddd by Petri Lehtinen in branch '2.7': New changeset 73d5dd480558 by Petri Lehtinen in branch '3.2': New changeset c613eb716c8e by Petri Lehtinen in branch '3.3': New changeset 19b3aaf79e45 by Petri Lehtinen in branch 'default': |
Applied, thanks! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: