Skip to content

Fix build issues when Python with free-threading is used - #261

Open
smuzaffar wants to merge 1 commit into
manugarg:mainfrom
smuzaffar:patch-1
Open

smuzaffar wants to merge 1 commit into
manugarg:mainfrom
smuzaffar:patch-1

Conversation

@smuzaffar

Copy link
Copy Markdown

Building pasparser with pythin 3.14 (free-threading enabled) failed with error [a]. This change allows to find the correct lib.linux-x86_64-cpython-314t' lib

[a]

Build dir: %s pacparser/src/../tests/../src/pymod/build
['lib.linux-x86_64-cpython-314t', 'temp.linux-x86_64-cpython-314t']
Traceback (most recent call last):
  File "pacparser/src/../tests/runtests.py", line 39, in runtests
    pacparser_module_path = module_path(tests_dir)
  File "pacparser-/src/../tests/runtests.py", line 35, in module_path
    return glob.glob(os.path.join(builddir, 'lib*%s' % py_ver))[0]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pacparser/src/../tests/runtests.py", line 88, in <module>
    main()
    ~~~~^^
  File "pacparser/src/../tests/runtests.py", line 85, in main
    runtests(pacfile, testdata, tests_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pacparser/src/../tests/runtests.py", line 41, in runtests
    raise Exception('Tests failed. Could not determine pacparser path.')

Building pasparser with pythin 3.14 (free-threading enabled) failed with error [a]. This change allows to find the correct `lib.linux-x86_64-cpython-314t'` lib

[a]
```
Build dir: %s pacparser/src/../tests/../src/pymod/build
['lib.linux-x86_64-cpython-314t', 'temp.linux-x86_64-cpython-314t']
Traceback (most recent call last):
  File "pacparser/src/../tests/runtests.py", line 39, in runtests
    pacparser_module_path = module_path(tests_dir)
  File "pacparser-/src/../tests/runtests.py", line 35, in module_path
    return glob.glob(os.path.join(builddir, 'lib*%s' % py_ver))[0]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pacparser/src/../tests/runtests.py", line 88, in <module>
    main()
    ~~~~^^
  File "pacparser/src/../tests/runtests.py", line 85, in main
    runtests(pacfile, testdata, tests_dir)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pacparser/src/../tests/runtests.py", line 41, in runtests
    raise Exception('Tests failed. Could not determine pacparser path.')
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant