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

Fails to build with Python3.11 #81

Open
Ben-Brady opened this issue Apr 1, 2023 · 0 comments
Open

Fails to build with Python3.11 #81

Ben-Brady opened this issue Apr 1, 2023 · 0 comments

Comments

@Ben-Brady
Copy link

Python3.11 has removed support for using rU for unversal newlines which means when trying to install this package the build will fail.

python3.10

>>> open("/dev/zero", "rU")
<stdin>:1: DeprecationWarning: 'U' mode is deprecated
<_io.TextIOWrapper name='/dev/zero' mode='rU' encoding='UTF-8'>

python3.11

>>> open("/dev/zero", "rU")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid mode: 'rU'

Error log:

warning Error running install script for optional dependency: "/home/ben/Documents/code/js/discord-fs/node_modules/fuse-bindings: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments: 
Directory: /home/ben/Documents/code/js/discord-fs/node_modules/fuse-bindings
Output:
prebuild-install WARN install No prebuilt binaries found (target=18.7.0 runtime=node arch=x64 libc= platform=linux)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.11.2 found at \"/home/linuxbrew/.linuxbrew/opt/[email protected]/bin/python3.11\"
(node:25520) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /home/linuxbrew/.linuxbrew/opt/[email protected]/bin/python3.11
gyp info spawn args [
gyp info spawn args   '/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ben/Documents/code/js/discord-fs/node_modules/fuse-bindings/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ben/.cache/node-gyp/18.7.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/ben/.cache/node-gyp/18.7.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/ben/.cache/node-gyp/18.7.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/ben/Documents/code/js/discord-fs/node_modules/fuse-bindings',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
  File \"/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/gyp/gyp_main.py\", line 50, in <module>
    sys.exit(gyp.script_main())
             ^^^^^^^^^^^^^^^^^
  File \"/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 554, in script_main
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File \"/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 547, in main
    return gyp_main(args)
           ^^^^^^^^^^^^^^
  File \"/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 520, in gyp_main
    [generator, flat_list, targets, data] = Load(
                                            ^^^^^
  File \"/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 136, in Load
    result = gyp.input.Load(build_files, default_variables, includes[:],
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/gyp/pylib/gyp/input.py\", line 2782, in Load
    LoadTargetBuildFile(build_file, data, aux_data,
  File \"/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/gyp/pylib/gyp/input.py\", line 391, in LoadTargetBuildFile
    build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/gyp/pylib/gyp/input.py\", line 234, in LoadOneBuildFile
    build_file_contents = open(build_file_path, 'rU').read()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/ben/Documents/code/js/discord-fs/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.19.0-38-generic
gyp ERR! command \"/usr/local/bin/node\" \"/home/ben/Documents/code/js/discord-fs/node_modules/fuse-bindings/node_modules/.bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /home/ben/Documents/code/js/discord-fs/node_modules/fuse-bindings
gyp ERR! node -v v18.7.0
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok
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

No branches or pull requests

1 participant