anishathalye / dotbot

A tool that bootstraps your dotfiles ⚡️
MIT License
6.9k stars 287 forks source link

Installing dotbot via python fails #344

Closed Phreno closed 10 months ago

Phreno commented 10 months ago

Windows

x Get-ComputerInfo

WindowsBuildLabEx                                       : 17763.1.amd64fre.rs5_release.180914-1434
WindowsCurrentVersion                                   : 6.3
WindowsEditionId                                        : EnterpriseS
WindowsInstallationType                                 : Client
WindowsInstallDateFromRegistry                          : 22/04/2021 04:16:21
WindowsProductId                                        : 00425-00000-00002-AA741
WindowsProductName                                      : Windows 10 Enterprise LTSC 2019
WindowsSystemRoot                                       : C:\windows
WindowsVersion                                          : 1809

TimeZone                                                : (UTC+01:00) Bruxelles, Copenhague, Madrid, Paris
LogonServer                                             : \\CDC-130
PowerPlatformRole                                       : Mobile
DeviceGuardSmartStatus                                  : Off

Python

> python --version
Python 3.11.4

Error

x pip install dotbot
Collecting dotbot
  Obtaining dependency information for dotbot from https://files.pythonhosted.org/packages/a5/86/6ba549731c1b571c93fdab932cbf22215c5af9e3e967b927f15cbad25fa4/dotbot-1.19.2-py2.py3-none-any.whl.metadata
  Using cached dotbot-1.19.2-py2.py3-none-any.whl.metadata (18 kB)
Collecting PyYAML<6,>=5.3 (from dotbot)
  Using cached PyYAML-5.4.1.tar.gz (175 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [68 lines of output]
      C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\config\setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!

              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.

              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      running egg_info
      writing lib3\PyYAML.egg-info\PKG-INFO
      writing dependency_links to lib3\PyYAML.egg-info\dependency_links.txt
      writing top-level names to lib3\PyYAML.egg-info\top_level.txt
      Traceback (most recent call last):
        File "C:\Users\xxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\xxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\xxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 271, in <module>
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\dist.py", line 1233, in run_command
          super().run_command(command)
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 319, in run
          self.find_sources()
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 327, in find_sources
          mm.run()
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 549, in run
          self.add_defaults()
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 587, in add_defaults
          sdist.add_defaults(self)
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\command\sdist.py", line 113, in add_defaults
          super().add_defaults()
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 336, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<string>", line 201, in get_source_files
        File "C:\Users\xxx\AppData\Local\Temp\pip-build-env-cpnicndk\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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

Looks similar to this issue

https://github.com/yaml/pyyaml/issues/724

I'm not very familiar with python, but have tried with different version of python and version of pyyaml without success.

jcrben commented 10 months ago

Not sure what is going on here, but I was able to get it to install via this command using pipx based upon this solution https://github.com/yaml/pyyaml/issues/601#issuecomment-1693730229:

pipx install "--pip-args=-c constraints.txt --no-build-isolation" dotbot

Paired with this constraints.txt file:

pyyaml==5.4.1
dotbot==1.19.1
Cython==0.29.36
Phreno commented 10 months ago

Works like a charm, just had to install pipx. Thanks.

jcrben commented 10 months ago

@Phreno can we reopen this until it's fixed in a better way? This workaround isn't documented

vastbluesky commented 10 months ago

I was able to get it to install [...] with this constraints.txt file:

pyyaml==5.4.1
dotbot==1.19.1
Cython==0.29.36

Thanks, that worked for me! It may be advisable to pin the exact versions as above, but FYI the following constraints file also worked:

pyyaml<6.0
Cython<3.0
anishathalye commented 10 months ago

Forgot to comment when I reopened. Haven't investigated closely but I think this is related to https://github.com/anishathalye/dotbot/pull/340. I want to keep this open and double-check that it's been fixed once #340 and related issues are addressed (which I will do as soon as I have some free time, perhaps next weekend).

anishathalye commented 10 months ago

Fixed in the latest release of Dotbot (1.20.0). Please let me know if you're still running into issues.