Skip to content

REUSE under Windows #555

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

Closed
BLumia opened this issue Jul 5, 2022 · 4 comments
Closed

REUSE under Windows #555

BLumia opened this issue Jul 5, 2022 · 4 comments
Labels
bug Something isn't working priority/low Low priority

Comments

@BLumia
Copy link

BLumia commented Jul 5, 2022

While trying to use REUSE tool to check my project, I saw it complains ModuleNotFoundError: No module named 'pwd' when running reuse lint under my Windows 11 installation (logs below). Or should I open another issue for the Windows supporting question?

$env:PYTHONUTF8="1" was set or it will complain UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 105444: illegal multibyte sequence when running under a non UTF-8 Windows installation (Simplified Chinese for example). The following are the errors while trying to run reuse lint:

Traceback (most recent call last):
  File "C:\Users\Gary\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Gary\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Gary\AppData\Roaming\Python\Python38\Scripts\reuse.exe\__main__.py", line 4, in <module>
  File "C:\Users\Gary\AppData\Roaming\Python\Python38\site-packages\reuse\_main.py", line 15, in <module>
    from . import (
  File "C:\Users\Gary\AppData\Roaming\Python\Python38\site-packages\reuse\download.py", line 18, in <module>
    from ._util import (
  File "C:\Users\Gary\AppData\Roaming\Python\Python38\site-packages\reuse\_util.py", line 28, in <module>
    from debian.copyright import Copyright
  File "C:\Users\Gary\AppData\Roaming\Python\Python38\site-packages\debian\copyright.py", line 59, in <module>
    from debian import deb822
  File "C:\Users\Gary\AppData\Roaming\Python\Python38\site-packages\debian\deb822.py", line 321, in <module>
    import debian.changelog
  File "C:\Users\Gary\AppData\Roaming\Python\Python38\site-packages\debian\changelog.py", line 93, in <module>
    import pwd
ModuleNotFoundError: No module named 'pwd'
@nicorikken nicorikken added the bug Something isn't working label Jul 5, 2022
@carmenbianca
Copy link
Member

Related to #466. python-debian is an unfortunate dependency and will be replaced at some point. You can try to install an older version of python-debian. 0.1.38 should work.

Windows support is not really a priority though.

@carmenbianca carmenbianca added the priority/low Low priority label Jul 6, 2022
@BLumia
Copy link
Author

BLumia commented Jul 6, 2022

Windows support is not really a priority though.

I understand. I mainly work under Linux desktop distribution but also use Windows in some case, so it could be better if it also works under Windows :)

@stephanlachnit
Copy link

Is this still an issue?

python-debian now runs their test on Windows in their CI (via wine): https://salsa.debian.org/python-debian-team/python-debian/-/pipelines/457575

@BLumia
Copy link
Author

BLumia commented Feb 6, 2023

Seems working now, tested with reuse version 1.1.1. Thanks for the info :)

@BLumia BLumia closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/low Low priority
Projects
None yet
Development

No branches or pull requests

4 participants