Skip to content
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

Closed
blahblahwhat mannequin opened this issue Jan 22, 2009 · 6 comments
Closed

setup.py crashes if sqlite version contains 'beta' #49283

blahblahwhat mannequin opened this issue Jan 22, 2009 · 6 comments
Labels
build The build process and cross-build easy

Comments

@blahblahwhat
Copy link
Mannequin

blahblahwhat mannequin commented Jan 22, 2009

BPO 5033
Nosy @tarekziade, @merwok, @akheron, @pelme
Files
  • issue5033.patch
  • 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:

    assignee = None
    closed_at = <Date 2013-02-23.16:29:20.820>
    created_at = <Date 2009-01-22.16:23:25.272>
    labels = ['easy', 'build']
    title = "setup.py crashes if sqlite version contains 'beta'"
    updated_at = <Date 2013-02-23.16:29:20.818>
    user = 'https://bugs.python.org/blahblahwhat'

    bugs.python.org fields:

    activity = <Date 2013-02-23.16:29:20.818>
    actor = 'petri.lehtinen'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-02-23.16:29:20.820>
    closer = 'petri.lehtinen'
    components = ['Build']
    creation = <Date 2009-01-22.16:23:25.272>
    creator = 'blahblahwhat'
    dependencies = []
    files = ['29171']
    hgrepos = []
    issue_num = 5033
    keywords = ['patch', 'easy']
    message_count = 6.0
    messages = ['80370', '116570', '121413', '182748', '182756', '182757']
    nosy_count = 8.0
    nosy_names = ['ghaering', 'tarek', 'eric.araujo', 'blahblahwhat', 'BreamoreBoy', 'python-dev', 'petri.lehtinen', 'Andreas.Pelme']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue5033'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3', 'Python 3.4']

    @blahblahwhat
    Copy link
    Mannequin Author

    blahblahwhat mannequin commented Jan 22, 2009

    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

    @blahblahwhat blahblahwhat mannequin added build The build process and cross-build labels Jan 22, 2009
    @ghaering ghaering mannequin self-assigned this Mar 20, 2009
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Sep 16, 2010

    A one line fix is given in msg80370, can this be applied,should the issue be closed or what?

    @merwok
    Copy link
    Member

    merwok commented Nov 18, 2010

    The regex is still the same. I’ll try changing the version string in sqlite and trigger the bug.

    @pelme
    Copy link
    Mannequin

    pelme mannequin commented Feb 23, 2013

    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.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Feb 23, 2013

    New changeset 8b177aea9ddd by Petri Lehtinen in branch '2.7':
    Issue bpo-5033: Fix building of the sqlite3 extension module
    http://hg.python.org/cpython/rev/8b177aea9ddd

    New changeset 73d5dd480558 by Petri Lehtinen in branch '3.2':
    Issue bpo-5033: Fix building of the sqlite3 extension module
    http://hg.python.org/cpython/rev/73d5dd480558

    New changeset c613eb716c8e by Petri Lehtinen in branch '3.3':
    Issue bpo-5033: Fix building of the sqlite3 extension module
    http://hg.python.org/cpython/rev/c613eb716c8e

    New changeset 19b3aaf79e45 by Petri Lehtinen in branch 'default':
    Issue bpo-5033: Fix building of the sqlite3 extension module
    http://hg.python.org/cpython/rev/19b3aaf79e45

    @akheron
    Copy link
    Member

    akheron commented Feb 23, 2013

    Applied, thanks!

    @akheron akheron closed this as completed Feb 23, 2013
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build easy
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants