wseaton / sqloxide

Python bindings for sqlparser-rs
MIT License
168 stars 20 forks source link

v0.1.48 is not installable on windows #265

Closed jeff-99 closed 4 weeks ago

jeff-99 commented 1 month ago

Tried installing sqloxide with pipenv on windows and I'm having issues with installing version 0.1.48 (on linux it seems to work). tried it with multiple python versions (3.9 and up) but it gives me the same errors.

Version 0.1.47 works fine.

Pipfile:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
sqloxide = "==0.1.48"

[dev-packages]

[requires]
python_version = "3.12"

command: pipenv lock --pre

error:

Traceback (most recent call last):                                                                                                                                                                                                                   
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Scripts\pipenv.exe\__main__.py", line 7, in <module>
    sys.exit(cli())
             ~~~^^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\vendor\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\cli\options.py", line 52, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\vendor\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\vendor\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\vendor\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\vendor\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\vendor\click\decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\vendor\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\cli\command.py", line 207, in install
    do_install(
    ~~~~~~~~~~^
        state.project,
        ^^^^^^^^^^^^^^
    ...<14 lines>...
        skip_lock=state.installstate.skip_lock,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\routines\install.py", line 93, in do_install
    do_init(
    ~~~~~~~^
        project,
        ^^^^^^^^
    ...<9 lines>...
        skip_lock=skip_lock,
        ^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\routines\install.py", line 624, in do_init
    do_update(
    ~~~~~~~~~^
        project,
        ^^^^^^^^
    ...<5 lines>...
        editable_packages=editable_packages,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\routines\update.py", line 61, in do_update
    do_lock(
    ~~~~~~~^
        project,
        ^^^^^^^^
    ...<4 lines>...
        extra_pip_args=extra_pip_args,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\routines\lock.py", line 67, in do_lock
    venv_resolve_deps(
    ~~~~~~~~~~~~~~~~~^
        packages,
        ^^^^^^^^^
    ...<10 lines>...
        extra_pip_args=extra_pip_args,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\utils\resolver.py", line 859, in venv_resolve_deps
    c = resolve(cmd, st, project=project)
  File "C:\Users\JeffreySlort\.pyenv\pyenv-win\versions\3.13.0\Lib\site-packages\pipenv\utils\resolver.py", line 723, in resolve
    raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!
rohanjain101 commented 1 month ago

Unable to install 0.1.48 on windows as well (0.1.47 works fine):

Collecting sqloxide==0.1.48
  Downloading sqloxide-0.1.48.tar.gz (13 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]

      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/

      Checking for Rust toolchain....
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip

Is there no longer a windows binary distribution?

wseaton commented 1 month ago

There is a windows binary distribution here: https://files.pythonhosted.org/packages/da/10/b91d980e8516275b47e17b39322a8f20739603e0021c12e6193278a335f0/sqloxide-0.1.48-cp312-none-win_amd64.whl. Does installing the downloaded wheel directly work? Probably an issue introduced with the swap to maturin.

rohanjain101 commented 1 month ago

Is it possible to publish one for python 3.11 and 3.10 as well? Seems like there's only a binary distro for 3.12 on windows.

jeff-99 commented 1 month ago

When using the binary distribution on python 3.12.7 it installs correctly, but as @rohanjain101 mentioned there is only a binary distribution for the windows platform for python 3.12.

@wseaton is it possible to also upload the win distributions for python 3.8 and up ?

wseaton commented 1 month ago

@jeff-99 @rohanjain101 can you guys check out v0.1.51? Wheels should be published to pypi shortly, including python 3.13 and all windows versions.