maunium / stickerpicker

A fast and simple Matrix sticker picker widget
GNU Affero General Public License v3.0
312 stars 592 forks source link

Installation on Windows now failing #52

Open pulpocaminante opened 1 year ago

pulpocaminante commented 1 year ago

Seems to be an environment variable issue

amnesia ❯ git init .
Reinitialized existing Git repository in [ Truncated ]

amnesia ❯ pip install .
Processing  [ Truncated ]\stickerpicker
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File " [ Truncated ]\stickerpicker\setup.py", line 3, in <module>
          from sticker.get_version import git_tag, git_revision, version, linkified_version
        File " [ Truncated ]\stickerpicker\sticker\get_version.py", line 9, in <module>

Specifically:

          "HOME": os.environ["HOME"],
        File " [ Truncated ]\Python\Python310\lib\os.py", line 680, in __getitem__
          raise KeyError(key) from None
      KeyError: 'HOME'
      [end of output]

Although setting %HOME%=anything has no effect on this error.

Lewko6702 commented 1 year ago

hey I was able to actually fix this!

change these two lines in setup.py and get_version.py

get_version.py "HOME": os.environ["USERPROFILE"], and setup.py long_desc = open("README.md", encoding="utf-8").read()

this fixed it for me

iraizo commented 1 year ago

editing setup.py is required, but with the home env variable you can just type

 $env:HOME = $env:USERPROFILE

beforehand

Lewko6702 commented 1 year ago

ah yeah that is a much better solution