attrs icon indicating copy to clipboard operation
attrs copied to clipboard

Install fails on Windows

Open spigo900 opened this issue 7 years ago • 2 comments

Because of the way read() reads its input file, the string it returns will have different contents depending on the line ending used in the file. This means that the install fails on Windows, because the CHANGELOG regex looks for '\n', or LF, but since line endings are CRLF on Windows, the regex won't match.

See the log:

> pip install .
...
  Complete output from command c:\users\crazy\appdata\local\programs\python\python37\python.exe c:\users\crazy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pep517\_in_process.py get_requires_for_build_wheel C:\Users\crazy\AppData\Local\Temp\tmpghg6p1e3:
  Traceback (most recent call last):
    File "c:\users\crazy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 207, in <module>
      main()
    File "c:\users\crazy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "c:\users\crazy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 54, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\crazy\AppData\Local\Temp\pip-build-env-6f560u2s\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "C:\Users\crazy\AppData\Local\Temp\pip-build-env-6f560u2s\overlay\Lib\site-packages\setuptools\build_meta.py", line 126, in _get_build_requires
      self.run_setup()
    File "C:\Users\crazy\AppData\Local\Temp\pip-build-env-6f560u2s\overlay\Lib\site-packages\setuptools\build_meta.py", line 141, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 99, in <module>
      + read("AUTHORS.rst")
  AttributeError: 'NoneType' object has no attribute 'group'

spigo900 avatar Aug 02 '19 16:08 spigo900

Huh! Where are those CRLF coming from? Was that some automatisms from git?

hynek avatar Aug 04 '19 12:08 hynek

I believe this should work now?

hynek avatar Aug 19 '19 18:08 hynek